Commit Graph

3587 Commits

Author SHA1 Message Date
deech
68a82f100e Fixes #10727. (#10728) 2019-02-25 11:21:14 +01:00
Federico Ceratto
28a83a8388 Handle IPv6 in bindAddr #7633
Add test
2019-02-23 13:06:26 +00:00
LemonBoy
f39aa1b40b discard destroys its argument in-place (#9478) 2019-02-23 14:03:32 +01:00
Neelesh Chandola
9884129058 Tuple unpacking now works for for vars (#10152)
* Tuple unpacking now works for `for` vars
* Give error if length of tuple vars != length of tuple
* Fix error message showing wrong tuple length
* unpacking now works now for mutable items
* Update changelog
2019-02-23 14:01:34 +01:00
LemonBoy
e89aaaeaab Open a new scope for static: expr blocks (#10649)
Bring this in line with how plain blocks are analysed and avoids codegen
errors if one references variables defined in such a block.
2019-02-23 12:05:07 +01:00
LemonBoy
71df1b060b Tighten the conversion from tyRange to scalar types (#10495)
* Tighten the conversion from tyRange to scalar types.

Introduce the `isIntConv` rule for unsigned types.
Do not allow mixed-signedness conversions between ranges and scalar types.

* More json adjustments
2019-02-23 11:52:52 +01:00
Andreas Rumpf
c5dbb0379f disable compile-time FFI support 2019-02-23 11:34:39 +01:00
Timothee Cour
adbabf145c FFI at CT (#10150)
* enable FFI at CT
* rename useFFI=>nimHasLibFFI; improve formatting rawExecute traceCode
* disable libffi on windows (works for win32, not yet win64)
2019-02-23 11:31:01 +01:00
Miran
e7878c0d08 add tests for recently closed issues (#10722) 2019-02-23 10:41:35 +01:00
Andreas Rumpf
417d27c544 gc:destructors: progress 2019-02-21 12:19:06 +01:00
Andreas Rumpf
7e404c670d gc:destructors: add first test program 2019-02-19 23:32:41 +01:00
Oscar Nihlgård
1a771a8248 Replace the duration conversion procs with new improved ones (#10710) 2019-02-19 19:12:44 +01:00
Miran
50d1a46537 better docs: osproc (#10708)
* better docs: osproc
* fix a typo in the docs, deprecate "demon"
2019-02-19 17:25:03 +01:00
Araq
f31d1fa98b fixes #10195 2019-02-19 16:25:57 +01:00
Arne Döring
6b9a139f7f error message for accidental use of macro (#10490)
* error message for accidental use of macro
2019-02-19 12:21:42 +01:00
Araq
257965e105 fixes 10697 [backport] 2019-02-19 11:56:14 +01:00
Andreas Rumpf
2deb1e354f fixes #10702 (#10705)
* --define:nimQuirky exception handling for Nim; in preparation of a blog post
* make it work with latest system.nim
* make code more readable
* fixes #10702
2019-02-18 15:23:05 +01:00
LemonBoy
cf32d61fa5 Prevent crash on pragma templates w/ generics (#10685)
* Prevent crash on pragma templates w/ generics

* Remove incorrect call to pragma reconversion

`semOverloadedCall` may return a node with more elements than the
original nkCall node had (implicit and/or explicit generics).
2019-02-18 12:17:00 +01:00
Federico Ceratto
d8ff25f032 Provide access to getsockname()/getpeername()
Port of #3323 with added tests
2019-02-17 17:04:57 +00:00
Araq
b081eb4d6d fixes #10651 2019-02-14 15:55:38 +01:00
Arne Döring
b6c22eae6a disable talloc2 on 32 bits (#10656) 2019-02-13 08:04:06 +01:00
Arne Döring
6870345cd2 32 bit fixes (#10608) 2019-02-12 22:00:31 +01:00
LemonBoy
5fd9bf9cd5 Propagate tfGcSafe flag to generic instantiations (#10620)
Fixes a nasty endless loop in the generic instantiation phase.
2019-02-10 22:07:50 +01:00
Timothee Cour
4910608394 revive #10228 (fix #9880) (#10610)
* Make index out of bounds more useful by including the 'bounds'.
* fixes #9880 index out of bounds (remaining cases); revives #10228
* change err msg to: `index 3 not in 0 .. 1`
2019-02-10 22:07:11 +01:00
LemonBoy
0c4d1fd10b Do not walk into type sub-nodes for cast/conv expr (#10616) 2019-02-09 19:55:26 +01:00
LemonBoy
1e88bf1def Misc macro things (#10612)
* Misc cleanup in macro code

Generate error messages using `error` instead of `assert`.

Fixes #10574

* Fix crash with hasCustomPragma on quoted fields

Use the `$` operator instead of reaching for the `strVal` field directly
2019-02-09 18:22:07 +01:00
Andreas Rumpf
c6fdf93c7f fixes #6955 2019-02-09 11:18:21 +01:00
Andreas Rumpf
c4ad297544 disable flaky coroutines test 2019-02-09 07:41:19 +01:00
Arne Döring
594c2576e6 Print missing case labels (#10600) 2019-02-09 07:36:30 +01:00
Andreas Rumpf
444f2231c9 make tests green again 2019-02-08 16:54:12 +01:00
LemonBoy
aa6e40abe6 Fix wrong result in tuple assignment (#9340)
Fixes #9177
2019-02-08 12:24:03 +01:00
Araq
4ed7507cb2 error messages can have spaces, don't be dyslexic 2019-02-08 12:18:42 +01:00
LemonBoy
710cfcecd3 Rework exception handling in the VM (#10544)
* Rework exception handling in the VM

Make the safepoint handling more precise and less forgiving.
The new code is clearer and more commented.
Perform cleanup on `return`.
The no-exception-thrown case in a try block should be slightly faster
since we don't parse the whole set of exceptions every time.
More tests.

* Fix silly error that broke a few tests

* Testament doesn't like files having the same name

* Remove test case that failed compilation to js
2019-02-08 11:57:47 +01:00
LemonBoy
631a8ab57f Fix edge case in type hashing (#10601) [backport]
Empty types introduced by a template produced the same hash of the
"clean" type sharing the same name.
2019-02-08 09:56:32 +01:00
LemonBoy
6b88ce3384 Stop useless suggestion of unsafeAddr (#10598)
Fixes #10594
2019-02-08 08:59:38 +01:00
LemonBoy
f23b0a7dc8 Fix handling of reraise in effect tracking (#10582)
This is the MVP in order not to get a completely useless error message
from the compiler.

Fixes #10579
2019-02-07 17:07:03 +01:00
Timothee Cour
b8f4ff8b9f followup on #10573: prevent common user config to interfere with testament (excessiveStackTrace) (#10590) 2019-02-07 12:29:31 +01:00
Timothee Cour
6f412fc6cb fix #10591 regression (#10592) 2019-02-06 22:31:36 -06:00
LemonBoy
294b2e03b2 Reject assignments with nkEmpty RHS (#9000)
Fixes #8997
2019-02-06 21:26:55 +01:00
Andreas Rumpf
0036014727 system refactorings (#10559)
* move IO subsystem into its own module; refs #10385
* make standalone test compile again
* make C++ examples compile again
* make more tests green
* make sysAssert and gcAssert work again
2019-02-06 21:00:00 +01:00
Oscar Nihlgård
bfb2ad5078 New implementation of times.between (#10523)
* Refactor ttimes

* New implementation of times.between

* Deprecate times.toTimeInterval
2019-02-06 20:13:29 +01:00
LemonBoy
6c8dee4180 Avoid evaluating macros twice in type sections (#10550)
Fixes #10548
2019-02-06 11:35:44 +01:00
LemonBoy
26255c72fd Fix getCustomPragmaVal on var fields 2019-02-06 11:34:55 +01:00
Timothee Cour
cf8366a569 prevent common user config to interfere with testament (#10573) 2019-02-06 09:41:05 +01:00
Arne Döring
824f39b32e Vm bitops fixes (#10520) 2019-02-05 09:31:37 +01:00
Oscar Nihlgård
0091f2ad3b Implement {.booldefine.} (#10533) 2019-02-03 09:06:00 +01:00
Arne Döring
b80dbdb77d Fix vm signed xor (#10519)
* fix #10482

* undo changes

* fix for bitwise not

* remove dead opcode
2019-02-01 12:12:10 +01:00
cooldome
1d5437e9d2 vm fix for bitwise signed ints (#10507)
* fixes #10482

* add missing file

* bug fix
2019-01-31 19:48:39 +01:00
Timothee Cour
ec6e5681da fix #8063 by adding a testcase for: Deprecation warnings for enum values print twice (#10508) 2019-01-31 11:44:11 +01:00
Miran
fa058773db fixes #10042 (allow spaces in import) (#10504)
This allows spaces in imports, by using the following syntax:
* `import "directory with spaces" / subdir / file`, or
* `import "directory with spaces/subdir/file"`
2019-01-31 08:20:00 +01:00