Commit graph

279 commits

Author SHA1 Message Date
Araq
42516c0086 code generator supports constant sequences; more consistent compile time evaluation 2011-10-07 09:02:08 +02:00
Araq
72ceda98cb implemented optional pragma for implicit discard 2011-09-24 13:55:24 +02:00
Araq
033e3dfc50 l-values are preserved modulo type distinction 2011-09-24 13:15:11 +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
257b16ca34 inlining of 'var openarray' iterators now work 2011-08-18 18:52:05 +02:00
Araq
a0d172cd85 bugfix topenarrayrepr works again 2011-08-16 21:24:30 +02:00
Araq
b0742c5b27 finally got rid of nkPassAsOpenArray 2011-08-16 08:56:53 +02:00
Araq
2183bf77a6 added xmltree.innerText; fixes #49 2011-08-15 19:40:00 +02:00
Araq
5131b3cea4 support for C++ code generation; importcpp and importobjc pragmas 2011-08-07 21:02:09 +02:00
Araq
f0145ba7c5 anonymous procs implemented; however no closure support yet 2011-08-01 08:39:27 +02:00
Araq
3e806a374a 'var T' for iterators 2011-07-31 22:39:17 +02:00
Araq
6a8a409f1b preparation for new 'is' operator; breaks bootstrapping again, sorry (use generated C code) 2011-07-31 00:21:32 +02:00
Araq
2f066395ba bugfixes; step one for 'var T' as return type support 2011-07-28 00:53:52 +02:00
Araq
99bcc233cd bugfix: 'set' overloadable; further steps for multi threading support 2011-07-08 01:29:15 +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
3e91b456e5 second attempt to fix code gen for pegs.nim 2011-06-26 23:55:47 +02:00
Araq
aa14667ca1 bugfix: pegs.nim compiles again 2011-06-26 22:43:38 +02:00
Araq
e25384db89 improvements to get code size down for programs that don't use GC 2011-06-26 20:17:19 +02:00
Araq
4fa80956b8 compiler can emulate thread local variables 2011-06-15 02:09:02 +02:00
Araq
9f9f0f0818 basic thread analysis working 2011-06-13 16:22:19 +02:00
dom96
8b98ba9a63 Added typeinfo module 2011-06-09 22:23:29 +01:00
Araq
958961bd8d overloading of [] for derefence operation should be possible now 2011-06-05 13:59:41 +02:00
Araq
24ed9d560f threads clean up their heap 2011-06-04 23:55:10 +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
d2e2d71d05 newStringOfCap implemented and used to optimize some procs 2011-05-08 17:38:34 +02:00
Araq
145fabeb67 const table support 2011-04-29 22:55:15 +02:00
Araq
cd292568d7 big repo cleanup 2011-04-12 01:13:42 +02:00
Renamed from rod/ccgexprs.nim (Browse further)