Commit Graph

134 Commits

Author SHA1 Message Date
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
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
Araq
c97cbe7abd fixes #3299 2015-10-15 09:31:54 +02:00
Araq
a2c040e3bd added undocumented exportNims pragma for Nimscript support 2015-10-03 23:19:15 +02:00
Adam Strzelecki
4be6844756 vm: Don't fail on unknown enum position to string
Previously trying to convert constant of enum type, where this enum type has no
entry with given constant position leaded to "internal error: opConv for enum".

Instead of producing error, now we gracefully convert it to "EnumType position".
2015-09-28 23:34:52 +02:00
Yuriy Glukhov
6ac2ba1223 Uint64 to string in pure nim. array[char] to string fixed in vm. 2015-09-14 20:32:09 +03:00
Araq
bf698fbc2a fixes some regressions 2015-09-12 13:32:51 +02:00
Yuriy Glukhov
04a4f35400 VM produces objects. 2015-09-05 14:18:37 +03:00
Araq
695e2e970e implemented macros.getImpl 2015-08-21 02:34:34 +02:00
Araq
9659540b18 preparations for Nimble NimScript integrations; minor cleanups 2015-08-18 14:01:40 +02:00
Araq
69b32637b1 implements experimental new config system based on NimScript 2015-08-16 13:41:30 +02:00
Andreas Rumpf
b3abcaf9e8 Merge pull request #3177 from zah/generic-types-in-macros
Generic types in macros
2015-08-14 01:51:25 +02:00
Araq
2e4b59f3d3 fixes #3192 2015-08-07 20:29:38 +02:00
Zahary Karadjov
fe124ceadc Disable the new generic params handling for immediate template and macros
Since immediate templates are not subjected to the standard sigmatching
algorithm, they will have a number of deficiencies when it comes to generic
params: Type dependencies between the parameters won't be honoured
and the bound generic symbols won't be resolvable within their bodies.
We could try to fix this, but it may be wiser to just deprecate immediate
templates and macros now that we have working untyped parameters.

Disabling the new features is admittedly not the greatest way to handle
this situations as it introduces inconsistency in the language, but at least
it makes the code backwards-compatible with the previous version of the
compiler instead of triggering more serious problems.
2015-08-02 23:58:22 +03:00
Zahary Karadjov
02f97489b7 fix #1858 again; restores the support for static macro params 2015-08-02 23:58:22 +03:00
Araq
ea35cede8e fixes #3103 2015-08-02 02:56:01 +02:00
Araq
9275d5c617 emerald project has a chance of working 2015-08-02 02:55:58 +02:00
Araq
728fc441ef staticExec now supports caching 2015-07-15 22:00:44 +02:00
Adam Strzelecki
1a0417fbe0 macros: Introduce sameType(a, b) for node types
Previously introduced node comparison `==` was working somehow wrong on nodes
returned from getType(a), comparing just ids of the symbols.

Recently introduced `==` change 47dce26886
started comparing symbol nodes pointer-wise, thus strictly. Since getType(a)
always creates new symbol pointing to the type, comparing two such nodes using
`==` always returns false, even they point to the same type.

That is why we need a new sameType macro to be able to tell if these nodes
point to the same type.
2015-07-03 11:11:10 +02:00
Araq
cc57a0430b fixes #3028 2015-07-01 02:15:20 +02:00
Araq
2236a5be61 VM: use stricter notion of equality for NimNode 2015-06-25 11:42:27 +02:00
Araq
17cace280c fixes #2297, fixes #2946 2015-06-18 15:06:00 +02:00
Adam Strzelecki
6ecce2941e macros: exprStructuralEquivalent for EqNimrodNode
Previously NimNode comparison in macros way returning false for anything else
than nil literal.
2015-06-10 18:07:21 +02: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
Araq
d3fc6e1f28 marshalling can be done at compile-time 2015-04-25 23:17:00 +02:00
Araq
7be092bba5 VM: minor fixes to make lexim work 2015-04-20 11:36:13 +02:00
def
7daf410f46 Improve error message for failed conversion in VM
- Fixes #2045

- Old one:
  Error: conversion from unknown type to unknown type is invalid
- New one:
  Error: conversion from -1 to [0..255] is invalid
2015-03-12 23:49:49 +01:00
Araq
83cab19c62 fixes #2252 2015-03-04 21:19:38 +01:00
Araq
8ade324b8c cleaned up whitespace 2015-03-04 18:17:43 +01:00
Araq
3bfcfeb0cf don't use stdout for nimsuggest server mode 2015-02-27 16:44:55 +01:00
Araq
752052e903 implements a type API for macros 2015-02-24 00:13:28 +01:00
Araq
1e6aef62ba macros.PNimrodNode is now NimNode 2015-02-24 00:13:27 +01:00
Araq
540f66cb09 fixes #2167 2015-02-20 20:01:23 +01:00
Araq
736a04c66b better error message 2015-02-08 13:38:04 +01:00
Araq
903ca78289 fixes #1989 2015-02-01 11:58:41 +01:00
Araq
26b853923c nimsuggest: first version 2015-01-27 01:36:19 +01:00
Audun Wilhelmsen
ca257efc84 Proposed fix for issue #1946 2015-01-16 22:32:00 +01:00
Dustin Lacewell
0619383f46 Revert 5e4ae8d 2015-01-07 14:07:06 -08:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
Zahary Karadjov
5e4ae8dbb4 fix #1858; Add support for generic templates and macros
Implementation notes:
Just after overload resolution, the resolved generic params will be added to the
call expression to be later processed in evalTemplate and evalMacroCall. These
procs have been modified to handle the increased number of parameters, but one
remaining issue is that immediate templates and macros don't go through the same
process. The next commit will outlaw the use of generic parameters with such macros.
2015-01-05 03:53:31 +02:00
Araq
bd88e526cf fixes #1744 2014-12-17 23:21:15 +01:00
Araq
b7c8063816 fixes #1689 2014-12-10 21:00:02 +01:00
Araq
d3cf767c3a fixes #1692 2014-12-10 19:59:14 +01:00
Araq
57689037c5 fixes #916 2014-11-20 21:39:08 +01:00
Araq
bc5879b9b7 fixes error propagation for macros.parseExpr 2014-11-13 09:12:27 +01:00
Araq
b2f577df23 fixes #1473 2014-11-12 02:36:59 +01:00
Araq
62ccf13529 'try' works at compile-time 2014-10-02 15:55:48 +02:00
Araq
d330a72a45 fixes documentation generator 2014-09-14 11:34:06 +02:00
Araq
41c7cde61f updated iup.nim; made tests green 2014-08-31 22:55:51 +02:00