Commit graph

182 commits

Author SHA1 Message Date
Araq
fedc69f61a unused constants are optimized away 2011-11-22 18:48:00 +01:00
Zahary Karadjov
489340658e Added system.program_results for controlling the exit code of the program under normal circumstances
Implemented operators like +=, -=, etc for ordinals, floats and string

Programs using the UnitTest module will now report the number of failed tests as the exit code of test runs (0 for successful run)
2011-11-10 04:10:03 +02:00
Araq
c517639155 lazy loading of body ast implemented 2011-10-30 20:53:04 +01:00
Araq
299390a585 constant folding for cnst[i] and cnst.attr 2011-10-29 23:54:50 +02:00
Araq
abe9dfafe8 compilation cache: DLL interfacing now works 2011-10-27 18:02:01 +02:00
Araq
627d33da08 compilation cache: small fixes; methods still not working 2011-10-23 21:39:02 +02:00
Araq
dce8d3d1ab rod files: next trivial examples working 2011-10-22 22:49:51 +02:00
Araq
182ab85dc8 trivial change scenario works with symbol files 2011-10-22 01:51:30 +02:00
Araq
ddbad192a4 got rid of gToTypeInfoId 2011-10-21 21:39:12 +02:00
Araq
d871cadbb3 got rid of gGeneratedSyms 2011-10-21 21:02:03 +02:00
Araq
43eace163a further steps for incremental C code generation 2011-10-21 19:07:01 +02:00
Araq
a6f90d4cdd first steps to C file merge operation for incremental compilation 2011-10-21 01:06:24 +02:00
Araq
7ebaf44897 bugfixes for ROD file generation; nimcache dir is now flat 2011-10-20 09:06:05 +02:00
Araq
4de84024e5 much more efficient rod file generation 2011-10-18 17:21:51 +02:00
Araq
72ceda98cb implemented optional pragma for implicit discard 2011-09-24 13:55:24 +02:00
Zahary Karadjov
0b197ade6c Multiple C lines corresponding to a single nimrod line are joined together
This patch greatly improves the "step over" operation available in debuggers.
In practice, there are often 4-8 lines of C code generated for each nimrod line
Each such line will be responsible to a single step in the debugger that is
a) not expected by the user
b) taking the user to an incorrect line in the nimrod code

To keep this working, all code generation should use the rope formatting
facilities when producing new lines (i.e. $n and $N).
New semantics for the format string are introduced:
$n means "soft new line" that could be joined/broken when lineDir is enabled.
$N means "hard new line" that will always appear as a new line.

As an alternative to this approach, I also tested producing code like this:
#line "code.nim" 154
foo = bar; \
foo(bar) \

This is better for readability of the final output, but unfortunately it didn't
produce the desired result across all compilers/debuggers.
2011-09-20 14:11:06 +03:00
Zahary Karadjov
0f0dfd6379 Nimrod can now compile itself with --lineDir enabled 2011-09-20 14:11:06 +03:00
Araq
5131b3cea4 support for C++ code generation; importcpp and importobjc pragmas 2011-08-07 21:02:09 +02:00
Araq
6781da5215 bugfix: forwarding of generic procs now works 2011-07-30 10:42:51 +02:00
Araq
2f066395ba bugfixes; step one for 'var T' as return type support 2011-07-28 00:53:52 +02:00
Araq
569c1ce5ec bugfix: proper cache for generic instantiations 2011-07-21 00:57:39 +02:00
Araq
3091bc4958 importCompilerProc pragma introduced because the hacks for typeinfo.nim did not suffice 2011-06-27 08:33:03 +02:00
Araq
990dc2d715 code gen bugfixes; marshal.nim implemented 2011-06-26 17:21:52 +02:00
Araq
4fa80956b8 compiler can emulate thread local variables 2011-06-15 02:09:02 +02:00
Araq
ade67f1abc intsets are now a proper module and part of the stdlib 2011-06-14 01:36:49 +02:00
Araq
922e216b86 got rid of nstrtabs and nhashes modules 2011-06-10 22:49:06 +02:00
Araq
3260702a60 first steps to thread local heaps 2011-06-02 13:02:40 +02:00
Araq
67a30d8371 further steps for thread support; bootstrapping should require unzip C sources and ./build.sh 2011-05-16 00:27:47 +02:00
Araq
3e9dcc8be5 deprecated system.copy: use system.substr instead 2011-05-14 01:13:44 +02:00
Araq
73c3551766 gc tweaking to gain a few percent of performance 2011-05-07 22:13:24 +02:00
Araq
36c67455d4 got rid of some arcane module names 2011-04-21 00:54:44 +02:00
Araq
cd292568d7 big repo cleanup 2011-04-12 01:13:42 +02:00
Renamed from rod/cgen.nim (Browse further)