Commit graph

81 commits

Author SHA1 Message Date
Andreas Rumpf
40ec7be45c refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly 2018-05-27 22:09:15 +02:00
Andreas Rumpf
a325692fb2 refactoring: fewer global variables 2018-05-27 19:19:12 +02:00
Andreas Rumpf
669a564492 remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
Andreas Rumpf
a4e2b0c153 platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals 2018-05-18 15:18:00 +02:00
Andreas Rumpf
bf6c2c5ccf preparations of making compiler/msgs.nim free of global variables 2018-05-17 15:21:22 +02:00
Araq
2a7fc84c86 remove ast.emptyNode global; cleanup configuration.nim 2018-05-16 03:06:07 +02:00
Araq
5526252fa0 fixes testament compilation 2018-05-14 17:45:44 +02:00
Andreas Rumpf
050789a8f4 sem pass compiles again 2018-05-12 21:30:42 +02:00
Andreas Rumpf
ce859d8c16 more modules compile again 2018-05-12 16:35:59 +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
Andreas Rumpf
47335aab41 introduce nkTupleConstr AST node for unary tuple construction; breaking change 2018-04-13 17:45:58 +02:00
PMunch
4f1725ad61 Add column number to instantiation info (#7376)
* Add column number to instantiation info

Instantiation info left out column number for no good reason. This adds
it in as the third element of the tuple.

* Fix test that failed and added change to changelog

An assertion test failed because it was declaring a type that was
expected to be populated by instantiationInfo with the old signature.

Also added the changes to the changelog as it is a breaking change.
2018-04-12 20:02:04 +02:00
Andreas Rumpf
e4081a7201 preparations for language extensions: 'sink' and 'lent' types 2018-01-07 23:09:26 +01:00
Andreas Rumpf
1548743856 make tests green again 2017-11-18 23:03:16 +01:00
Andreas Rumpf
30b098fcaf wip 2017-11-02 15:39:44 +01:00
Andreas Rumpf
f1dab39086 remove old implementation of the roof operator; make tests green again; close #6292 2017-10-29 20:36:07 +01:00
Araq
b407f083ba destructors: work in progress 2017-10-26 00:55:23 +02:00
Andreas Rumpf
e7f37d7223 added typetraits.supportsCopyMem 2017-10-17 21:59:17 +02:00
Andreas Rumpf
8d714d2b02 low/high/of are now overloadable operations 2017-08-30 23:14:33 +02:00
Zahary Karadjov
cd02561368 introduce a pre-processing pass for the concept bodies
fixes #4982
fixes #3805

close #3414
2017-06-20 11:29:42 +02:00
Zahary Karadjov
bc01835091 Allow tyOr,tyAnd and tyNot to be constructed in more contexts 2017-04-28 17:07:54 +03:00
Zahary Karadjov
9574d318ae use lower-case proc names 2017-03-24 17:03:55 +02:00
Zahary Karadjov
52b241fd57 new type traits: GenericHead and StripGenericParams 2017-03-24 16:59:47 +02:00
Zahary Karadjov
644d645ea7 implement the special treatment of explicit type params in concepts 2017-03-24 16:58:15 +02:00
Andreas Rumpf
46efaf294b big compiler refactoring; avoid globals for multi method dispatcher generation 2017-02-22 16:27:52 +01:00
Andreas Rumpf
01ae0d28d4 recursive modules are only detected to improve error messages 2016-11-24 12:27:21 +01:00
Jacek Sieka
6f7b891bdc remove remnants of tyIter 2016-10-24 21:10:48 +08:00
Jacek Sieka
4d558e2608 Merge remote-tracking branch 'origin/devel' into compiler-cleanup 2016-08-17 18:49:36 +08:00
Matthew Baulch
674a1110f0 Require ordinal or set argument to system.ord 2016-08-11 21:13:18 +10:00
Jacek Sieka
3cd4cf4320 remove unused stuff 2016-08-09 22:54:27 +08:00
Andreas Rumpf
de6198c747 fixes #4555 2016-08-02 12:47:02 +02:00
Andreas Rumpf
db56174a19 fixes #3548 2016-07-15 00:22:14 +02:00
Andreas Rumpf
e8faa214eb fixes #4295 2016-06-07 22:46:12 +02:00
bit
b6a11271b3 Removed error that disallows slices with negative indexes 2016-02-22 16:37:29 +02:00
Andreas Rumpf
bd8e89774e fixes a critical bug concerning a[^1] rewritings 2015-12-14 18:40:58 +01:00
Araq
29a9166966 fixes the most pressing regressions introduced by the new handling of a[i] in the compiler 2015-09-16 15:34:54 +02:00
Araq
8ef66b973d first attempt to fix 'a[i]' handling in generics 2015-09-12 10:55:28 +02:00
Yuriy Glukhov
a5be556a4c Untyped pointers godegen changed. addr expression fixed. 2015-08-21 13:29:25 +03:00
Araq
ab26298a03 added system.unsafeAddr 2015-08-04 17:31:18 +02:00
Araq
0c947f31ba system.locals is now a plugin for education 2015-04-24 02:08:06 +02:00
Araq
13c5f792dc fixes #2447 2015-04-22 16:11:51 +02:00
Araq
4be0d16520 added '..^' and '..<' operators; 'nil' is allowed for 'len'; added plugin system to the compiler 2015-04-22 12:04:11 +02:00
Araq
2b80d75aa2 fixes #2420; negative indexing for slicing is obsolete (breaking change!) 2015-03-28 00:15:04 +01:00
Araq
ed0d9e271d disallow negative indexing 2015-03-27 01:30:06 +01:00
Araq
5d63ecb3a4 implemented a[^1] notation 2015-03-26 02:12:38 +01:00
Araq
08c0ba379a fixes #1805 2015-03-21 20:38:28 +01:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
Araq
105a0616a9 implemented procCall builtin 2014-11-28 02:43:41 +01:00
Araq
0257f389fe fixes #1366 2014-08-30 20:16:35 +02:00