Commit graph

469 commits

Author SHA1 Message Date
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)