Commit Graph

3743 Commits

Author SHA1 Message Date
Andreas Rumpf
8780d25e03 minor refactorings for better destructors 2017-10-14 20:37:49 +02:00
Andreas Rumpf
4eaa2bf15d improve code generation for custom strings/seqs 2017-10-14 20:37:49 +02:00
Andreas Rumpf
5dca695bcf new destroyer pass works with procs too 2017-10-13 07:00:52 +02:00
Andreas Rumpf
63530be0b8 introduce --newruntime switch for the upcoming destructors and move semantics 2017-10-13 06:38:59 +02:00
Andreas Rumpf
a2e4ab2e4e simple programs now work with the new destroyer pass 2017-10-12 17:42:15 +02:00
Andreas Rumpf
d6c401acfb code cleanups for the upcoming reworked destructors 2017-10-12 12:47:34 +02:00
Andreas Rumpf
ec253ada72 initial version of the new untested destructor pass 2017-10-12 11:32:29 +02:00
Andreas Rumpf
078e78d208 do not produce the annoying small 'l' warning 2017-10-10 21:59:23 +02:00
Andreas Rumpf
1063085850 fixes #6474 2017-10-10 13:57:03 +02:00
Andreas Rumpf
91981c07bd some progress on destroyer.nim 2017-10-10 13:17:35 +02:00
Andreas Rumpf
083cb00e8d added a minor note to destroyer.nim 2017-10-10 11:26:29 +02:00
Andreas Rumpf
ac3e3cf2b0 fixes a renderer regression that affects c2nim 2017-10-10 11:15:18 +02:00
Andreas Rumpf
3308d26581 breaking change: arrays of char do not convert to cstring; ptr to array of char does 2017-10-10 00:17:20 +02:00
Andreas Rumpf
db0d353281 Merge branch 'stringify-array' of https://github.com/krux02/Nim into krux02-stringify-array 2017-10-09 23:46:24 +02:00
Andreas Rumpf
d8746398c4 allow macros to produce nnkGotoState and nkState 2017-10-09 21:12:40 +02:00
Andreas Rumpf
cf01cb1935 preparations for a new AST transformation pass with the aim of giving us reliable destructors 2017-10-09 21:12:40 +02:00
Andreas Rumpf
6e337fe58a further preparations for 'opt' builtin type 2017-10-09 21:12:40 +02:00
Andreas Rumpf
740c07ead4 fixes a codegen bug: in 'result = f(result)' the default initialization for 'result' IS required 2017-10-09 21:12:40 +02:00
Andreas Rumpf
7eaa2474a2 disable the new DFA 2017-10-09 21:12:40 +02:00
Andreas Rumpf
b9511a2d7f work in progress: a dataflow architecture for Nim 2017-10-09 21:12:40 +02:00
Eduardo Bart
5c1a842b88 Add missing nilChecks compiling option (#6480) 2017-10-09 19:09:49 +02:00
Andreas Rumpf
125ccd303e nimpretty bugfix 2017-10-06 08:20:56 +02:00
Andreas Rumpf
eddf9abd13 beginnings of the new nimpretty tool; still unusable 2017-10-05 08:43:22 +02:00
Bo Lingen
535f21ced3 direct nim --version to stdout rather than stderr (#6460)
Closes #6298
2017-10-02 12:20:24 +02:00
Andreas Rumpf
02ff5f596c implemented new experimental scriptable import mechanism 2017-10-01 23:38:23 +02:00
Andreas Rumpf
ddc131cf07 the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
Araq
b2c358be96 the 'using construct is not .experimental anymore 2017-09-30 18:32:44 +02:00
Araq
3ccc9c467d 'with' and 'without' are not keywords anymore 2017-09-30 18:32:44 +02:00
Araq
7b63ee85b9 fixes #6452 2017-09-30 15:37:01 +02:00
Andreas Rumpf
7349d12e96 GC v2 works sometimes 2017-09-28 21:48:43 +02:00
Andreas Rumpf
2bdbe97af1 workaround a GC/codegen issue that proves nasty to fix 2017-09-26 22:19:31 +02:00
Andreas Rumpf
61720e0df9 breaking change: getAst strips away pointless nnkStmtList nodes; node rendering of nnkStmtList without wrong indentation 2017-09-26 10:24:14 +02:00
Andreas Rumpf
77453f33df fixes #6435 2017-09-25 14:27:19 +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
be2e7290fb write tracking for funcs implemented 2017-09-23 23:29:23 +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
7aad0d6544 added 'nim jsonscript' feature 2017-09-23 16:29:05 +02:00
Andreas Rumpf
5298a72f34 NimScript: added buildOS and buildCPU constants 2017-09-22 13:29:45 +02:00
Andreas Rumpf
dcfafb3289 Merge branch 'araq-better-pure-enums' into araq-better-codegen 2017-09-22 10:15:49 +02:00
Andreas Rumpf
3936587c06 fixes #6403 2017-09-21 21:07:18 +02:00
Andreas Rumpf
1c0c9d8959 make tests green again 2017-09-21 21:07:00 +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
fd4ef6ae8f .pure enums are much more convenient to use now 2017-09-17 17:36:37 +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
Yuriy Glukhov
c3117e1aba Fixes #6336 (#6337) 2017-09-06 22:55:09 +02:00
Yuriy Glukhov
d8944b93cb Fixed handling of versions with dashes in nimble pkgs (#6335) 2017-09-06 15:02:25 +02:00
Andreas Rumpf
2ef65d5cdf C++ codgen: do not emit struct literals if not possible 2017-09-05 09:28:36 +02:00