Commit Graph

137 Commits

Author SHA1 Message Date
Araq
c97cbe7abd fixes #3299 2015-10-15 09:31:54 +02:00
Araq
5a003532d0 fixes #2473; cleanup of some tests 2015-09-30 21:13:13 +02:00
Araq
6268bf33a2 fixes #3387 2015-09-29 19:30:46 +02:00
Araq
f937637a92 fixes #3357 2015-09-23 21:46:33 +02:00
Yuriy Glukhov
04a4f35400 VM produces objects. 2015-09-05 14:18:37 +03:00
Yuriy Glukhov
49869a2b10 when nimvm stmt proof of concept 2015-09-04 20:50:29 +03:00
Araq
695e2e970e implemented macros.getImpl 2015-08-21 02:34:34 +02:00
Araq
cc934a1a1b VM: repl supports global variables properly" 2015-08-16 13:41:27 +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
799e0f3274 fixes #3066 2015-08-09 23:53:22 +02:00
Araq
50861792f4 fixes #1329 2015-08-09 23:07:53 +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
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
65c1b0c128 fixes #3041 2015-07-02 22:45:33 +02:00
Araq
17cace280c fixes #2297, fixes #2946 2015-06-18 15:06:00 +02:00
rku
87b6220897 Removed magics: mAbsI64 2015-06-10 10:25:36 +03:00
rku
3984fecae6 Removed magics: mBitnotI64 2015-06-10 10:25:36 +03:00
rku
47114342c4 Removed magics: mEqI64 mLtI64 mLeI64 2015-06-10 10:25:36 +03:00
rku
658dcd2a58 Removed magics: mShrI64, mShlI64, mBitandI64, mBitorI64, mBitxorI64
Author:    rku <rokups@zoho.com>
2015-06-10 10:25:36 +03:00
rku
372a5d3cbb Removed magics: mAddI64, mSubI64, mMulI64, mDivI64, mModI64
Author:    rku <rokups@zoho.com>
2015-06-10 10:25:35 +03:00
Araq
d3fc6e1f28 marshalling can be done at compile-time 2015-04-25 23:17:00 +02:00
Araq
4be0d16520 added '..^' and '..<' operators; 'nil' is allowed for 'len'; added plugin system to the compiler 2015-04-22 12:04:11 +02:00
Araq
aacaa8f171 cleaned up some magics to make room for new magics; added '..<' and '..^' templates 2015-04-22 12:04:09 +02:00
Araq
7be092bba5 VM: minor fixes to make lexim work 2015-04-20 11:36:13 +02:00
Joseph Turner
0fa82763fe Fixes #1986 when calling sameConstant on uint
The problem was saveConstant only checked the range
`nkCharLit..nkInt64Lit`, but not up to UInt. This lead to the sonsLen
method being called, where sons was never declared.

This commit changes it to `nkCharLit..nkUint64Lit`, to match the case
statements in the type definition of TNode, in ast.nim.
2015-04-09 03:59:08 +01:00
Araq
46fb0e0bac fixes another regression 2015-03-27 11:57:03 +01:00
Araq
bf90b9c833 fixes #2346 2015-03-16 23:02:20 +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
Federico Ceratto
657dca5c3b Fix typos 2015-02-15 16:20:32 +00:00
Araq
ecd0dea091 tables work in 'const' sections; echo supports 'nil' strings; minor cleanups 2015-02-09 00:08:55 +01:00
Simon Hafner
1a8541d908 Fixed high(cstring) in vmgen too 2015-02-01 04:11:46 -06: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
f3c55704a0 unstaged file 2015-01-05 03:56:05 +02: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
41587a5339 fixes #1781 2014-12-28 00:42:24 +01:00
Araq
2be3f501a1 fixes #1742 2014-12-24 13:02:58 +01:00
Araq
bd88e526cf fixes #1744 2014-12-17 23:21:15 +01:00
Araq
c00a3fdc5b fixes #1718 2014-12-10 20:17:36 +01:00
Araq
c5cc20d337 fixes #1548 2014-11-17 08:54:31 +01:00
Araq
b2f577df23 fixes #1473 2014-11-12 02:36:59 +01:00
Billingsly Wetherfordshire
50d9db03c6 fix issue #1581 2014-10-20 19:12:10 -05:00
Araq
7916b1f9aa implemented 'guard' annotation 2014-09-21 18:39:00 +02:00
Araq
9d9c3fe121 merged things from devel 2014-09-12 01:37:48 +02:00
Araq
dafa8ccaf3 fixes #903, fixess #1513 2014-09-11 01:45:14 +02:00
Araq
bf557a7cdb added nimfix tool 2014-09-05 01:16:48 +02:00