Commit Graph
328 Commits
Author SHA1 Message Date
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
Frits van Bommel 5c29832ee7 Fix a bug pointed out by valgrind: OutBuffer::write4() was writing 8 bytes on
platforms with 64-bit longs.
2009-05-08 12:21:53 +02:00
Tomas Lindquist Olsen ca4f588c08 Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 . 2009-05-07 02:10:29 +02:00
Christian Kamm 9812a8c8ae Commit workaround for TypeFunction comparing issue. 2009-04-30 23:16:21 +02:00
Frits van Bommel da4450d2f5 Make sure this still compiles after LLVM r70437, which introduces a
specialization for command-line option template parser<char> which does the
wrong thing for us...
2009-04-30 12:25:04 +02:00
Tomas Lindquist Olsen ca39bb4f4d Fixed array operation codegen when used from imported templates. All array operations are now emitted with template linkage. Fixed #270 . 2009-04-29 18:59:39 +02:00
Christian Kamm 0485196ae8 Fix parsing of import statements to only pass valid identifiers to Import
constructor. Fixes #264.
2009-04-23 20:44:55 +02:00
Christian Kamm a38d34dead Trivial fix for bug #265 2009-04-23 20:28:29 +02:00
Kelly Wilson d21cdb1df0 Changes for mingw to compile properly 2009-04-22 14:49:49 -06: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 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
Tomas Lindquist Olsen 3d1f8cc565 Merged DMD 1.042. 2009-04-03 17:59:34 +02:00
Tomas Lindquist Olsen 57bf95cb42 Moved some DMDFE files into a seperate dmd/root subdir to closer match the DMD file structure since 1.041. 2009-04-03 17:02:52 +02:00
Frits van Bommel b7b54b5878 Don't expand tilde ('~') in paths unless it's the first character of the path
in question.
This should fix #255.
2009-04-03 16:35:47 +02:00
Tomas Lindquist Olsen 9c4b2b4036 Started seperating type resolution from the rest of codegen again, the merge had too many regressions. 2009-04-03 16:34:11 +02:00
Christian Kamm 8d01068c9b Apply small includes patch for FreeBSD. Thanks kimelto! 2009-04-02 19:16:44 +02:00
Tomas Lindquist Olsen c6e9f7f9e2 Moved ir/irtype.* into ir/irdtype.*.
Renamed IrType to IrDType, analogous to IrDSymbol.
2009-03-31 20:21:28 +02:00
Frits van Bommel aa8aad611c Commit requested by lindquist. 2009-03-31 03:06:19 +02:00
Frits van Bommel 972fca5729 Fix #246 by running type->semantic() on parameters so tuples are expanded. 2009-03-29 23:57:51 +02:00
Christian Kamm c9b82af9f2 Add newlines to end of file. 2009-03-29 19:19:32 +02:00
Frits van Bommel e129494812 Allow specific optimization passes to be requested from the command line.
Now you can run "`ldc test.d -c -mem2reg -simplifycfg`" if you feel the urge.
The -O<N> options are still supported, and are inserted in the passes list in
the position where they appear on the command line.
(so -simplifycfg -O1 -instcombine does the "right thing")

One small change: -inline is renamed to -enable-inlining due to a naming
conflict with the option to add the -inline pass. -inline now inserts the
inlining pass in the position specified, not in the middle of -O<N>.
(ldmd has been updated to translate -inline to -enable-inlining)
2009-03-29 15:46:55 +02:00
Christian Kamm f179acda32 Automated merge with http://hg.dsource.org/projects/ldc 2009-03-29 11:44:32 +02:00
Christian Kamm d7de486493 A different fix to #218 and DMD2682 that does not lead to constant folding regressions.
Fixes run/const_15, run/c/const_16_B.
The price is removing the lvalueness of struct literals. If it turns out too
much code depends on this behavior or we don't want to break with DMD, we
could keep struct literals as lvalues and instead convert struct literals used
as expression initializers into struct initializers.
2009-03-29 11:43:45 +02:00
Frits van Bommel 2586278349 This should fix integers below 64 bit on big-endian systems. 2009-03-29 01:29:30 +01:00
Christian Kamm 875a8b25b2 Fix bug in CaseStatement::semantic when there's no enclosing switch. 2009-03-28 21:10:53 +01:00
Christian Kamm b2e601bd74 Add back some enclosing scope-exit information to the frontend to produce
proper error messages inside switch statements.
2009-03-28 14:39:16 +01:00
Christian Kamm 99168f443f Fix goto inside synchronized functions. 2009-03-28 14:26:23 +01:00
Tomas Lindquist Olsen 1809214995 Added support for single D type register return from __asm. 2009-03-28 07:24:53 +01:00
Tomas Lindquist Olsen 99b863e2b1 Added initial support for raw LLVM inline asm. 2009-03-28 06:32:06 +01:00
Tomas Lindquist Olsen 36f6ebc77f - Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM.
- Eliminated the DLRValue DValue.

