Commit graph

385 commits

Author SHA1 Message Date
Araq
c92fdb24c8 fixes #5015 2018-10-03 00:00:19 +02:00
Araq
bf85955802 fixes #7092 2018-10-02 23:45:27 +02:00
Araq
7935c4aa5a C++ codegen: emit correctly typed code for closures in 'const'; refs #7870 2018-10-02 19:35:24 +02:00
LemonBoy
a1083d7c43 Fix codegen for some set operations
Taking the LHS type when a temporary result value was needed lead to bad
code being generated if we get a tyRef.

Fixes #9098
2018-09-28 09:59:45 +02:00
Andreas Rumpf
c38a608c90 C codegen: support system.move and system.wasMoved 2018-09-24 16:00:57 +02:00
Andreas Rumpf
179791aa9a
Merge pull request #8746 from LemonBoy/nil-opts
nil strings are movable
2018-09-23 07:51:22 +02:00
LemonBoy
7a087ffb29 nil strings are movable 2018-09-22 20:47:49 +02:00
LemonBoy
6af6ca6351 Fix codegen for set[T] parameters
Sometimes sets are materialized as arrays and we must treat them as
such: the CPP backend is pickier than the C one and would sometimes
produce invalid code.

Fixes #8967
2018-09-15 11:55:11 +02:00
Araq
64517445ea even more strict isNil handling for strings/seqs in order to detect bugs 2018-08-22 12:35:46 +02:00
Andreas Rumpf
ddaf2e3805 some progress on destructors for builtin seqs 2018-08-20 17:59:47 +02:00
Andreas Rumpf
696c0c48c7 fixes merge conflict 2018-08-19 15:14:03 +02:00
Andreas Rumpf
792829ad25 exploit the fact that empty seqs don't have to allocate in the code generator 2018-08-18 16:59:59 +02:00
Emery Hemingway
2da0341b4d Genode fixes (#8501)
* Genode fixes

- wrap strings in "Genode::Cstring" when logging
- define SIGABRT for Genode
- disable GCC -fstack-protector
- use log RPC for fatal messages
- add --os:genode build to appveyor
- define paramStr and paramCount

* Select fixups for Genode POSIX
2018-08-16 18:12:37 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Araq
640b30a47f codegen improvement: map the empty string to 'nil' since it's now allowed to do that 2018-08-08 12:06:00 +02:00
andri lim
4d5cce9882 fixes #6255, add system.ashr arithmetic right shift (#8547) 2018-08-07 18:41:30 +02:00
Araq
7ac6462cbd make at least bootstrapping work 2018-08-05 14:17:24 +02:00
Andreas Rumpf
c57e320c94
fixes 7833 (#8533)
* fixes #7833; still to-do: fix setLen
* make tests green again
* also fixes setLen and string concats; refs #7833
* change formating to avoid a compiler warning
* emit the write barrier also for addChar
* fixes yet another regression
* make setLengthStr compile for the old version
* make growobjcrash complete earlier
2018-08-05 11:42:38 +02:00
Araq
f131867de7 emit the write barrier also for addChar 2018-08-04 16:56:35 +02:00
Araq
39192fa568 also fixes setLen and string concats; refs #7833 2018-07-31 15:46:00 +02:00
Araq
53566f7165 fixes #7833; still to-do: fix setLen 2018-07-30 23:27:01 +02:00
Andreas Rumpf
f485ebe162 --gc:destructors: next steps; WIP 2018-07-21 13:16:53 +02:00
Andreas Rumpf
4389409e26 fix merge conflict 2018-07-18 09:46:30 +02:00
Andreas Rumpf
32afdc09c6 WIP: strings/seqs based on destructors 2018-07-17 13:19:42 +02:00
Andreas Rumpf
74bf316619 more progress on destructor based strings 2018-07-13 21:15:47 +02:00
Yuriy Glukhov
dfe3f16022 Don't depend on string.h in codegen (#8299) 2018-07-13 17:41:59 +02:00
Andreas Rumpf
5b59852406 system.substr is not implemented with compilerProcs anymore 2018-07-11 16:39:16 +02:00
Andreas Rumpf
ce01472ff3 refactorings in preparations for the new runtime 2018-07-10 10:39:53 +02:00
Araq
8bcaee1fdf make tmemfile2 work again 2018-07-06 15:53:32 +02:00
Andreas Rumpf
9b31f67859 turn destructors into finalizers 2018-07-05 11:31:27 +02:00
Andreas Rumpf
e455023902 Merge branch 'devel' into araq-devel 2018-07-01 16:24:56 +02:00
LemonBoy
64c84a7d11 Fix codegen for mInSet magic and empty sets (#8140)
Fixes #8041
2018-06-29 15:10:51 +02:00
Andreas Rumpf
b5a96d28c7 codgen refactoring: prepare for alternative string/seq implementations 2018-06-29 11:34:39 +02:00
LemonBoy
8508dc46c8 Fix minor codegen issue with static data types 2018-06-19 17:12:51 +02:00
Yuriy Glukhov
7a4b343d8d Added NIM_STRLIT_FLAG to seq literals 2018-06-12 12:39:54 +03:00
LemonBoy
ac0f986008 Correct field lookup in concept types
Fixes #6770
2018-06-12 00:36:43 +03:00
Araq
8e9551b1c7 fixex merge conflicts 2018-06-08 19:50:36 +02:00
Andreas Rumpf
bf394ed1a1
Merge pull request #7550 from jangko/fix4799
fixes #4799, varargs now can accept polymorphic types
2018-06-06 22:04:54 +02:00
Andreas Rumpf
1593b9cac4
Merge pull request #7967 from nitely/empty_openarray_7904
support empty toOpenArray
2018-06-06 11:06:57 +02:00
nitely
ba39f359aa check bounds instead of index 2018-06-05 20:22:27 -03:00
andri lim
80107b360c add more test to 4799 2018-06-05 09:18:20 +07:00
Andreas Rumpf
9ab92824f6 AST change: keep nkStaticStmt in the AST for incremental compilation support 2018-06-03 20:16:29 +02:00
Andreas Rumpf
a4e2b0c153 platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals 2018-05-18 15:18:00 +02:00
Andreas Rumpf
bf6c2c5ccf preparations of making compiler/msgs.nim free of global variables 2018-05-17 15:21:22 +02:00
Yuriy Glukhov
cfe40a3e6e Merge branch 'devel' into yield-in-try 2018-05-15 19:54:52 +03:00
Andreas Rumpf
328e7a1005 options.nim: no global variables anymore 2018-05-13 17:52:21 +02:00
Andreas Rumpf
297038f704 move more globals into the config object 2018-05-13 14:19:42 +02:00
Andreas Rumpf
1284827df2 C code generator compiles again 2018-05-12 23:45:51 +02:00
Yuriy Glukhov
d71f69ab50 Closure iter transformation 2018-05-09 22:25:27 +03:00
Araq
851d2a266d introduce --laxStrings:on switch 2018-04-30 19:57:52 +02:00