Commit Graph

3096 Commits

Author SHA1 Message Date
Araq
e09eeb02bf fixes #8052 2018-08-31 17:27:57 +02:00
LemonBoy
2c8361bd39 Constant folding for integer casts (#8095) 2018-08-31 13:45:42 +02:00
LemonBoy
b74faf354e Do not materialize empty varargs[untyped] arrays (#8715)
When an empty nkArgList `varargs[untyped]` is passed around it is now
reused for efficiency sake and to prevent the introduction of a spurious
element: before this commit we'd pass the caller a
nkArgList[nkHiddenStdConv[nkBracket]] node instead of just an empty
nkArgList.

Fixes #8706
2018-08-31 12:16:46 +02:00
Araq
bacf08e65d merged #8624 manually; fixes #8442; closes #8575 2018-08-31 11:19:42 +02:00
Araq
2f7b979e38 fixes #8066 2018-08-31 00:30:19 +02:00
Andreas Rumpf
df4d5b77a1 introduce precise string '[]', '[]=' accessors; fixes #8049 (#8817) 2018-08-30 23:01:15 +02:00
Araq
e98e214422 fixes #7854 2018-08-30 15:49:51 +02:00
LemonBoy
5cd152bfda Allow hint and warning to specify its loc info (#8771)
Let's bring those to feature-parity with `error`.
2018-08-28 22:59:28 +02:00
Araq
9c3cba1c22 fixes #4766 2018-08-28 15:41:55 +02:00
Araq
dc5851e873 added a test to ensure that for-loop-variables cannot be mutated 2018-08-28 12:16:14 +02:00
Oscar Nihlgård
96363ecaf3 Fix nkImportAs regression (#8796) 2018-08-28 11:35:52 +02:00
Araq
08c105c4e5 added missing file to make tests green 2018-08-27 11:26:31 +02:00
Araq
c0c8828d9f allow .experimental in a .push/pop environment; refs #8676 2018-08-27 11:20:30 +02:00
Vindaar
52f03fabc1 fixes #8781 by appending "_U" instead of 'U' (#8787) 2018-08-27 08:35:07 +02:00
Timothee Cour
3a626179ee doAssert, assert now print full path of failing line on error (#8555) 2018-08-25 21:48:37 +02:00
Dominik Picheta
81f920a4ee Process timers before and after select. Fixes flaky #7758 test. (#8750) 2018-08-25 09:44:02 +02:00
LemonBoy
6f13184e40 More checks for custom pragmas placement (#8765)
We're not interested in custom pragmas attached to certain node kinds so
the compiler silently ignored them.
2018-08-25 07:56:05 +02:00
gemath
f26ed1d540 Add interpreting event parser proc to pegs module. (#8075)
* Added simple interpreting event parser to pegs module.
* Has side-effects problem.
* Macro solution works.
* First flat callback test works.
* Fixed namespace pollution.
* Added handler for pkChar.
* Replaced event parser test.
* Started extensive docs.
* 'callback' to 'handler' renaming part 1.
* Renaming 'callback' to 'handler' part2, completed comments.
* Fixed exported API pollution.
* Added more event handler hooks, fixed comments.
* Changed event parser addition entry.
* Fixed variable names and comments.
* Enhanced comment.
* Leave handlers are not called for an unsuccessful match.
* The three varieties of back-reference matches are processed in separate
of-clauses now.
* Improved hygiene and (almost) eliminated exports.
* Trying to fix CI test breakage by eliminating export.
* Trying to fix CI test breakage by eliminating exports.
* Re-activated leave handler code execution for unsuccessful matches.
* Eliminated the last export statement (with a funny smelling hack).
* Make sure leave handler code is executed for all unsuccessful matcher
cases.
* Replaced local unicode.`==` with export.
2018-08-24 20:13:37 +02:00
cooldome
d5e1d102df fixes 8754 (#8755)
* fixes 8754

* improve test
2018-08-24 09:57:38 +02:00
Andreas Rumpf
effe2fd812 disables flaky test; fixes #8756 2018-08-24 09:58:03 +02:00
LemonBoy
b1c2416abd Validate pragmas attached to for variables (#8749)
Fixes #8741
2018-08-24 09:40:17 +02:00
Dominik Picheta
07e1da8342 Adds test case for #6846. (#8729) 2018-08-23 20:35:22 +02:00
Dominik Picheta
1b1633991a Don't skip poll() when no handles are present. (#8727)
Fixes #7886.

Fixes #7758.

Fixes #6929.

Fixes #3909.

Replaces #8209.
2018-08-23 20:35:22 +02:00
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