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
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
90db9171a2
compilation cache: various bugfixes; works for the compiler itself
2011-10-27 00:41:42 +02:00
Araq
9fb36bd20c
compilation cache: mostly working; generics not yet
2011-10-25 15:26:36 +02:00
Araq
9fb97e24bf
compilation cache: multi methods now work
2011-10-24 00:56:47 +02:00
Araq
dce8d3d1ab
rod files: next trivial examples working
2011-10-22 22:49:51 +02:00
Araq
4de84024e5
much more efficient rod file generation
2011-10-18 17:21:51 +02:00
Araq
51e01879ba
'bind' as a declarative statement
2011-10-10 02:04:15 +02:00
Araq
c138cc36b4
new syntactic construct: a{i}
2011-10-08 02:14:42 +02:00
Zahary Karadjov
e3deb5b502
Cleaned up the circular dependecies and remaining issues
...
Changed: The []= operator for strings and sequences is now capable of splicing
2011-10-07 17:10:04 +03:00
Zahary Karadjov
22546c44d1
Basic unit testing facilities (suites, fixtures, cases)
...
Added: PNimrodNode.lineinfo for better error messages from macros
Added: seq.splice
For easier use from templates and macros, except stament now supports
the list of exception types to be supplied in nkBraket node (array literal).
2011-10-07 17:07:18 +03:00
Araq
42516c0086
code generator supports constant sequences; more consistent compile time evaluation
2011-10-07 09:02:08 +02:00
Araq
485c371942
renamed optional to discardable
2011-09-24 19:18:08 +02:00
Araq
72ceda98cb
implemented optional pragma for implicit discard
2011-09-24 13:55:24 +02:00