Commit Graph

4615 Commits

Author SHA1 Message Date
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
87955eaf30 Fix concat behaviour for uninitialized strings (#8950) 2018-09-11 23:35:21 +02: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
84d122b5c8 extended system.type/typeof to support an upcoming 'collect' macro that works much better than sugar.lc 2018-09-11 19:02:05 +02:00
Andreas Rumpf
f7d1902043 fixes merge conflicts 2018-09-11 17:27:47 +02:00
Andreas Rumpf
af94946517 Merge branch 'devel' of github.com:nim-lang/Nim into devel 2018-09-11 16:41:34 +02:00
LemonBoy
9ba80d2044 JS strings have no trailing zero anymore (#8936) 2018-09-11 11:45:02 +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
91b37311d9 Fix AST generation for case statements (#8908)
Fixes #7534
2018-09-07 21:07:06 +02:00
LemonBoy
eae3c305a7 Don't segfault if the line is empty (#8906) 2018-09-07 21:06:51 +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
Andreas Rumpf
49708d9c25 fixes #3655 2018-09-05 08:47:39 +02:00
Yuriy Glukhov
d2eea9e1c9 Fixes #8851 (#8859) 2018-09-04 08:18:11 +02:00
Andreas Rumpf
e4be1cb814 system.compileDate and compileTime are in UTC; fixes #7305; docgen supports SOURCE_DATE_EPOCH, fixes #3113 2018-09-03 22:23:10 +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
47cbe0e54d fixes #8852 2018-09-03 11:19:18 +02:00
Araq
b3c3a46317 fixes #5745 2018-09-03 10:50:39 +02:00
Araq
7278f28740 fixes the remaining fixable Nimrod->Nim renamings; closes #2032 2018-09-03 09:34:31 +02:00
Araq
cfbf9dcc59 fixes #8740 2018-09-03 09:06:52 +02:00
Andreas Rumpf
dc67dd3bef fixes #8028 2018-09-03 01:35:45 +02:00
Andreas Rumpf
0d68ef9f11 runnableExample: put each example to its own file; fixes #7285 2018-09-03 00:43:12 +02:00
Andreas Rumpf
06dbe9697f fixes #8831 2018-09-03 00:43:12 +02:00
LemonBoy
fd7fd1819c Make sure addGotoOut always inserts its node (#8843)
Fixes #8773
2018-09-03 00:32:26 +02:00
Andreas Rumpf
1948eadc24 change runnableExamples implementation; fixes #8641; fixes #7135; runnableExamples works for templates and generics 2018-09-02 22:56:26 +02:00
Andreas Rumpf
4cf704bb3e fixes #8694 2018-09-02 22:44:48 +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
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
Timothee Cour
ed0cb7b85d make config.nims behave like nim.cfg in terms of where these scripts are searched / run (#8682)
* run project config.nims if exists, then inputfile.nims if exists
* ~/.config/nim/config.nims can now be used
* also check in getSystemConfigPath for config.nims
* refactor handleCmdLine for nim and nimsuggest
2018-08-30 13:52:32 +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
Oscar Nihlgård
96363ecaf3 Fix nkImportAs regression (#8796) 2018-08-28 11:35:52 +02:00
Araq
7bb93c730e show all mismatching overloads again 2018-08-27 17:07:12 +02:00
Araq
a60cf221e8 improve the error message for mutability problems that arise from implicit converter calls 2018-08-27 17:07:12 +02:00
Araq
3999e3be5f fixes #8776 2018-08-27 11:47:57 +02:00
Araq
c0c8828d9f allow .experimental in a .push/pop environment; refs #8676 2018-08-27 11:20:30 +02:00
Araq
57a291db33 optimize away genericReset for result assignment; refs #8745 2018-08-27 09:10:40 +02:00
Vindaar
52f03fabc1 fixes #8781 by appending "_U" instead of 'U' (#8787) 2018-08-27 08:35:07 +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