Commit Graph

2287 Commits

Author SHA1 Message Date
Adam Strzelecki
2f5ed17cfe Parser: Properly represent parsePar in grammar 2015-06-02 21:53:46 +02:00
Adam Strzelecki
13b57dbc2f Introduce {.noRewrite.} expr pragma disabling TR
Term rewriting macros/templates are currently greedy and they will rewrite as
long as there is a match. So there was no way to ensure some rewrite happens
only once, eg. when rewriting term to same term plus extra content.

With new macro we can actually prevent further rewriting on marked expr or
stmts, eg. with given example echo(...) will be rewritten just once:

  template pwnEcho{echo(x)}(x: expr) =
    {.noRewrite.}: echo("pwned!")

  echo "ab"
2015-06-02 21:38:53 +02:00
yglukhov
eec76cfc6b Fixed renderer for asm node in JS 2015-05-28 10:23:09 +03:00
Andreas Rumpf
14b2bbc24c Merge pull request #2695 from transfuturist/devel
Add path directive to allow inclusion of config file's path itself
2015-05-26 21:13:52 +02:00
Andreas Rumpf
3db13ba0e0 Merge pull request #2804 from yglukhov/minor-cosmetics
Minor cosmetic changes.
2015-05-26 21:12:13 +02:00
Andreas Rumpf
aa66dfd5a7 Merge pull request #2810 from yglukhov/js-codegen-obj-field-byvar
Fixes #2798. Passing arguments by var in certain cases leads to invalid JS.
2015-05-26 21:11:32 +02:00
yglukhov
d3c4c7c52f Fixes #2798 2015-05-26 16:00:48 +03:00
Sergey Avseyev
b8fbe6c711 Ship all testdata with dist 2015-05-26 15:46:57 +03:00
yglukhov
1156e8ef9d Minor cosmetic changes. 2015-05-26 11:32:07 +03:00
Simon Hafner
4cc722a414 now nimsuggest works on the first sug 2015-05-24 17:47:51 -05:00
Simon Hafner
928b730d1b fixes #2694 2015-05-24 14:52:16 -05:00
Andreas Rumpf
5d4ee87f3b Merge pull request #2754 from def-/intval
Intval
2015-05-19 14:36:03 +02:00
Andreas Rumpf
d7c0b269cb Merge pull request #2734 from def-/stdin-fix
Clean up stdin file reading of compiler.
2015-05-19 14:35:18 +02:00
yglukhov
4439b00b19 Fixed JS call codegen, when first parameters are compile-time. 2015-05-19 13:41:18 +03:00
def
2076e14a09 Update ast spec about uint literals 2015-05-18 21:34:26 +02:00
def
51de44be79 Make intVal work for uint literals in the VM 2015-05-18 21:31:24 +02:00
def
2613110015 Use gProjectIsStdin instead 2015-05-17 16:10:46 +02:00
def
def61c9fcd Clean up stdin file reading of compiler.
Uses "stdinfile" as the module identifier now, which prevents problems
with - colliding with the minus operator. This fixes #2422 and #2702.
2015-05-16 12:38:53 +02:00
transfuturist
8fc53f2952 Add path directive to allow inclusion of config file's path itself 2015-05-14 12:52:43 -07:00
Andreas Rumpf
c30d7c3208 Merge pull request #2680 from reactormonk/epc
Implements EPC for nim-mode in nimsuggest
2015-05-14 02:16:12 +02:00
Adam Strzelecki
179d82c55b Fix #2662: Don't convert subtype typedesc params
There is no point to issue implicit HiddenStdConv encountering subtype of
typedesc[Base] parameter on overload resolution, since this will anyway never
reach codegen. This change effectively fixes compiler bug for:

  iterator it(T: typedesc[Base]) = ...
  for s in it(SubclassOfBase): ...

Where HiddenStdConv triggered implicit instantiation of variable of type
typedesc[Base] in for transform, that eventually fails at getUniqueType, that
refuses to work for typedesc.
2015-05-13 19:10:54 +02:00
Simon Hafner
5e97780a94 changed from parseEnum to direct copy
Let's hope this doesn't break anything
2015-05-13 18:34:29 +05:00
Simon Hafner
c56a005238 nextFreePort -> connectToNextFreePort 2015-05-13 18:19:39 +05:00
Simon Hafner
13e8547fa7 hardcoded order 2015-05-08 19:47:34 +05:00
Simon Hafner
c06672451a removed unnecessary deps 2015-05-08 19:47:17 +05:00
Simon Hafner
f5cca89610 merged devel into epc 2015-05-08 06:40:34 +05:00
Simon Hafner
2474c1bb11 import sigmatch, not suggest in nimsuggest 2015-05-08 06:32:58 +05:00
Andreas Rumpf
9422dbf337 Merge pull request #2657 from def-/noreturn
Pass noReturn pragma to C code.
2015-05-08 02:08:32 +02:00
def
4a2a0894ae Implicitly assume compilers to know naked and noreturn attributes 2015-05-07 22:31:45 +02:00
def
a7b39e3ebf Improve code style a bit 2015-05-07 20:35:16 +02:00
def
81cff0908e Fix the lib path used with --app:staticlib
For example if gProjectName is "src/false.nim" the old static lib name
was "libsrc/false.nim.a", now it is "libfalse.a".
2015-05-07 02:29:31 +02:00
def
78c26cbf18 Distinguish only between __declspec and __attribute__ 2015-05-05 20:35:43 +02:00
def
a9fe618756 Pass noReturn pragma to C code.
With GCC and Clang this generates __attribute__((noreturn)) in the
function declaration. (both tested) With VCC __declspec(noreturn) is
used.
2015-05-05 00:02:09 +02:00
Araq
3bef848a2c added missing stuff for the release 2015-05-04 19:40:11 +02:00
Araq
4a51dbe670 version 0.11.2 2015-05-04 16:47:42 +02:00
Araq
e23857a98b fixes #2629, fixes #2641, fixes #2632, fixes #2630 2015-05-03 01:08:52 +02:00
Araq
6cb3635ca0 fixes 'echo nil' codegen bug 2015-05-03 01:08:51 +02:00
Araq
0f35a997dd minor bugfixes to the new 'len(nil)==0' feature 2015-05-03 01:08:50 +02:00
Araq
16a51ffc97 compiler\ccgexprs.nim
fixes 'nil' literal echoing
2015-05-03 01:08:49 +02:00
Simon Hafner
1e78c5445d manually reapplied d40098ad 2015-05-02 09:26:15 +05:00
Simon Hafner
2522049ed2 method arrives as symbol 2015-05-02 09:14:02 +05:00
Simon Hafner
0ff5339590 removed debug echos 2015-05-02 08:35:01 +05:00
Simon Hafner
b500907978 some more bugs in epc fixed - removed try 2015-05-02 08:24:05 +05:00
Simon Hafner
7dfa93d3c0 fixed first round of bugs 2015-05-02 08:04:17 +05:00
Simon Hafner
a1ee169d09 implemented nextFreePort for nimsuggest 2015-05-02 05:28:53 +05:00
Araq
3905cfeace more cleanups for 0.11.0 2015-04-30 14:32:01 +02:00
Araq
a4f8a89c85 preparations for version 0.11.0 2015-04-30 02:01:38 +02:00
Araq
d40098ad82 columns are 1 based for nimsuggest 2015-04-30 00:01:07 +02:00
Araq
6d05ae26e6 fixes regression caused by code cleanups 2015-04-29 22:24:50 +02:00
Araq
26eae7d00e fixes #2470, fixes #1354 2015-04-28 20:21:53 +02:00