Christian Kamm
b172c4a668
Fix RawVarDecl double codegen bug. Thanks to downs for the testcase.
2008-11-18 18:07:57 +01:00
Tomas Lindquist Olsen
c4c1c1d72e
Added initial D2 support, D2 frontend and changes to codegen to make things compile.
2008-11-11 01:38:48 +01:00
Christian Kamm
fe49ee6448
Special case DtoCastInt for bool.
2008-11-10 20:55:24 +01:00
Tomas Lindquist Olsen
173639bdec
Added DtoRawVarDeclaration routine to handle special variables in some statements.
2008-11-01 18:25:10 +01:00
Tomas Lindquist Olsen
a52f0330d0
Implemented first class delegates. closes #101
2008-10-22 21:50:08 +02:00
Tomas Lindquist Olsen
f7ea1da010
Removed TypeOpaque from DMD.
...
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
2008-10-22 14:55:33 +02:00
Christian Kamm
0fe7297fba
Add missing case to DtoAssign for T[n] = T[]. Fixes downs' initializer bug.
2008-10-16 22:36:26 +02:00
Tomas Lindquist Olsen
180487b614
Fixed issue with accessing a WithStatement context from inside a nested function. see mini/with2.d
...
Renamed some LLVM uses of ::create statics to ::Create , lower case ones will be deprecated soon.
2008-10-14 13:21:14 +02:00
Christian Kamm
6cb213badf
Only allocate the module file name once. Fixes #90 .
2008-10-12 10:35:16 +02:00
Tomas Lindquist Olsen
ed7dd481e5
Fixed dynamic array -> boolean. does (arr.ptr !is null) now instead of (arr.length != 0)
2008-10-08 22:38:52 +02:00
Tomas Lindquist Olsen
e109025c00
Removed some checks for abstract llvm types that were too strict, a 'opaque* null' is a valid initializer... when structs in D can be just a forward reference.
2008-10-06 14:37:00 +02:00
Christian Kamm
2a999b72e8
Fix VarDecls for tuples. Closes #99 .
...
I've implemented it this way since it doesn't require any changes in the
frontend. However, I think having TypeTuple expressed as LLVM struct types
would make much more sense and open the door to tuple lvalues.
2008-10-05 11:47:47 +02:00
Christian Kamm
b3d4bc83f8
Move check for access of context for nested class from backend into frontend.
2008-10-02 23:12:19 +02:00
Tomas Lindquist Olsen
bce9368514
Updated to latest LLVM trunk, function notes have been removed and merged with parameter attributes, which have been renamed to just attributes. Nothing seems to have broke!
2008-10-01 23:17:14 +02:00
Tomas Lindquist Olsen
bcafbe169d
Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested.
...
Commented some logging calls that could potentially write out many megabytes of type dumps.
2008-10-01 18:32:31 +02:00
Christian Kamm
bb47b7c4ce
Backed out changeset 1b62222581fb
...
Do not use i8 for bool. Instead rely on the target to store i1 as i8.
2008-09-21 14:45:41 +02:00
Christian Kamm
4b02533745
Change bool type to i8
2008-09-20 10:13:15 +02:00
Christian Kamm
e0635f1707
Allow VarDecl inside AttributeDecl inside DeclExp.
...
Fixes run/e/extern_10_D
2008-09-12 13:11:32 +02:00
Tomas Lindquist Olsen
8e9b957bce
Complex number should now follow the D ABI on x86. They're also treated as first class values now. Big change.
2008-09-09 16:49:47 -07:00
Tomas Lindquist Olsen
f411df11e3
Fixed choosing default target machine without needing to link in targets.
2008-09-07 17:44:25 -07:00
Tomas Lindquist Olsen
2e1a2bfe4a
Fixed problem with parameterized intrinsics taking bools.
2008-08-20 19:01:56 +02:00
Tomas Lindquist Olsen
5bf3e8911a
Added support for overloaded intrinsics.
...
Added atomic intrinsics in the intrinsics.di header.
2008-08-20 01:02:22 +02:00
Christian Kamm
8efde8d38d
Do not assert if there's a struct-this nested context.
2008-08-13 20:50:54 +02:00
Tomas Lindquist Olsen
aae027961c
merge
2008-08-13 15:43:34 +02:00
Tomas Lindquist Olsen
0eeedba887
Fixed problems constant multidimensional static array initializers.
2008-08-13 15:43:13 +02:00
Christian Kamm
57cd1b4445
Get rid of 'static function cannot access nested' error. It is caught again later.
2008-08-12 19:48:42 +02:00
Tomas Lindquist Olsen
9d7f16b967
Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
...
Reimplemented support for nested functions/class using a new approach.
Added error on taking address of intrinsic.
Fixed problems with the ->syntaxCopy of TypeFunction delegate exp.
Removed DtoDType and replaced all uses with ->toBasetype() instead.
Removed unused inplace stuff.
Fixed a bunch of issues in the runtime unittests, not complete yet.
Added mini tests.
2008-08-10 08:37:38 +02:00
Christian Kamm
4ee26b350a
Forgot return in DtoInitializer
2008-08-07 18:17:59 +02:00
Christian Kamm
f7cd3cf969
Move zero init of padding to DtoInitializer in order to respect void initializers.
2008-08-07 18:15:27 +02:00
Christian Kamm
14c3e022e4
Use llvmdc helpers for store and bitcast in fp80 padding init code.
2008-08-05 20:23:44 +02:00
Christian Kamm
b2efd0d317
Zero out padding of fp80.
2008-08-05 20:10:12 +02:00
Christian Kamm
8362b86c5a
Move AllocaInst creation into DtoAlloca helper. Will enable special zero-init of fp80 reals' padding.
2008-08-05 19:28:19 +02:00
Tomas Lindquist Olsen
daad516579
Removed the 'needsstorage' thing from Dsymbol. Arguments are not always given storage when applicable. This is not longer treat specially
...
in this regard. Code for accessing nested variables and contexts rewritten. Probably more. Fairly well tested.
2008-08-04 02:59:34 +02:00
Tomas Lindquist Olsen
0251a1e720
Fixed regressions
2008-08-02 01:23:53 +02:00
Tomas Lindquist Olsen
e31070a437
Fixed problems with nested 'this'. Fixes #39 .
...
Fixed problem with debug info order of intrinsic calls (func.start after declare).
2008-08-02 00:50:39 +02:00
Tomas Lindquist Olsen
9b45fc5533
Changed the handling of variadic intrinsics a bit.
...
Removed the -fp80 option and made real be 80bit floats on X86, this is what the D spec really says it should be and fixes a bunch of issues.
Changed the handling of parameter attributes to a bit more generalized approach.
Added sext/zext attributes for byte/short/ubyte/ushort parameters, fixes #60 .
Parameter attribs now properly set for intrinsic calls if necessary.
Made the tango.math.Math patch less intrusive.
Fixed/added some mini tests.
2008-08-01 17:59:58 +02:00
Christian Kamm
8f14ece3af
Move DtoArrayBoundsCheck from llvmhelpers to arrays.
2008-07-31 19:14:49 +02:00
Christian Kamm
fcd784d14f
Forgot a ->toBasetype() in the array bound code.
...
Fixes compile/typedef_05.
2008-07-30 20:25:46 +02:00
Christian Kamm
5b5d7404b4
Insert array bound checks for slices.
2008-07-30 19:02:13 +02:00
Christian Kamm
7882f4858e
Enable array bounds check and emit them in IndexExp.
2008-07-30 18:38:56 +02:00
Tomas Lindquist Olsen
905ca019dd
Added type param to DVarValue as DMD sometimes overrides the type of the VarDeclaration.
...
Added support for align(1)/packed structs, other alignments are still ignored.
Fixed some problems with accessing lazy arguments.
2008-07-30 10:12:55 +02:00
Christian Kamm
3b21ae25be
Move DeclarationExp code into a helper function so it can call itself for template mixin members.
2008-07-30 09:21:06 +02:00
Christian Kamm
caa61a5523
Error if static array is cast to an array such that oldarraysize % newelemsize != 0.
2008-07-29 12:32:01 +02:00
Tomas Lindquist Olsen
20d429e085
Fixed delegate casts.
2008-07-28 08:05:21 +02:00
Christian Kamm
907a03a3be
Give error messages for invalid casts.
...
This required passing Loc information to certain functions.
Fixes nocompile/b/bug_cgcs_354_A/B.
2008-07-26 17:19:16 +02:00
Tomas Lindquist Olsen
d583262c98
[svn r394] Fixed the new DtoNullValue function
2008-07-15 15:16:56 +02:00
Christian Kamm
625f28814d
[svn r393] Started implementation for DtoNullValue.
2008-07-15 14:53:16 +02:00
Christian Kamm
1486f29abb
[svn r391] Fix classes nested inside functions for real.
2008-07-15 10:23:50 +02:00
Tomas Lindquist Olsen
86a3f53cfe
[svn r386] Fixed broken DtoBoolean.
...
Some code cleanup.
2008-07-15 00:17:03 +02:00
Tomas Lindquist Olsen
27674069e7
[svn r384] Some minor code cleanups.
2008-07-14 21:49:54 +02:00