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
Araq
bd2d146c77
got rid of tyPureObject; broke bootstrapping; use generated C code
2011-09-24 09:35:00 +02:00
Araq
6023e994fb
beginning of a taint mode; type system enhancements
2011-09-24 00:46:41 +02:00
Zahary Karadjov
91351e5996
Initial implementation of the parseExpr, parseStmt, getAst macro routines:
...
proc parseExpr*(s: string) : expr {.magic: "ParseExprToAst".}
## Compiles the passed string to its AST representation
## Expects a single expression
proc parseStmt*(s: string) : stmt {.magic: "ParseStmtToAst".}
## Compiles the passed string to its AST representation
## Expects one or more statements
proc getAst*(macroOrTemplate: expr): expr {.magic: "ExpandMacroToAst".}
## Obtains the AST nodes returned from a macro or template invocation
## example:
## macro FooMacro() =
## var ast = getAst(BarTemplate())
Handling of the node.toYaml magic moved to the evaluation engine.
2011-09-20 14:13:45 +03:00
Zahary Karadjov
d541815e4b
Added AST introspection routines as a part of the standard library
2011-09-20 14:13:45 +03:00
Araq
fd62116f6e
bugfixes for generics; new threads implementation still broken
2011-09-20 00:56:48 +02:00
Araq
b0742c5b27
finally got rid of nkPassAsOpenArray
2011-08-16 08:56:53 +02:00
Araq
72e7a98543
added system.slurp for easy embedding of resources
2011-08-10 00:43:58 +02:00
Araq
5131b3cea4
support for C++ code generation; importcpp and importobjc pragmas
2011-08-07 21:02:09 +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
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