Kelly Wilson
b38845e88e
Apply patch from klickverbot. This is his 'proper fix' patch for bug #395 .
2010-03-08 23:37:40 -07:00
Christian Kamm
9cd32549c4
Improve array append performance.
...
Actually use the appropriate runtime function, instead of just
growing the array by one!
2010-02-14 10:11:05 +01:00
Robert Clipsham
98e869c7ec
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
...
Updated the runtest script to build libtangobos-partial.a if it hasn't already been built.
Added in signbit() and va_arg!()() to libtangobos-partial.a so more of the phobos dependent DStress tests pass.
2009-11-08 16:16:17 +00:00
Moritz Warning
b7c0c9e25e
allow forward referencing, fix #361
2009-09-09 20:13:17 +02:00
Benjamin Kramer
d24643bb50
Avoid some unecessary heap allocations by using llvm's StringRef class.
2009-08-14 01:43:30 +02:00
Benjamin Kramer
c220dcac05
IntegerType is now contextifed.
...
Requires llvm >= 78969. resistor says this will be the last context API change :)
2009-08-14 00:39:18 +02:00
Benjamin Kramer
977fa551ee
Push the context through StructType::get.
...
Requires LLVM >= 78258. Also remove old #if's.
2009-08-06 01:47:39 +02:00
Tomas Lindquist Olsen
84f820b442
Added framework for writing a static printf call checker for bearophile to implement.
2009-08-06 16:52:43 +02:00
Benjamin Kramer
4c5457ba61
getNullValue is in Constant again
...
Requires LLVM >= r77721
2009-07-31 23:01:29 +02:00
Benjamin Kramer
0a1d467ac7
getTrue/getFalse were moved back to ConstantInt
...
Requires LLVM >= r77685
2009-07-31 19:11:07 +02:00
Benjamin Kramer
652a4b39c0
ConstantAggregateZero moved back to LLVM 2.5-style API
...
Requires LLVM >= 77635
2009-07-31 01:16:30 +02:00
Benjamin Kramer
66101517d7
LLVMContext changes up to r77366
2009-07-30 15:25:10 +02:00
Benjamin Kramer
a398cd39b3
ConstantInt::get{True,False} moved to LLVMContext
...
Non-breaking build fix for LLVM r76533. Also fixes a context related
bug in GarbageCollect2Stack.
2009-07-21 13:11:39 +02:00
Benjamin Kramer
d7049de966
More factory methods moved to LLVMContext
2009-07-15 18:09:41 +02:00
Benjamin Kramer
0ee2f34611
Don't use llvm::getGlobalContext() anymore
2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1
Build fix for the latest LLVMContext changes (LLVM r75445)
...
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Christian Kamm
756a2cb2a1
Adjust LDC to work with the LLVMContext LLVM changes.
...
This means we now require a fairly new LLVM revision. I use 75234.
2009-07-10 21:30:02 +02:00
Christian Kamm
5658d9bb38
Emit file and line info for 'Array operation ... not recognized' error.
...
Fixes #326 .
2009-06-22 19:31:25 +02:00
Christian Kamm
265cbea170
Make == for associative arrays test for equality, not identity.
...
_aaEq was added to runtime/internal/aaA.d which forwards to
TypeInfo_AssociativeArray.equals in genobj.d. On the codegen side, DtoAAEquals
was added to gen/aa.cpp and is called from EqualExp::toElem in gen/toir.cpp.
I assume that the frontend will produce an error if == is used on associative
arrays of different type.
This fixes DMD bug 1429.
2009-06-21 19:05:24 +02:00
Frits van Bommel
62dee01d35
Implement equality comparison for associative arrays. The semantics aren't in
...
the spec, but DMD does a simple pointer comparison. Complaints about this go to
http://d.puremagic.com/issues/show_bug.cgi?id=1429 :P.
2009-06-21 00:12:29 +02:00
Christian Kamm
7dbe9baa37
Made is and !is use the same numeric comparison as == and !=, fixes #328
...
Factored out common code from EqualExp and IdentityExp into
DtoBinNumericEquals in binexp.cpp.
2009-06-16 23:00:27 +02:00
Christian Kamm
e54d75354c
Cannot take the address of a slice or struct literal as a constant expression.
2009-06-14 12:27:51 +02:00
Christian Kamm
dbe949ede6
More DtoType -> DtoTypeNotVoid for getting the array element llvm type.
2009-06-12 21:34:35 +02:00
Frits van Bommel
1958e17734
Rewrite StructLiteralExp::toElem
to store individual fields instead of
...
generating a constant to fill the entire struct with a single `store`.
This is much more efficient at compile time (fixing #320 ) and vastly reduces
the size of the emitted code. Since LLVM no longer needs to keep the data for
all fields in "registers" until the store happens, it should also be more
efficient at run time in cases where the fields aren't assigned with constants.
There's also some code clean-up by removing duplicated logic.
2009-06-06 20:16:13 +02:00
Tomas Lindquist Olsen
b218bfc828
Added missing initializer of (LDC introduced) Expression::cachedLvalue in D2 frontend.
2009-06-03 03:49:24 +02:00
Frits van Bommel
da593c99dc
Remove code duplication for vtable loads and improve instruction naming to make
...
bitcode with virtual calls easier to read.
2009-05-30 13:04:49 +02:00
Christian Kamm
7fd43e8bf7
Error instead of assert on delegate literals as constant expressions.
...
Make function literal linkage internal inside functions and external otherwise.
2009-05-27 19:20:18 +02:00
Frits van Bommel
95c35225bb
Don't print the entire declaration of the alliassee when ->toChars()
is
...
called on an `AliasDeclaration`; just printing the name will do. This fixes
#305 , which otherwise tries to generate
{{{
class E {
void A() {
alias /* recurse into E->toCBuffer() */ m;
}
}
}}}
by way of an infinite recursion (causing a segfault when the stack runs out).
2009-05-20 16:20:59 +02:00
Tomas Lindquist Olsen
f733680251
Try to cut down reallocations when building string literals.
2009-05-18 16:01:22 +02:00
Frits van Bommel
b52ee2de13
Use %La to hex-format a real instead of pretending it's an integer.
2009-05-17 11:06:14 +02:00
Frits van Bommel
a75ddbf803
Specify a large integer constant more portably.
2009-05-17 10:33:21 +02:00
Frits van Bommel
76ae0b0ab6
Fix format-string bugs by adding __attribute__((__format__)) in all applicable
...
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
2009-05-17 00:15:25 +02:00
Tomas Lindquist Olsen
e8780d50e8
Merged DMD 1.045 !!!
2009-05-16 22:21:31 +02:00
Tomas Lindquist Olsen
b147ecc66d
Initial (but disabled) fix for ticket #294 , the actual part that fixes the bug is in a #if 0 block as I'm afraid it will cause regressions. I'm most likely not going to be around tonight, and maybe not tomorrow as well, so I'm pushing it in case someone wants to run some serious testing/investigate the problem noted in llvmhelpers.cpp : realignOffset .
2009-05-14 17:20:17 +02:00
Tomas Lindquist Olsen
f5d635dfc7
Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
2009-05-14 13:26:40 +02:00
Tomas Lindquist Olsen
ecc106d7b7
Fixed dmdfe generated class invariant calls. Also insert proper "this !is null" check before it. Fixed invariant* dstress regressions and generally seems like a good idea. Hope I didn't break anything.. minitests run fine!
2009-05-10 00:46:09 +02:00
Christian Kamm
77100f890c
Make static int[] a = [1, 2]; a[0] = 4; not segfault
...
by making the array data ptr a non-const global variable.
2009-05-03 11:16:54 +02:00
Tomas Lindquist Olsen
f290ff0530
Forgot the special case part in last !ThisExp change.
2009-04-27 13:59:15 +02:00
Tomas Lindquist Olsen
95b94935ee
Moved special casing of 'assert(this, "null this");' generated statements from !ThisExp into !AssertExp.
...
Fixed filenames for array bounds errors and probably others, fixes #271 .
2009-04-27 13:30:48 +02:00
Tomas Lindquist Olsen
ba38e15f0d
Fixed class default initializers and type generation. Bug #260 is fixed.
2009-04-27 03:40:40 +02:00
Tomas Lindquist Olsen
687395cda6
Rewrote runtime struct literal codegen.
2009-04-22 03:08:28 +02:00
Tomas Lindquist Olsen
b3db60cbda
Merge.
2009-04-21 17:54:43 +02:00
Frits van Bommel
e05b960bbe
No need for temporary alloca's here, use a phi node instead.
2009-04-19 19:28:10 +02:00
Tomas Lindquist Olsen
1c79df3817
Fixed all issues preventing Tango 0.99.8 to compile with `sh build-tango.sh --verbose ldc'.
2009-04-17 14:38:29 +02:00
Tomas Lindquist Olsen
9a86f9c0b5
Fixed some minitest regressions.
2009-04-16 19:21:30 +02:00
Tomas Lindquist Olsen
37cf5a5789
Added Doxygen file.
...
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
2009-04-15 20:06:25 +02:00
Frits van Bommel
cc492ecc82
Merge
2009-04-12 22:22:15 +02:00
Christian Kamm
b8b9c41827
Introduce checks to fix #173 .
2009-04-12 14:58:18 +02:00
Frits van Bommel
b5af30636e
Isolate all knowledge of what a function's nested context looks like in a
...
single place. No functional change.
2009-04-12 13:08:24 +02:00
Frits van Bommel
7e99e31b91
Clean up some suspicious code.
...
There's no guarantee a constant of integer type is a ConstantInt, so it's not
safe to just cast<> these to ConstantInt. (It could be a constant expression,
for example)
The code is shorter this way too :).
2009-03-29 03:27:04 +02:00