Commit Graph

4215 Commits

Author SHA1 Message Date
coffeepots
43b1ac07d4 Fix typo in "out of bounds" error message 2018-05-18 18:37:28 +01:00
Yuriy Glukhov
6c0185d4b7 Allow better optimisations by removing NOINLINE from module init procs 2018-05-16 19:56:30 +02:00
Andreas Rumpf
c73cd5349e documentation generator works again 2018-05-15 10:03:06 +02:00
Andreas Rumpf
5bf6ad9fa3 make tests green on Unix 2018-05-15 01:39:56 +02:00
Araq
02b78d3f94 make tests green again 2018-05-14 21:38:18 +02:00
Araq
5526252fa0 fixes testament compilation 2018-05-14 17:45:44 +02:00
Andreas Rumpf
328e7a1005 options.nim: no global variables anymore 2018-05-13 17:52:21 +02:00
Andreas Rumpf
297038f704 move more globals into the config object 2018-05-13 14:19:42 +02:00
Andreas Rumpf
e4c088721a make nimsuggest compile again 2018-05-13 09:53:00 +02:00
Andreas Rumpf
dc4aa47c29 bootstrapping works 2018-05-13 09:07:11 +02:00
Andreas Rumpf
342e50e26c compiler compiles again; simple programs do work 2018-05-13 08:51:11 +02:00
Andreas Rumpf
8ca5b71c6a the remaining passes all compile again 2018-05-13 00:45:52 +02:00
Andreas Rumpf
1284827df2 C code generator compiles again 2018-05-12 23:45:51 +02:00
Andreas Rumpf
050789a8f4 sem pass compiles again 2018-05-12 21:30:42 +02:00
Andreas Rumpf
dd35111ff2 semstmts compiles again 2018-05-12 19:45:19 +02:00
Andreas Rumpf
ce859d8c16 more modules compile again 2018-05-12 16:35:59 +02:00
Andreas Rumpf
05724645f8 more modules compile again 2018-05-12 11:58:44 +02:00
Andreas Rumpf
fedc136985 transf and vmgen compile again 2018-05-12 09:38:41 +02:00
Andreas Rumpf
1310279691 lambda lifting compiles again 2018-05-12 08:30:55 +02:00
Andreas Rumpf
bb8c47b496 pragmas compiles again 2018-05-11 18:53:18 +02:00
Andreas Rumpf
84bc04ba32 sigmatch compiles again 2018-05-11 18:04:11 +02:00
Andreas Rumpf
efc2ce1b7e docgen compiles again 2018-05-11 16:06:36 +02:00
Andreas Rumpf
3c4ceea427 move more global variables into ConfigRef 2018-05-11 15:28:26 +02:00
Andreas Rumpf
a8a544a8f7 avoid more global variables 2018-05-11 15:01:28 +02:00
Andreas Rumpf
2e76a92fe1 sempass2 compiles again 2018-05-11 14:18:39 +02:00
Andreas Rumpf
7eb39d9d26 guards.nim does compile 2018-05-11 13:07:16 +02:00
Andreas Rumpf
e1a921ce4f lookups compiles again 2018-05-10 15:05:05 +02:00
Andreas Rumpf
a6e53ec47b semfold compiles again 2018-05-10 14:38:12 +02:00
Andreas Rumpf
5bf31fcabe big refactoring: mores stuff compiles 2018-05-10 13:39:23 +02:00
Andreas Rumpf
0d56dd4677 big refactoring: magicsys compiles again 2018-05-10 13:12:42 +02:00
Andreas Rumpf
61e57cfa13 big refactoring: parser compiles again 2018-05-10 10:49:51 +02:00
Oscar Nihlgård
7cf87dfac6 VM fix for refs 2018-05-08 17:00:00 +02:00
Zahary Karadjov
cf13c5fba4 implement the export/except statement 2018-05-07 09:37:49 +02:00
Zahary Karadjov
7297613900 Bugfix: The compiler were not inserting proper downcasts for generic types
This resulted in a codegen error in C++ mode, because the generic
types were not defined in modules where calls requiring downcasts
were used (generating a downcast forces the inclusion of the full
definition of the involved types).
2018-05-07 09:37:49 +02:00
Zahary Karadjov
4ab1cfb0b0 fix a compiler crash related to the new strings in C++ mode 2018-05-07 09:37:49 +02:00
Zahary Karadjov
ae5c946a32 Support thread-local variables declared inside procs; fixes #7565 2018-05-07 09:37:49 +02:00
Zahary Karadjov
b0d85b0adf Backwards-compatible support for keyword arguments in the command syntax 2018-05-07 09:37:49 +02:00
Zahary Karadjov
e678a4285d Bugfix: Allow matching on nkExprEqExpr against varargs[untyped]
This enables macros accepting arbitrary keyword arguments:

log("foo", prop1 = "bar", prop2 = "baz")

As an added bonus, simple templates with varargs arguments can now
forward their params to procs accepting keyword arguments.
2018-05-07 09:37:49 +02:00
Zahary Karadjov
2b8bf8fc4a A motivating example for the new bindSym behavior.
The example is a proof-of-concept logging library, allowing you to define
lexically-scoped environments where certain logging attributes are applied
automatically to all logging statements.

fixes tmacro1 (use of `bindSym` inside static blocks)
2018-05-07 09:37:49 +02:00
Zahary Karadjov
bdcb729597 Better support for treating templates and macros as symbols.
This allows you to pass a template or a macro to another macro
which can then inspect the implementation of the former template/macro
using `getImpl`.

Since templates can be freely redefined, this allows you to treat
their symbols as compile-time variables that have lexical scope.
A motivating PoC example for a logging library taking advantage of
this will be provided in the next commit.

Implementation details:

* The name of a template or a macro will be consider a symbol if
  the template/macro requires parameters

* For parameterless templates/macros, you can use `bindSym`, which
  was extended to also work outside of compile-time procs.
2018-05-07 09:37:49 +02:00
alaviss
7897026e57 pretty, prettybase: simplify relative paths (#7779)
This allows nimble to be built with compiler as a nimble package
2018-05-07 07:30:13 +02:00
Andreas Rumpf
79ec95a9b5 remove hardly used TimeMachine feature 2018-05-06 20:07:42 +02:00
Andreas Rumpf
d8dd43e500 fixes #7757 2018-05-06 10:50:04 +02:00
alaviss
97056fbb9b fixes #7774 (#7783) 2018-05-06 10:34:22 +02:00
Andreas Rumpf
88cf6573e0 fixes #7743 2018-05-06 08:59:39 +02:00
Andreas Rumpf
272bbad784 Merge branch 'devel' into araq-parser-fixes 2018-05-06 08:03:29 +02:00
Andreas Rumpf
dfc17e5f8e make Nimble not crash after the refactoring 2018-05-05 21:08:45 +02:00
Andreas Rumpf
b7116a28ee compiler refactoring, pass config around explicitly 2018-05-05 18:47:29 +02:00
Andreas Rumpf
eef12654bd compiler/msgs.nim: minor code cleanup 2018-05-05 15:07:13 +02:00
Andreas Rumpf
1aa359febb warn about inconsistent spacing around binary operators; fixes #7582 2018-05-05 14:58:33 +02:00