Timothee Cour
c731f7ab14
fixes #15939 , fixes #15464 , fixes #16169 , fixes #16226 VM now supports addr(mystring[ind]) (index + index assignment) ( #15987 )
...
* fix #15939 , fix #15464 VM now supports `addr(mystring[ind])` (index + index assignment), var char return etc
* cleanups
* cstring tests
* add test for bug #15464
* improve test coverage
2020-12-03 16:55:43 +01:00
flywind
e6e1e9574d
combine PR#16009 and PR#16012 ( #16024 )
...
* fix #15623
* add testcase for #15623
* add testcase
* combine #16009
* support casting nil to NilableTypes in VM
2020-11-18 08:28:05 +01:00
Andrey R (cooldome)
632af8afad
Revert "follow #16009 VM supports cast nil to ptr ( #16012 )"
...
This reverts commit fec19c980e .
2020-11-17 18:54:33 +00:00
flywind
fec19c980e
follow #16009 VM supports cast nil to ptr ( #16012 )
...
* follow #16009 VM supports cast nil to ptr
* more testcase
2020-11-17 10:47:01 +00:00
flywind
a8af664e8b
fix #15463 ( #15831 )
2020-11-05 14:00:08 +01:00
flywind
5b4c17b5e7
Closure iterators are not supported by VM ( #15818 )
2020-11-02 10:58:14 +01:00
flywind
558115fa29
fixes #15717
2020-11-02 10:27:48 +01:00
Timothee Cour
d4c2e2c53f
fix #15704 #15597 wrong VM register was freed ( #15705 )
...
* fix #15704 #15597 wrong VM register was freed
* same treatment for nkCheckedFieldExpr
* note concerning HighRegisterPressure
* bump NimPatch
* Update lib/system.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-10-26 09:13:37 +01:00
Andreas Rumpf
226595515c
explicit ID generation for easier IC ( #15559 )
...
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
Timothee Cour
64eb62889a
[minor] nimVMDebug: fix codeListing formatting for jump-to-file to work ( #15711 )
2020-10-25 01:56:07 +03:00
cooldome
ae320b4e7d
fix #15662 ( #15678 )
...
* fix #15662
* alternative fix
* fix spacing
2020-10-23 11:14:54 +02:00
Andreas Rumpf
4e438f9096
const view types; fixes some cases from https://github.com/nim-lang/Nim/issues/15428 ( #15488 )
2020-10-05 18:31:46 +02:00
Miran
6a621b35e7
fix warnings for deprecated low and high ( #15291 )
2020-09-11 01:04:07 +02:00
Clyybber
13e659cfec
Big compiler Cleanup ( #14777 )
2020-08-28 22:18:09 +02:00
Andreas Rumpf
71dd5f85b9
'isolate' builtin; refs https://github.com/nim-lang/RFCs/issues/244 ( #15011 )
2020-07-20 07:50:19 +02:00
Timothee Cour
e30a08103d
remove tyOpt, mOpt ( #14636 )
...
* remove tyOpt, mOpt
* fixup
2020-06-12 11:03:52 +02:00
Timothee Cour
66db9de714
CT sizeof(+friends) for {.importc, completeStruct.} types, enable ABI static checks ( #13926 )
...
* -d:checkabi obsolete (ABI check now enforced); add `addTypeHeader` helper
* cleanups
* import sizeof at CT for {.completeType.}
* address comments; revert default enabling of -d:checkAbi for now
* mimportc_size_check.nim => msizeof5.nim; merge mabi_check.nim into msizeof5.nim; refactor
* all pragmas in errmsgs should be written: '.importc' (un-ambiguous and less verbose than {.importc.})
2020-04-23 11:24:09 +02:00
Arne Döring
2f557652d4
fix operators containing percent for VM usage ( #13536 )
...
* fixes #13513
* merge tarithmetics in tarithm
2020-03-11 01:01:25 +01:00
Arne Döring
eb42f38088
Remove dead magics ( #13551 )
2020-03-03 12:42:43 +01:00
cooldome
c79df2fb6a
EndsInNoReturn in expressions extension, fixes #13490 ( #13520 )
...
* fix #13490
2020-02-28 09:55:06 +00:00
Timothee Cour
13c08f3ab4
VM: support importc var, ptr/pointer types, cast int <=> ptr/pointer ( #12877 )
...
* VM: allow certain hardcoded special var variables at CT
* VM: allow all importc var, cast[int](ptr)
* fix tests tests/vm/tstaticprintseq.nim, tests/cpp/t8241.nim
* VM: == works for ptr/pointer nodes
* bugfix: ==, cast now also works for pointer, not just ptr
* VM supports cast PtrLikeKinds <=> PtrLikeKinds / int
* improve cname handling
* fixup + bug fix
* VM: support cast from ref to int
* address comment: opcLdGlobalDeref => opcLdGlobalDerefFFI
* defensive check against typ == nil
2020-01-05 09:11:29 +01:00
Ico Doornekamp
6aade97fe8
Refactored VM registerlayout. The size and location of the registers in ( #12775 )
...
the instructions are now all derived from a single definition, allowing
the register layout to be changed.
2019-11-30 13:38:36 +01:00
Araq
0996eb174f
fixes #11727 [backport]
2019-11-28 23:00:34 +01:00
Araq
87f0d534d6
fixes #12488 [backport]
2019-11-28 23:00:34 +01:00
Clyybber
7e747d11c6
Cosmetic compiler cleanup ( #12718 )
...
* Cleanup compiler code base
* Unify add calls
* Unify len invocations
* Unify range operators
* Fix oversight
* Remove {.procvar.} pragma
* initCandidate -> newCandidate where reasonable
* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Andreas Rumpf
abe07eb75d
VM: improvements for var T/addr ( #12667 ); fixes #12489
2019-11-28 09:56:02 +01:00
Andreas Rumpf
56a00da34a
fixes #12612 [backport] ( #12681 )
2019-11-19 12:09:36 +01:00
Andreas Rumpf
a14abc5708
ARC: solves phase ordering problems ( #12654 )
2019-11-14 23:19:18 +01:00
Araq
1214960a1b
fixes #12547 [backport]
2019-10-29 15:07:04 +01:00
Andreas Rumpf
e0d13abaff
VM: fixes register leaks [backport] ( #12510 )
2019-10-25 00:45:06 +02:00
Andreas Rumpf
801a794039
VM: fixes most ran-out-registers problems [backport] ( #12485 )
2019-10-24 17:29:32 +02:00
Andreas Rumpf
38b3590e40
fixes #12310 [backport] ( #12470 )
2019-10-20 22:37:31 +02:00
Andreas Rumpf
1964589a29
fixes #12294 [backport]
2019-09-30 20:01:25 +02:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Andreas Rumpf
162d74db91
fixes #10981 ; fixes #7261 ( #12217 )
2019-09-19 14:34:56 +02:00
Arne Döring
188ce5f3ee
add nodeId proc to macros ( #11456 )
...
* add nodeId proc to macros
* add doc comment.
* fix typo
2019-09-18 20:02:30 +02:00
Arne Döring
638a4d9d9f
rename cast opcodes, fix for 32bit cast, fix python pretty printer ( #12207 )
2019-09-18 09:04:37 +02:00
Araq
f1b7c0494e
fixes #12195
2019-09-17 15:15:12 +02:00
Clyybber
ed1d41c51e
Small ast.nim cleanup ( #12156 )
...
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
Andreas Rumpf
ac6fcab7a4
Merge branch 'devel' into uint-range-checks
2019-09-02 22:03:10 +02:00
Arne Döring
3d4ad9739c
fix min/max for float numbers ( #12068 )
2019-09-02 11:21:26 +02:00
Araq
e765687646
Merge branch 'devel' into uint-range-checks
2019-09-02 10:27:35 +02:00
Arne Döring
d564130a3b
Fix to int to biggest int ( #12066 )
...
* fix to(Biggest)Int
* kill toFloat magics as well
2019-08-27 23:18:46 +02:00
Arne Döring
ab8241ad42
minor stuff
2019-08-27 12:28:18 +02:00
Arne Döring
afbcd1b330
int128 on firstOrd, lastOrd and lengthOrd ( #11701 )
...
* fixes #11847
2019-08-07 15:53:16 +02:00
Arne Döring
b73d097d36
fixes #9829 ( #11849 )
2019-08-04 19:31:55 +02:00
Araq
07d465ca42
[refactoring] remove unused imports in the compiler and in some stdlib modules
2019-07-18 00:36:03 +02:00
Araq
7606efc0bf
[bugfix] VM: finally do inheritance properly
2019-07-12 12:15:30 +02:00
Araq
87a2ced1ba
there is only one style -- my style
2019-07-10 19:17:06 +02:00
Araq
78174857f8
fixes #10901
2019-07-10 16:10:20 +02:00