- Implemented proactive handling of l-value CastExpS.

- Minor tweak in runtime memory.d .
2009-03-28 05:00:43 +01:00
Tomas Lindquist Olsen ec986231e5 Eliminated the need for resolve, declare, const-init and define lists to drive code generation. 2009-03-27 21:50:32 +01:00
Tomas Lindquist Olsen daef67acc3 Changed use of toObjFile to a new codegen method.
More versioning of DMD specific codegen code.
2009-03-27 17:54:27 +01:00
Tomas Lindquist Olsen c42c90ea80 * Moved ir/irsymbol.cpp/h into ir/irdsymbol.cpp/h.
* Added #if IN_DMD versioning around DMD backend specific code in the D1 frontend, D2 is currently broken.
* All part of a greater cleanup scheme.
2009-03-26 20:45:53 +01:00
Christian Kamm 31b46683e8 Fix to synchronized function storage class when getting the classinfo via dotExp. 2009-03-25 08:13:01 +01:00
Christian Kamm 671c7791e3 Reorganize EnclosingHandlers to require less changes to the frontend and allow us to
implement the synchronized storage class for functions.
2009-03-24 21:18:18 +01:00
Tomas Lindquist Olsen 3ac45285fc Cleanup DMD 1.041 merge. 2009-03-23 20:26:33 +01:00
Christian Kamm 372b40dd94 Fix tuple declarations in aggregates. 2009-03-23 14:47:51 +01:00
Frits van Bommel 434cb74980 Fix a bug where ::warning() was called with a va_list argument instead of an
actual vararg list.
Also cleaned up the format for warnings. (Previously some would start with
"warning - warning - Warning:" which was a bit redundant)
2009-03-18 15:03:17 +01:00
Frits van Bommel bc9fae17a8 Another "pointers are 32 bits" issue in the frontend. long/ulong constants cast
to pointers were truncated to 32-bit values.

Closes #234.
2009-03-15 15:58:38 +01:00
Kelly Wilson 2a396614ad Fix 32bit "+2" typo for Outbuffer::reserve 2009-03-13 07:17:29 -06:00
Kelly Wilson ff33ed6d74 Revert removal of "+2" from Outbuffer::reserve function for x64. Unless
somone can fix this properly, then the "+2" must stay in or tango won't
build.
2009-03-12 17:10:24 -06:00
Tomas Lindquist Olsen 8b751cce0e - Updated to DMD frontend 1.041.
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
2009-03-12 20:37:27 +01:00
Frits van Bommel 3f89a04f27 Make sure instantiations of template intrinsics are marked as intrinsics. 2009-03-10 12:12:24 +01:00
Christian Kamm fc5f35c410 Automated merge with http://hg.dsource.org/projects/ldc 2009-03-08 16:22:06 +01:00
Christian Kamm 13e83bf1c1 Improved template emission control for singleobj building. 2009-03-08 16:21:56 +01:00
Frits van Bommel 622a93a810 Make LDC work with LLVM trunk (s/LinkOnceLinkage/LinkOnceOdrLinkage/)
Also moved the #defines for linkage types into a separate header instead of
mars.h so we can #include revisions.h without having to rebuild the entire
frontend every time we update.
(I'm using revisions.h to get the LLVM revision for use in preprocessor
conditionals. It should work with LLVM release 2.5, old trunk and new trunk)
2009-03-08 16:13:10 +01:00
Christian Kamm 95f12f04f1 Add '-singleobj' command line switch that will tell LDC to link LLVM modules internally and only emit a single object file.
The switch allows the optimizer and inliner to run on all modules at once and opens the door for template instantiation improvements that should lower compile time and executable size.
2009-03-07 19:38:00 +01:00
Christian Kamm ed9591d81f Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the
same LDC call.
2009-03-07 14:25:30 +01:00
Tomas Lindquist Olsen c3a53c0128 Added hasUnalignedFields helper to check if a type has unaligned fields - as per request from fvbommel. Result is cached in TypeStruct. 2009-03-03 15:08:26 +01:00
Tomas Lindquist Olsen 6778f06dfe Fixed #218 by disabling the problematic optimization. 2009-03-03 04:41:11 +01:00