Commit Graph

3128 Commits

Author SHA1 Message Date
Ganesh Viswanathan
e07a256f74 Test case for #6483 2018-09-14 14:04:32 -05:00
genotrance
7af659cf59 Test case for #6163 (#8960)
* Test case for #6163
2018-09-14 17:09:16 +02:00
Ganesh Viswanathan
f4356d6115 Fix system.nim line number test case failure 2018-09-12 12:58:50 -05:00
Ganesh Viswanathan
9b2115558b Test cases for #6969 #7346 #7581 2018-09-12 12:00:01 -05:00
Andreas Rumpf
8f046792cf Merge pull request #8941 from timotheecour/pr_fix_8928
fix #8928 regression
2018-09-12 10:28:57 +02:00
Andreas Rumpf
132eb31e32 Merge pull request #8949 from nim-lang/araq-for-loop-expressions
For loop expressions
2018-09-12 10:27:54 +02:00
LemonBoy
b195204549 Fix add(string, cstring) when the lhs is null (#8951) 2018-09-12 10:10:00 +02:00
LemonBoy
87955eaf30 Fix concat behaviour for uninitialized strings (#8950) 2018-09-11 23:35:21 +02:00
Timothee Cour
72170b443d add testcase 2018-09-11 11:52:51 -07:00
LemonBoy
8670f4911b Fix semantic pass with borrowed magic procs (#8945)
Reported by pqflx3 on the forum.
2018-09-11 20:32:25 +02:00
Andreas Rumpf
de02f5fa0a add tcollect test for the new for-loops as expressions feature 2018-09-11 19:14:31 +02:00
LemonBoy
e7d4043406 Always emit hti object types if needed (#8940)
The compiler is now smart enough to emit types only if needed without
all the importc tricks. This also fixes a codegen bug where, if all the
stars align correctly, typeinfo doesn't include any definition of
`TNimType` but uses it.

Found by @skilchen in #8938
2018-09-11 17:03:21 +02:00
LemonBoy
7107ec05de Narrowing casts are applied after every op if needed (#8918)
This way we make sure not to end up with weird values every now and
then.

Fixes #7300
Fixes #8909
2018-09-08 19:41:07 +02:00
LemonBoy
3f16711254 Fix insert/delete for JS (#8915)
Fixes #8914
2018-09-08 10:38:18 +02:00
LemonBoy
91b37311d9 Fix AST generation for case statements (#8908)
Fixes #7534
2018-09-07 21:07:06 +02:00
LemonBoy
e69d8ec416 Fix type comparison in semConv (#8907)
Fixes #8905
2018-09-07 21:06:30 +02:00
Yuriy Glukhov
1e6eca973d Fixes #8243 (#8904) 2018-09-07 16:30:50 +02:00
LemonBoy
e81fe6d32f Allow wCodegenDecl on lambdas (#8892) 2018-09-07 01:58:49 +02:00
LemonBoy
84eab97fed Sync line generation between C and JS backends (#8888)
Fixes #7224
2018-09-07 01:56:36 +02:00
LemonBoy
af1e84f54d Automatic deref for everything but pointers in asm/emit (#8891)
Fixes #7249
2018-09-07 01:54:59 +02:00
cooldome
c033ff990a Renderer bug fixes (#8804)
Fixes #8763: render bug: pure enums not handled correctly
Fixes #8762: render bug: binary operators called with quotes rendered incorrectly
FIxes #8761: render bug: inversion of operator priorities
2018-09-07 01:52:42 +02:00
LemonBoy
4aba2981dd Codegen fix for function pointers marked inline (#8866)
Fixes #5345
Fixes #5701
2018-09-04 15:28:14 +02:00
Yuriy Glukhov
d2eea9e1c9 Fixes #8851 (#8859) 2018-09-04 08:18:11 +02:00
LemonBoy
1a60ffcf1d Correctly mangle this in the JS backend (#8853)
As shown in pragmagic/karax#67 using `this` as parameter name made the
codegen output wrong code (and the user didn't notice the errors in the
browser console).
2018-09-03 17:51:30 +02:00
Araq
0694c9080f fixes #8043 2018-09-03 16:07:44 +02:00
cooldome
e63c66b810 Add sym owner to macros (#8253) 2018-09-03 13:25:59 +02:00
Araq
1abef2dc59 improve the error message for 'addQuitProc' etc; fixes #5794 2018-09-03 12:27:23 +02:00
Araq
e0fd1cdb5f fix items for cstring for the JS target; makes tests green again 2018-09-03 11:13:59 +02:00
Araq
7cea0c1765 closes #5252 2018-09-03 10:16:11 +02:00
Araq
9e48999567 closes #4750 2018-09-03 10:02:37 +02:00
Araq
cfbf9dcc59 fixes #8740 2018-09-03 09:06:52 +02:00
Araq
fa338768a3 fixes #8847 2018-09-03 08:37:32 +02:00
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