Commit graph Nim/compiler/ccgtypes.nim
Author SHA1 Message Date
Araq
b9afdffb3e fixes #178 2012-07-28 16:37:31 +02:00
Araq
538b06a123 implements #173 2012-07-28 14:16:08 +02:00
Zahary Karadjov
4841b6390c removed nimdat in favor of per-module dat init procs 2012-07-19 19:43:58 +03:00
Araq
540e244cf7 bugfix: name mangling of field names 2012-07-19 18:06:43 +02:00
Araq
39235e21f5 bugfixes for the symbol mangling; implements #129 2012-07-19 17:38:52 +02:00
Araq
121d4e0fc2 'addSon' for types deprecated for 'int literal type' analysis 2012-07-09 08:09:00 +02:00
Araq
d1c84328a7 fixes #145 2012-06-21 18:51:19 +02:00
Zahary Karadjov
e2d38a57ec better support for unsigned integers. 2012-06-11 21:38:01 +03:00
Araq
b5d8e8bfaa '+=' etc for all floating point types 2012-05-29 00:42:28 +02:00
Araq
7a249eb8c1 bugfix: field names of tuples are treated consistently in the C backend 2012-05-27 14:57:12 +02:00
Zahary Karadjov
8319e2411d fixed incorrect C++ code generation for sequences. more revealing type names in the generated code 2012-04-18 19:50:32 +03:00
Zahary Karadjov
38710b614f more Objective-C and C keywords are now escaped 2012-04-18 19:50:32 +03:00
Araq
17d67ab828 fixes #105 2012-04-16 16:31:15 +02:00
Zahary Karadjov
f25c638dc4 experimental support for preserving local variable names in the generated code 2012-04-13 21:03:49 +03:00
Zahary Karadjov
8d698b2bdd Merge branch 'master' of github.com:Araq/Nimrod into upstream 2012-03-31 18:51:11 +03:00
Zahary Karadjov
22dc76a361 typedesc and expr params
types are now valid proc/template/macro params and you can overload over them:
proc foo(T: typedesc)        # accept any type
proc foo(T: typedesc{int}) # overload specifically for int
proc foo(T: typedesc{int or float or Callable}) # overload for any type matching the constraints

expr{type} is a param expecting compile time value of the designated type (or type class).

when typedesc or expr params are used with a proc, the proc will be instantiated once
for each unique type/value used as parameter.
2012-03-31 18:50:48 +03:00
Araq
1af0601011 bugfix #100 again 2012-03-28 16:43:05 +02:00
Araq
03ba0f3e25 implemented marker procs for the GC resulting in huge speedups 2012-03-21 23:10:56 +01:00
Araq
161f6f7229 further steps for closure support 2012-02-06 08:44:18 +01:00
Araq
632aece191 further steps to closure support 2012-02-06 00:19:56 +01:00
Zahary Karadjov
c3e790b1ed fixes #87 2012-02-03 03:23:43 +02:00
Araq
8ed3e295a3 niminst: diverse improvements; fixes #80 2012-01-13 21:15:00 +01:00
Araq
8aa4e46707 implemented incompleteStruct pragma; embedded debugger works with posix module 2012-01-05 00:46:51 +01:00
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Araq
7fcbdc6d42 implemented 'let' statement 2011-11-29 17:27:48 +01:00
Araq
61792dc7d6 cgen: no type canon for integral types; osproc use posix_spawn instead of fork&exec 2011-11-18 00:29:56 +01:00
Araq
abe9dfafe8 compilation cache: DLL interfacing now works 2011-10-27 18:02:01 +02:00
Araq
ddbad192a4 got rid of gToTypeInfoId 2011-10-21 21:39:12 +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
92543a3037 more fixes to get rid of tyPureObject 2011-09-24 11:50:46 +02:00
Araq
98e5beb936 got rid of akPureObject 2011-09-24 10:57:35 +02:00
Araq
bd2d146c77 got rid of tyPureObject; broke bootstrapping; use generated C code 2011-09-24 09:35:00 +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
Araq
dce8949b9b bugfix: 'final' not passed to generic 2011-07-29 01:25:05 +02:00
Araq
2f066395ba bugfixes; step one for 'var T' as return type support 2011-07-28 00:53:52 +02:00
Araq
5c94a9e1ae tests are green again 2011-06-28 01:31:53 +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
990dc2d715 code gen bugfixes; marshal.nim implemented 2011-06-26 17:21:52 +02:00
Araq
18bec94e22 bugfix: typeinfo generation for tuples 2011-06-19 15:47:10 +02:00
Araq
ade67f1abc intsets are now a proper module and part of the stdlib 2011-06-14 01:36:49 +02:00
Araq
6ff8752be5 cleaned up the tests; fixes #30; fixes #26 2011-05-01 20:11:55 +02:00
Araq
145fabeb67 const table support 2011-04-29 22:55:15 +02:00
Araq
48dd9679bd := templatable; lexer improvements 2011-04-17 20:17:45 +02:00
Araq
cd292568d7 big repo cleanup 2011-04-12 01:13:42 +02:00
Renamed from rod/ccgtypes.nim (Previous history)