Commit graph

686 commits

Author SHA1 Message Date
Araq
4f582da27f make tests green again 2012-07-17 01:27:25 +02:00
Araq
8ce1c99d0d work on closures continues; fixed #116 2012-07-13 00:50:56 +02:00
Araq
121d4e0fc2 'addSon' for types deprecated for 'int literal type' analysis 2012-07-09 08:09:00 +02:00
Araq
4fbba0a65a changed integer promotion rules; breaks bootstrapping and lots of code 2012-07-08 21:03:47 +02:00
Araq
2900ceae35 changed integer promotion rules; added math.fmod 2012-06-28 08:33:25 +02:00
Araq
0b509127d2 documentation improvements; added system.gorge (for Araq's fun) 2012-06-22 08:30:55 +02:00
Araq
e0092cfae6 Merge branch 'master' of github.com:Araq/Nimrod 2012-06-19 22:38:48 +02:00
Araq
15dad22a0a first implementation of new lambda lifting 2012-06-15 23:18:52 +02:00
Zahary Karadjov
b11fe5d0b4 more uint related fixes 2012-06-14 17:33:00 +03:00
Zahary Karadjov
e2d38a57ec better support for unsigned integers. 2012-06-11 21:38:01 +03:00
Zahary Karadjov
ce933c90a4 destructor pragma 2012-06-07 03:32:40 +03:00
Zahary Karadjov
65970efd97 destructors for case values 2012-06-07 02:14:25 +03:00
Zahary Karadjov
88f7b7bc50 Merge branch 'master' of github.com:Araq/Nimrod into upstream 2012-06-02 19:52:06 +03:00
Zahary Karadjov
a1da1f987b Added system.staticExec proc for executing external command at compile-time 2012-06-02 19:51:49 +03:00
Zahary Karadjov
337e1ecc7c codegen for user-defined destructors 2012-05-25 19:02:14 +03:00
Araq
848c1b297f added system.||; lacks runtime support 2012-05-23 02:05:28 +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
efb53233cb the foundations of a type traits module; better error messages for expr, typedesc and typeclasses params 2012-04-06 13:46:31 +03:00
Zahary Karadjov
98b7bdaa50 when expressions, proper rendering for nkDo and nkLambda and parser support for x.type and x.addr 2012-04-05 22:43:37 +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
Zahary Karadjov
bc2eb0ea9b generic types can be used like type classes. distinct can be applied to type classes. 2012-03-25 20:55:21 +03:00
Araq
0857efe512 some bugfixes for symbolfiles 2012-03-23 00:16:29 +01:00
Zahary Karadjov
296ef07955 tyOrdinal now means "integral types". tyTypeClass created to take care of type constraints 2012-03-22 16:24:12 +02:00
Zahary Karadjov
7b41b0f841 missed file from the previous commit 2012-03-19 12:14:32 +02:00
Zahary Karadjov
e43f8d842b merged branch overloading-for-macros 2012-03-19 12:06:38 +02:00
Zahary Karadjov
72f2a6e275 the test suite is mostly green again 2012-03-16 05:33:21 +02:00
Araq
4da067691e implemented 'static'; macros do not work anymore 2012-03-15 00:28:28 +01:00
Zahary Karadjov
e5bd3b5b97 bootstraps fine with overloadable templates 2012-03-14 21:00:42 +02:00
Araq
c25ffbf262 first steps for cleaner static/const distinction 2012-03-13 02:01:56 +01:00
Zahary Karadjov
560a3bad28 `do' keyword in the grammar for lambda blocks 2012-02-10 14:50:35 +02:00
Araq
632aece191 further steps to closure support 2012-02-06 00:19:56 +01:00
Araq
2633e3fb27 closure implementation: first steps 2012-02-04 15:47:48 +01:00
Araq
78f4aacde9 pragma blocks; fixed line information issue with user defined assertions 2012-01-17 23:58:18 +01:00
Araq
f58cc49672 niminst: bugfixes; documentation changes 2012-01-15 01:03:57 +01:00
Araq
c682a1da2b bugfix: invalid indentation for 'else' is detected; optional indentation for 'if' expressions 2012-01-13 14:59:58 +01:00
Araq
e362cbbfd7 bugfix: tests/reject/tnoinst.nim is now rejected properly 2012-01-13 13:40:05 +01:00
Araq
0e22a51095 bugfix: removed newSons legacy 2012-01-07 11:10:14 +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
69cc24cdf6 bugfix: the code gen can now handle alias TLock = TSysLock; this fixes threading bugs 2011-12-23 00:17:59 +01:00
Araq
cd83cc81aa code gen can generate code to keep alive stack roots 2011-12-22 15:04:00 +01:00
Araq
2962ca7890 alias analysis as required for the code gen and the HLO 2011-12-08 23:21:08 +01:00
Araq
70cf34cbdc 'assert' is now implemented without compiler magic 2011-12-04 20:14:50 +01:00
Araq
7fcbdc6d42 implemented 'let' statement 2011-11-29 17:27:48 +01:00
Araq
2de98d9e05 new pragma: 'noinit' 2011-11-25 15:33:58 +01:00
Araq
72651de710 bugfix: 'when' sections in generic objects now work, so TThread[void] compiles 2011-11-20 16:13:03 +01:00
Zahary Karadjov
12bac28d23 macros and templates can be expanded anywhere where a type is expected.
This allows for various type selection algorithms to be implemented.
See tests / accept / compile / ttypeselectors.nim for examples.
2011-11-18 02:11:15 +02: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
Zahary Karadjov
b72480ec88 new kind of AST printer that prints indented trees
AST-to-string conversion procs renamed to repr, treeRepr and lispRepr for better consistency
new dumpTree and dumpLisp procs for quick AST inspection of arbitrary nimrod blocks
2011-11-04 04:56:40 +02:00