Commit Graph

3484 Commits

Author SHA1 Message Date
Erik Johansson Andersson
61086b8e59 flush after printing 2015-11-28 21:21:42 +01:00
Araq
85345d2d34 fixes #3222 2015-11-26 17:46:05 +01:00
Araq
45dfd445da fixes #2285 2015-11-26 17:46:05 +01:00
Araq
5fe71db6d9 'out T' is an alias for 'var T' 2015-11-26 17:46:05 +01:00
Araq
25e2e3faec 'importc' allows 'not nil' annotation 2015-11-26 17:46:05 +01:00
Araq
a2480efd68 allow 'nil ref T' as a first step which does nothing 2015-11-26 17:46:05 +01:00
Yuriy Glukhov
0d5b9afb08 Fixed JS codegen for distinct types 2015-11-23 21:14:15 +02:00
Anatoly Galiulin
98723925d8 Fixed SIGSEGV on wrong slurp usage 2015-11-23 13:18:05 +05:00
Araq
1757b8466d fixes #3546 2015-11-18 14:42:13 +01:00
Araq
528cf3eae4 better error handling for bug #3550 2015-11-18 13:32:16 +01:00
Araq
698b1fc954 fixes #3550 2015-11-18 12:33:09 +01:00
Araq
aad4ed776b allows macros to access documentation comments 2015-11-18 12:33:09 +01:00
Araq
edb495a6b3 fixes a critical error handling bug for nimsuggest 2015-11-18 12:33:09 +01:00
Reimer Behrends
67e62302b4 Avoid signed shifts and bit operations for sets.
Set operations used "1<<n" style shifts, which led to undefined
behavior if the signed shift overflowed. Similarly, the right-hand
side of the operator sometimes used a mix of signed and unsigned
integers that were combined with "&". This patch attempts to provide
a consistent implementation that uses unsigned integers everywhere.
2015-11-11 14:19:09 +01:00
Araq
2aff716134 os.walkDir is available at compile time 2015-11-10 15:31:21 +01:00
Araq
81f876040b added newTree to ast.nim 2015-11-10 15:31:21 +01:00
Dominik Picheta
c83e4390d8 Modified setDefaultLibpath to search using findExe"nim".
This is so that Nimble (and other tools) which use the compiler modules
for nimscript support or other purposes can find $lib.
2015-11-07 15:48:14 +00:00
Araq
ae60f4ae76 better nimsuggest support 2015-11-03 14:52:37 +01:00
Araq
86c8a7a947 nimrod is obsolete 2015-11-03 14:52:36 +01:00
Araq
1dda0e4b84 fixes a critical xlen codegen bug 2015-11-03 14:52:34 +01:00
Victor Korkin
e4a3f9fa4b Install stdlib.nimble in lib
Without stdlib.nimble in libs directory Nimscript is not work properly.
2015-11-02 12:48:19 +06:00
Araq
d673fb3911 nimsuggest: added 'chk', 'outline' and 'highlight' features 2015-11-01 23:26:31 +01:00
Adam Strzelecki
f838c1baa4 fixes #3498
Previously it was not possible to use template arguments in template body as
the symbols were not resolved correctly leading to Error: undeclared
identifier: 'XX', eg.:

   template defaultOf[T](t: T): expr = (var d: T; d)
   echo defaultOf(1) #<- invalid identifier, but should output 0
2015-10-30 12:05:02 +01:00
Araq
22fc9a9470 development version is 0.12.1, not 0.12.0 2015-10-29 23:33:27 +01:00
Adam Strzelecki
47e45dee7e fixes #3496
The problem comes from the fact that macroOrTmpl[...] is transformed by
semSubscript which is trying to evaluate macroOrTmpl identifier in place. This
is okay for non-generic macros or templates, but wrong for generic ones, that
do not have a chance to receive their generic arguments explicitly specified in
brackets.

Solution:

1. macroOrTmpl[...] where macroOrTmpl is non-generic macro or template, then
   macroOrTmpl is evaluated before applying brackets. (as before)

