Andreas Rumpf
ec253ada72
initial version of the new untested destructor pass
2017-10-12 11:32:29 +02:00
Andreas Rumpf
6e337fe58a
further preparations for 'opt' builtin type
2017-10-09 21:12:40 +02:00
Andreas Rumpf
e9243a1616
Merge branch 'devel' into araq
2017-10-02 08:31:38 +02:00
Andreas Rumpf
f7f3a25be8
first steps of making 'opt' a first class type for Nim
2017-09-25 13:19:36 +02:00
Andreas Rumpf
e879da5791
some work to make 'opt' a first class type
2017-09-24 11:21:52 +02:00
Andreas Rumpf
1a61c4d46d
first implementation of the 'func' keyword
2017-09-23 23:22:53 +02:00
Andreas Rumpf
2e93bac227
Merge branch 'devel' into araq-better-codegen
2017-09-23 20:07:30 +02:00
Andreas Rumpf
5298a72f34
NimScript: added buildOS and buildCPU constants
2017-09-22 13:29:45 +02:00
Andreas Rumpf
3936587c06
fixes #6403
2017-09-21 21:07:18 +02:00
Andreas Rumpf
405b9c8a85
refactoring: TLoc knows the node it originated from; it is planned to use this to produce better C code (move optimizations)
2017-09-21 14:38:45 +02:00
Andreas Rumpf
a04c7d8b38
introduce OnHeapNew and rename TLoc.s to TLoc.storage
2017-09-21 11:38:04 +02:00
Andreas Rumpf
ecf1424456
Merge branch 'devel' into araq
2017-09-15 21:12:59 +02:00
Parashurama
88a5e9d88c
Fix operations on string as openarray in VM. ( #6257 )
...
* fix openarray.len for string as openArray in VM.
* fix openarray[idx] for string as openArray in VM.
* fix openarray[idx]=val for string as openArray in VM.
* add tests for passing string as openArray in VM.
* fix issue with NimNode.len
NimNode.len was also returning len for string literals.
also fix logic bug in if/elif chain.
2017-09-15 13:35:57 +02:00
Andreas Rumpf
39f0195ebf
Merge branch 'devel' into araq
2017-09-15 09:27:51 +02:00
Andreas Rumpf
50f62ff44a
distinguish between 'reorder' and 'noforward'
2017-07-26 08:20:11 +02:00
Andreas Rumpf
2b862b74e0
Merge branch 'devel' into araq
2017-07-13 04:48:22 +02:00
Zahary Karadjov
8f4b374327
Fix #4020 ; Better handling of templates within concepts
2017-06-20 11:29:42 +02:00
Andreas Rumpf
7a95c961a7
cleanup of in/out covariance handling
2017-05-17 20:54:53 +02:00
Andreas Rumpf
a5695c13af
Merge branch 'zahary' into araq
2017-05-16 17:29:44 +02:00
Zahary Karadjov
0aede22e87
enforce the covariance rules for user-defined generic types
2017-05-13 14:38:07 +03:00
Zahary Karadjov
a802d72452
doh, forgot to add all files in the previous commit
2017-05-12 12:46:09 +03:00
Zahary Karadjov
5e368f3639
support for external types with covariant generic params
2017-05-08 21:45:37 +03:00
Andreas Rumpf
02bbfa1164
precise stack scanning for Nim's GCs; work in progress
2017-04-19 08:33:19 +02:00
Zahary Karadjov
a3f19c87fb
lift parameter-less do block to lambdas
2017-04-10 23:58:05 +03:00
Zahary Karadjov
987b522071
fix the do notation when used with procs
2017-04-09 22:59:24 +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
74a80988d9
proper error reporting for concepts and the introduction of the {.explain.} pragma
2017-03-24 16:59:47 +02:00
Zahary Karadjov
644d645ea7
implement the special treatment of explicit type params in concepts
2017-03-24 16:58:15 +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
0b0a3e5f20
support derived values in non-generic user type classes
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
8cd5f1f8f5
introduce tyInferred for the unbound concept type params
...
* Why is tyInferred needed?
The bindings in TCandidate are capable of inferring types within a single
call expression. In concepts, we need to infer types in the same way, but
across the whole body of the concept.
Previously, once a concept type param was inferred, it was destructively
mutated using t.assignType, but this proved to be problematic in the presence
of overloads, because the bindings established while a non-matching overload
is tested must be reverted/forgotten. tyInferred offers a non-destructive way to
keep track of the inference progress.
While introducing new types usually requires a lot of code paths in the compiler
to updated, currently tyInferred is only a short-lived type within the concept body
pass and it's unlikely to introduce breakage elsewhere in the compiler.
2017-03-24 16:58:15 +02:00
Zahary Karadjov
66e0f0e19c
concept type params inference working in basic examples
2017-03-24 16:58:15 +02:00
Araq
b1c494a150
Merge branch 'devel' of github.com:nim-lang/Nim into devel
2017-03-14 15:56:08 +01:00
Araq
142b604c13
fixes #5529 ; don't merge type visibility flags
2017-03-14 15:55:23 +01:00
Andreas Rumpf
4912300ca7
Merge branch 'devel' into faster-nimsuggest
2017-03-14 10:18:20 +01:00
zah
1be0022e7c
Fixes #5167 and related problems ( #5475 )
...
This commit returns to a bit less strict checking of the number
of macro arguments, because some old immediate macros rely on a
behavior where even the arity of the macro is not being checked.
It may be better if such macros are just declared to use varargs[expr],
but this remains for another day.
2017-03-12 09:33:49 +01:00
Araq
556b564c7d
nimsuggest: make tests green again
2017-03-10 00:18:24 +01:00
Arne Döring
92c2a51bf7
removed compiler internal list implementation ( #5371 )
2017-02-22 17:33:12 +01:00
Araq
97e26967f1
fixes #5383
2017-02-16 00:43:14 +01:00
Dominik Picheta
d5bb5e832b
Merge branch 'devel' into feature/3691
2017-02-07 18:34:05 +01:00
Andreas Rumpf
abaf5d0bdb
fixes #5285
2017-02-04 21:00:07 +01:00
Dominik Picheta
814f527175
Fixes based on @Araq's feedback.
2017-02-01 21:51:17 +01:00
Dominik Picheta
3cbfd56e1d
Fixes #3691 .
2017-02-01 21:11:40 +01:00
Dominik Picheta
e8c46d29cd
WIP implementation of except ExcType as ident syntax. Refs #3691 .
2017-02-01 00:32:56 +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
Araq
b234b082b6
bootstrapping works again
2016-11-12 12:39:21 +01:00
Araq
773d17cd14
big refactoring: step 1
2016-10-31 15:34:44 +01:00