Commit Graph

2840 Commits

Author SHA1 Message Date
Oscar Nihlgård
eb8f15d97c Support multi byte characters in module names (#7916) 2018-05-31 10:38:43 +03:00
andri lim
25a41d5d90 fixes #7818, correct internal representation of generic objects array construction (#7824)
* defer skiptypes
* defer skiptypes for tyRef & tyPtr
* remove unneeded skipTypes
2018-05-29 09:38:52 +02:00
七秒不觉梦
b6b6382e0b Added: type name output when exception raised from unittest (#7869) 2018-05-28 05:24:04 +03:00
Zahary Karadjov
1c478db375 fix #7883; fix #7829 2018-05-26 20:46:22 +03:00
Andreas Rumpf
c0024fa587 fixes channels for --gc:regions 2018-05-25 16:21:33 +02:00
Araq
02b78d3f94 make tests green again 2018-05-14 21:38:18 +02:00
Lolo Iccl
af591544c5 Modify hash for HashSet to use xor to mix hash of items. 2018-05-09 17:41:41 +02:00
Lolo Iccl
5c7b66e07a Modify previous commit and add tests 2018-05-09 17:41:41 +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
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
Andreas Rumpf
700a2e125b make the tester compile without warnings 2018-05-06 09:00:55 +02:00
Andreas Rumpf
cd0985df06 update the changelog 2018-05-06 08:17:32 +02:00
Andreas Rumpf
272bbad784 Merge branch 'devel' into araq-parser-fixes 2018-05-06 08:03:29 +02:00
Andreas Rumpf
d8fde9daba make tests green 2018-05-05 21:45:07 +02:00
Andreas Rumpf
805402b294 fixes #7582 2018-05-05 14:17:31 +02:00
Dominik Picheta
f7f69b1abb Merge pull request #7624 from skilchen/fix-issue7620
there is no hour 0 in am/pm time (see #7620)
2018-05-03 16:07:27 +01:00
Araq
21cbf438ce make tests green 2018-05-02 13:34:54 +02:00
Andreas Rumpf
74fe7a800b make tests green again 2018-05-02 13:34:54 +02:00
Andreas Rumpf
599b5d6dcb make 'not nil' experimental 2018-05-02 13:34:53 +02:00
Oscar Nihlgård
cc0ca43743 Don't hide overflow/underflow/divbyzero in semfold (#7732)
* firstOrd/lastOrd bugfix
* Don't hide overflow/underflow/divbyzero in semfold
2018-05-02 08:54:09 +02:00
Araq
6853793ae9 make tests green again 2018-04-30 20:05:20 +02:00
Araq
ed79201d0b make more tests green 2018-04-30 11:16:56 +02:00
Andreas Rumpf
87f548c5f4 make more tests green 2018-04-30 02:56:19 +02:00
Andreas Rumpf
0fad659bf7 make more tests green 2018-04-30 02:52:58 +02:00
Andreas Rumpf
5237ef4f52 update the documentation about the new strings/seqs behaviours 2018-04-29 08:14:00 +02:00
Andreas Rumpf
16b0bf6cca make memoization test compile again 2018-04-29 08:00:45 +02:00
Andreas Rumpf
9e6656d562 disable hanging test 2018-04-29 07:58:24 +02:00
Andreas Rumpf
f64f9e50cc correct comparisons for nil strings/seqs 2018-04-28 15:13:44 +02:00
Andreas Rumpf
84c4e7a502 make tests green again 2018-04-28 10:00:31 +02:00
andri lim
07d6ff4be4 fixes #7601, array construction of ptr generics (#7671)
* fixes #7601, array construction of ptr generics

* add more test
2018-04-27 21:38:15 +02:00
Andreas Rumpf
7c538b26ad nil in string concats does not produce crashes anymore 2018-04-27 21:33:05 +02:00
andri lim
e4aa140d22 fixes #7600, generic object with generic ref object parent typerel bug (#7678)
* fixes #7600

* fix wrong logic
2018-04-27 08:53:20 +02:00
genotrance
e931f3b5a9 Fixes #802, #803 and #3775 - genscript issues (#7677)
* Fixes #802, #803 and #3775 - genscript issues

* Test case for genscript

* Test script

* Verify on Linux

* Update categories.nim

* Fix merge

* Improve test framework

* Windows fixes
2018-04-25 10:52:32 +02:00
Oscar Nihlgård
b34580fd5b Rename Time.nanoseconds to nanosecond (#7673)
* Rename `Time.nanoseconds` to `nanosecond`

* Fix bug with Duration comparision
2018-04-25 02:43:26 +02:00
Andreas Rumpf
7df892db9d make tests green again 2018-04-24 11:45:08 +02:00
Andreas Rumpf
ee366f1746 .experimental can now be used to enable specific features 2018-04-24 09:34:29 +02:00
Oscar Nihlgård
8caf257607 Don't escape multibyte characters (#7570) 2018-04-23 11:09:48 +02:00
Jacek Sieka
72dfe176f5 remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
Andreas Rumpf
34b333b140 make tests green again 2018-04-22 07:10:55 +02:00
Andreas Rumpf
0ba50f9890 make tests green again 2018-04-22 00:19:41 +02:00
Andreas Rumpf
b43025b754 fixes #5113 2018-04-21 23:58:24 +02:00
Andreas Rumpf
14e496fab0 fixes #6393 2018-04-21 22:49:15 +02:00
Andreas Rumpf
85ea9593b3 fixes #7637; assignments are not allowed to slice object; minor breaking change 2018-04-21 21:22:36 +02:00
Oscar Nihlgård
7d034d7b6a Add fromWinTime and deprecate unixTimeToWinTime/winTimeToUnixTime (#7641) 2018-04-19 22:41:06 +02:00