2. macroOrTmpl[...] where macroOrTmpl is generic macro or template, then if:

   a. It comes from macroOrTmpl[...](...) call expr (efInCall), then macroOrTmpl
      is turned into a symbol (efNoEvaluate) rather than evaluating it in place,
      then whole bracket expr is returned to semIndirectOp which transforms it
      to proper generic macro or template call with explicit generic arguments.

   b. macroOrTmpl[...] does not come from call expr, as above macroOrTmpl is
      transformed to symbol, then it is transformed into proper generic macro or
      template call with explicit generic arguments and no normal arguments.
2015-10-29 23:10:45 +01:00
Araq
86e2d6ee90 fixes #3476 2015-10-27 08:37:56 +01:00
Araq
aa36e73ecf fixes #3431, fixes #3370, fixes #3468 2015-10-25 02:22:50 +01:00
Araq
cd7b5ae1eb fixes #1799 properly 2015-10-25 02:35:18 +02:00
Araq
5206c310e6 fixes #1799 2015-10-25 01:26:08 +02:00
Adam Strzelecki
24731c5360 compiler/commands: Always write usage to stdout
Usage is compiler command output, not diagnostics, so we shall output it to
stdout. Also this makes: nim -h | less or nim -h | grep ... working.
2015-10-22 22:14:45 +02:00
Adam Strzelecki
acb6a36656 msgs: One msgWriteln with optional flags
Instead of msgWriteln, outWriteln and stdoutWriteln doing essentially the same.
2015-10-22 22:09:15 +02:00
Araq
9cc25f8b77 fixes #3452 2015-10-22 12:14:32 +02:00
Araq
e722770fbb doc\advopt.txt
added --reportConceptFailures switch
2015-10-22 12:14:31 +02:00
Araq
d93507fd2e fixes #3338 2015-10-22 10:24:46 +02:00
Araq
3f24a7ff3e mitigates unclear nimsuggest problem 2015-10-22 10:24:19 +02:00
Araq
d1ae1cba87 fixes installation problems on unix by hardcoding the dlls.zip name 2015-10-16 22:02:34 +02:00
Adam Strzelecki
78568859c5 compiler/vm: Use stdout too in VM time echo
Now VM time echo outputs to stdout too, same as compile time echo, rather using
same handle as compiler diagnostics (stderr default).
2015-10-16 20:55:17 +02:00
Adam Strzelecki
abb82554b7 compiler/msgs: Default to stderr for diagnostics
Previously we were defaulting to stdout for diagnostics, which could interfere
with scripts or `nim c -r' programs outputting their results to stdout,
possibly mixing their output with compiler messages.

This change makes now Nim to be inline with other compilers emitting
diagnostics to stderr. Also now --stdout option has proper meaning making all
diagnostics to be sent to stdout instead.

NOTE: Tester now calls compiler with --stdout.
2015-10-16 20:55:17 +02:00
Yuriy Glukhov
955954a89f Gen temp name instead of nimVarUnpack 2015-10-15 17:50:06 +03:00
Yuriy Glukhov
2166b7bc46 Fixed ret by var in js 2015-10-15 16:04:53 +03:00
Araq
c97cbe7abd fixes #3299 2015-10-15 09:31:54 +02:00
Clay Sweetser
804455df53 Added DLL download to installer 2015-10-15 02:34:30 -04:00
Araq
3fef9f08bd fixes regression: tactiontable 2015-10-14 14:35:44 +02:00
Araq
a40ace648d fixes regression: tobjconstr2 test works again 2015-10-14 00:41:27 +02:00
Araq
7f4f37eaa2 fixes tunittest crash 2015-10-13 16:31:30 +02:00
Araq
8be9e46403 udpated the compiler and tester to use getOrDefault 2015-10-13 14:10:33 +02:00
Araq
2fda95a4d6 added getOrDefault; bootstrapping works again 2015-10-13 03:03:05 +02:00
Araq
d8b0edc323 Merge branch 'mget' of https://github.com/def-/Nim into def--mget
Conflicts:
	lib/pure/collections/critbits.nim
	lib/pure/collections/tables.nim
	lib/pure/xmltree.nim
	lib/system/sets.nim
	tests/collections/ttables.nim
	tests/collections/ttablesref.nim
2015-10-13 00:22:27 +02:00
Araq
ca75985fc1 nimsuggest: added 'dus' command that combines 'def' and 'use' 2015-10-12 16:55:24 +02:00
Araq
3e897a7c71 added setResult that simply takes a node 2015-10-12 16:55:22 +02:00