Commit Graph

119 Commits

Author SHA1 Message Date
Andreas Rumpf
8780d25e03 minor refactorings for better destructors 2017-10-14 20:37:49 +02:00
Andreas Rumpf
1a61c4d46d first implementation of the 'func' keyword 2017-09-23 23:22:53 +02:00
Zahary Karadjov
ba61e7e3ac fix #2730; fix #4880 2017-06-20 11:29:42 +02:00
Zahary Karadjov
f0999de9dc Fix #5962
During the instantiation of a generic type A, some other generic
type B may be instantiated multiple times with different parameters.
We can think about each instantiation as a function call that should
temporary bind the parameter names to concrete types. The problem
with the existing implementation in semtypinst was that it was
performing this binding within a shared global table. In this sense,
it was executing the code as a programming language featuring only
global variables. In such a language, re-entrant functions cannot be
defined properly and hence this was leading to problems with similar
types. The solution is simple - just like we need to introduce stack
frames to handle re-entrant functions, we introduce a stack of type
bindings that are pushed and popped during the generic instantiations.
2017-06-20 11:29:42 +02:00
Araq
4033929127 fixes tproctypecache_falsepositive.nim test case 2017-06-08 18:35:37 +02:00
Zahary Karadjov
d578815963 fix #5683 2017-04-14 23:54:09 +03:00
Zahary Karadjov
03172bef6f fix #5643; fix #5644 2017-04-08 23:42:42 +03:00
Zahary Karadjov
e9a3ffbc3d Restore the Nim's 0.14 proper handling of generic aliases
A more efficient implementation is possible by restoring the old
lifting ot tyGenericInvocation to tyGenericInst in liftTypeParam,
but this fix will suffice for now.

fixes #5087
fixes #5602
fixes #5641
fixes #5570
2017-04-08 17:28:19 +03:00
Zahary Karadjov
ee4b98ec17 wip fix #5640 2017-04-07 15:05:14 +03:00
andri lim
fce4b7cd62 attempt to fix #5621 #5615 generic ref object typeRel (#5633) 2017-03-31 21:58:09 +02:00
Zahary Karadjov
cbf66e99a8 Working test cases for the sophisticated matrix library example from the manual
Fixed the dot operator when used within return types (see tgenericdotrettype)
Fixed the matching of generic concepts aliases used with the implicit generics style
2017-03-24 16:59:47 +02:00
Zahary Karadjov
74a80988d9 proper error reporting for concepts and the introduction of the {.explain.} pragma 2017-03-24 16:59:47 +02:00
Zahary Karadjov
0f2c4be129 infer static parameters even when more complicated arithmetic is involved 2017-03-24 16:58:15 +02:00
Zahary Karadjov
76c663f692 support for inferring static[T] concept params 2017-03-24 16:58:15 +02:00
Zahary Karadjov
eab1d0cc02 support for accessing the inferred concept type params with the dot operator 2017-03-24 16:58:15 +02:00
Andreas Rumpf
93068f1ba6 avoid some compiler crashes in debug mode 2017-01-23 11:22:19 +01:00
Andreas Rumpf
e169eaac5b make tsigbreak.nim compile 2016-12-12 14:08:01 +01:00
Araq
ebaf57ea3b further progress 2016-11-28 14:16:28 +01:00
Araq
e6c5622aa7 removed tyArrayConstr completely from the compiler; introduced tyAlias instead in preparation for further bugfixes 2016-11-14 23:18:30 +01:00
Andreas Rumpf
0e9d12639e fixes #4677 properly 2016-09-03 11:12:19 +02:00
Andreas Rumpf
1528d7c6e8 fixes #4677 2016-09-03 11:12:19 +02:00
Andreas Rumpf
39ebe2175b compiler almost free of deprecated expr/stmt names 2016-07-30 16:34:42 +02:00
Andreas Rumpf
f5fa5dae85 generic multi-methods should work now 2016-07-28 20:23:24 +02:00
Andreas Rumpf
b47d9b7b91 fixes #4371 2016-07-08 10:34:12 +02:00
Andreas Rumpf
06d4131ce1 fixes #3669 2016-03-01 23:25:46 +01:00
Andreas Rumpf
38dee2095c added 'sig' feature; removed tfShared support in the compiler 2016-02-28 19:56:41 +01:00
def
7177e0058b Consistently use Channel instead of TChannel 2016-02-25 04:04:45 +01:00
Araq
760242b870 removes 'x is iterator' special casing in the language 2015-12-03 01:08:03 +01:00
Araq
d93507fd2e fixes #3338 2015-10-22 10:24:46 +02:00
Araq
36f68e1650 fixes #3329 2015-09-18 02:24:12 +02:00
Araq
e5d8988175 fixes #3112 2015-07-14 01:37:09 +02:00
Araq
3df9d2bd0c fixes #2540 2015-07-03 00:20:33 +02:00
Araq
e55f5d1fd4 fixes #2505, fixes #1853, fixes #2522 2015-04-20 21:25:49 +02:00
Araq
d89a20cc1d fixes #2509 2015-04-11 10:01:10 +02:00
Araq
78f371c03a first implementation of overloading of '='; missing: rewriting let/var sections 2015-04-06 23:21:51 +02:00
Araq
765f274629 fixes #1783 2015-03-23 00:09:34 +01:00
Araq
bf90b9c833 fixes #2346 2015-03-16 23:02:20 +01:00
Max Zerzouri
7527da7043 .n.isNil checks for tyTuple PTypes. 2015-03-07 17:56:29 +13:00
Araq
2ebeb0bd21 fixes #2169 2015-02-28 20:13:21 +01:00
Araq
9053799bf5 fixes #2216 2015-02-26 02:05:23 +01:00
Araq
fce2ff161e tsigtypeop.nim works again 2015-02-25 21:36:43 +01:00
Araq
b7f11b8b0a fixes #2125 2015-02-18 13:44:01 +01:00
Federico Ceratto
c95f6f117a Fix typos 2015-02-15 16:06:06 +00:00
Araq
26b853923c nimsuggest: first version 2015-01-27 01:36:19 +01:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
Araq
18cbd51600 fixes #1187 2014-12-19 12:53:51 +01:00
Araq
866ce10b05 fixes #1687 2014-11-30 23:11:32 +01:00
Araq
bb532a697e fixes #1562, fixes #1543 2014-11-20 21:02:51 +01:00
Araq
d576fbb39a implemented locking levels; still incomplete 2014-09-27 15:06:06 +02:00
Araq
1088814e56 deepCopy is instantiated when its corresponding type is instantiated 2014-09-26 09:36:09 +02:00