Commit Graph

3073 Commits

Author SHA1 Message Date
Araq
30597e643f fixes merge conflict 2018-08-23 11:30:55 +02:00
Oscar Nihlgård
d6d3f092a3 Fix for module alias inside brackets (#8726) 2018-08-23 10:23:02 +02:00
awr1
bf973d29da Fixes #8719 (onFailedAssert now works for doAssert) (#8731) 2018-08-23 10:20:58 +02:00
Araq
78e2b515a2 make nake test compile again 2018-08-22 17:34:16 +02:00
Oscar Nihlgård
1d93991929 Cleanup ttimes (#8714)
* Refactor fromWinTime

* Cleanup ttimes
2018-08-22 17:20:41 +02:00
Oscar Nihlgård
7dcf435b4b Fix abs & unary sub in semfold (#8724) 2018-08-22 15:59:33 +02:00
LemonBoy
d94ee75d1c Pick skParam symbols when resolving type idents (#8720)
Fixes #8357
2018-08-22 15:49:43 +02:00
Araq
eeafb1a720 make tdefault_nil test compile again 2018-08-22 15:43:36 +02:00
Araq
27f488e5d9 make more tests green; system.repr does not produce 'nil' for strings and seqs anymore 2018-08-22 15:37:57 +02:00
Araq
dbd21d670c make more things compile without isNil 2018-08-22 15:12:02 +02:00
Araq
64517445ea even more strict isNil handling for strings/seqs in order to detect bugs 2018-08-22 12:35:46 +02:00
LemonBoy
a87341775a Don't consider tyAnd/tyNot/tyOr/tyAnything as generic (#8700)
* Don't consider tyAnd/tyNot/tyOr/tyAnything as generic

`containsGenericType` was too shallow and didn't check all the branches.
The resulting half-processed nodes are often simplified by the constant
folding pass but when that's not possible we get a nasty error during
codegen.

Fixes #8693

* Move the blame onto the semFold pass

Slightly better evaluation of `is` forms.
2018-08-22 09:40:31 +02:00
zah
96de224a63 Fix #8126 (#8712)
This is a temporary fix that will be reworked in a follow up commit
that aims to eliminate the tfExplicit flag from the compiler. The
complete and proper fix was considered too risky for inclusion just
before our 0.19 release.
2018-08-21 22:14:12 +02:00
Araq
9047c3f582 workaround the fact that top level statements currently don't produce destructor calls 2018-08-21 21:33:19 +02:00
LemonBoy
8e435d7b0c HTML generation in testament works again (#8702)
Fallout from the nil-str patch. Nothing to see here, move along.
2018-08-21 15:15:14 +02:00
LemonBoy
cf20c4460c More robust handling of deprecated pragmas (#8696)
Prevent `deprecated` annotations to "slip" up to the parent module and
warn about unsupported annotations.

Accidentally fixes #7867
2018-08-21 15:07:44 +02:00
LemonBoy
bbe5e8326b sfForward is also sfReorder for skModule symbols (#8692)
Take this into account while searching for undefined forward references.

Fixes #8665
2018-08-21 14:51:23 +02:00
Dmitry Atamanov
b75808c7d9 Fixes ropes regressions due to the not-nil strings (#8687) 2018-08-20 16:55:22 +02:00
LemonBoy
b28c7d434b Update all the default parameters after an instantiation (#8689)
The old implementation relied on the (now?) wrong assumption that
default-valued parameters can only be placed after the required ones.

Fixes #8683
2018-08-20 16:54:13 +02:00
Andreas Rumpf
2def616069 exploit nil seqs for performance (#8688)
* changes $ for seqs to never produce 'nil'
* exploit the fact that empty seqs don't have to allocate in the code generator
2018-08-20 11:54:18 +02:00
Andreas Rumpf
696c0c48c7 fixes merge conflict 2018-08-19 15:14:03 +02:00
Andreas Rumpf
f2263cd129 make tests green again 2018-08-18 18:52:39 +02:00
LemonBoy
b5171f57ef Expand tyAlias in typeToString (#8634)
Fixes #8339
2018-08-18 15:27:47 +02:00
Oscar Nihlgård
33ed8f7e73 times.Timezone changes (#8527)
* Use floorDiv in times.nim

* New implementation of times.Timezone

* Tweak doc comments

* Fix typo
2018-08-17 11:12:58 +02:00
LemonBoy
ac0f5c83ca Fixes 8535 (#8591)
* Goodbye postInitProc

* Give preInitProc its own scope

Avoid any conflict between the variables introduced by preInitProc and
initProc since both are codegen'd in the same function body.

* Fix codegen for global var init in emulated TLS

Fixes #8535

* Add test for #8535

* Keep a bogus stack frame around

* Remove more dead code
2018-08-17 00:34:27 +02:00
Araq
2870ca5d71 Merge branch 'araq-misc' into devel 2018-08-16 12:30:00 +02:00
Timothee Cour
e05d0ea0bb tester.nim add more diagnostics (#8631) 2018-08-16 00:54:39 -04:00
Andreas Rumpf
e4c759fbff Merge branch 'devel' into araq-misc 2018-08-16 01:22:21 +02:00
Andreas Rumpf
da41fc1801 put the new for loop macros under an experimental switch named 'forLoopMacros' 2018-08-15 17:45:57 +02:00
Andreas Rumpf
0da91aa744 changes how the now illegal 'string == nil' comparison is detected 2018-08-15 16:31:56 +02:00
LemonBoy
531c66d1ec Allow taking address of skForVar variables (#8632)
Fixes #8630
2018-08-14 21:28:14 +02:00
LemonBoy
c04404635b Fix unsound transform pass (#8633)
When a `var openArray[T]` function parameter goes trough the
`transformAddrDeref` pass we may lose the `var` specifier, leading to
nasty crashes at runtime.
2018-08-14 20:38:04 +02:00
alaviss
7ef268274f Haiku support for Nim (#8542)
* posix_other: Haiku now has spawn.h

This is added per https://dev.haiku-os.org/ticket/13446

* posix_other: Add Haiku specific Dirent members

* cpuinfo: Add an implementation for Haiku

* distros: Add basic Haiku support

* encodings: update Haiku support

* fenv, math: Haiku now provides libm

* times: Add Haiku struct members

* ansi_c, osalloc: Add Haiku constants

* threads: Add Haiku support

* testament: Haiku uses LIBRARY_PATH

* nim.cfg: Update Haiku support

libnetwork should only be linked if network functions are used

* threads: Haiku does not support -pthread switch

* tworkingdir: Haiku's env is in /bin

* posix_other: add SIGKILLTHR for Haiku

* sockets: link with libnetwork on Haiku

* coro: correct ucontext.h location

http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html

* coro: ucontext backend is not available on Haiku

Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX

* coro: fix setjmp backend

The compiler does not allow statements after a noreturn function

* nativesockets: Haiku doesn't support AI_V4MAPPED

* system: hostOS can contains "haiku"

* os: add support for Haiku's packagefs

packagefs is read-only, but there are writable holes to the underlying
file system as well

* os: update constant for Haiku
2018-08-14 09:35:07 +02:00
Araq
83c89197f3 renames threadpool.await to blockUntil; refs #7853 2018-08-14 01:28:04 +02:00
Araq
f91a181f58 make tests green again 2018-08-13 23:16:03 +02:00
Araq
a0cde8cee6 Merge branch 'devel' into araq-misc 2018-08-13 20:16:18 +02:00
Araq
99384c0234 make NimInAction tests green 2018-08-13 20:12:00 +02:00
Araq
420ed0596b fixes more nil handling regressions 2018-08-13 17:27:44 +02:00
cooldome
aa1cdebdc2 Converters to take into account constraints. Fixes #7520 (#8593) 2018-08-13 15:02:20 +02:00
Andreas Rumpf
975114e114 make more tests green 2018-08-13 13:02:52 +02:00
Andreas Rumpf
96e0b56a55 make generic tests green again 2018-08-13 12:54:02 +02:00
Andreas Rumpf
9f31096870 make JS tests green 2018-08-13 12:51:31 +02:00
Andreas Rumpf
81645deb87 testament: change how JS tests are disable for travis on OSX 2018-08-13 12:51:19 +02:00
Andreas Rumpf
7f49364fd0 make more tests green 2018-08-13 12:29:03 +02:00
Iván Montes
ee29370f60 Fixed 7478: splitLines keepEol option (#8621) 2018-08-13 11:42:50 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Naveen Arunachalam
e839c01f5b Clarify usage of "Test" argument in Koch (#8613)
Minor change to help people (e.g. like myself) who are starting out :)
Currently, the readme mentions the use of `./koch tests cat async`, but
the help text for koch doesn't mention it. Helptexts are modified
accordingly.
2018-08-12 22:10:06 +02:00
LemonBoy
3cb963f114 Fixes 8616 (#8617)
* Don't leave dangling forward references to types

Fixes #8616

* Add a test case for #8616
2018-08-12 20:43:30 +02:00
LemonBoy
ba7c874a7d Mysterious fix for #8550 (#8561)
Replacing the `for` body with a nkEmpty node is not the right thing to
do.
2018-08-12 20:41:48 +02:00
LemonBoy
089529c16a Preliminary check for test category folder existence (#8579)
Warn the user if nothing is executed.
2018-08-10 23:03:42 -04:00