Araq
af815c3c18
fixes #9864 [backport]
2018-12-05 10:58:18 +01:00
Jacek Sieka
07744b6e47
More dead code ( #9835 )
...
* remove more assignment flags
* needsComplexAssignment > containsGarbageCollectedRef
* remove OnStackShadowDup
2018-12-04 11:22:59 +01:00
Andreas Rumpf
7d82df20be
gc:destructors further progress
2018-11-29 01:13:32 +01:00
Andreas Rumpf
eb919c35b2
fixes #9675
2018-11-26 10:41:26 +01:00
Jacek Sieka
87568830ab
Remove dead code ( #9777 )
...
* gc/gc2: remove unused ref counting stuff
* also removes some false threading support - hasSharedHeap is always
false in gc/gc2
* gc: remove some threading cruft
* remove asgnRefNoCycle
* compiler: remove TLoc.dup (unused)
2018-11-26 09:47:39 +01:00
Jacek Sieka
2b2fc5c7e9
compiler: remove unused assignment flags ( #9760 )
2018-11-21 11:04:45 +01:00
cooldome
9b9f5dee0b
Fixes discard bug in cpp codegen ( #9747 ) [backport]
...
Fixes discard bug in cpp codegen
2018-11-19 08:44:49 +01:00
Araq
4bd9f32f33
--gc:destructors: hello world example compiles and runs
2018-11-16 00:13:49 +01:00
Andreas Rumpf
cb4d810659
make Nim take roughly 100MB less RAM for bootstrapping via a new compiler switch -d:leanCompiler; useful for the Raberry PI
2018-11-07 18:36:52 +01:00
Araq
e71410d74e
language cleanup: the .unchecked pragma is dead
2018-11-06 13:55:03 +01:00
Araq
b3d80dac9c
make tmissingbracket compile for C++; refs #7870
2018-10-30 16:52:33 +01:00
LemonBoy
b613092de8
Don't crash if GC_{un,}ref is called on nil ( #9445 )
...
Fixes #9442
2018-10-22 17:09:15 +02:00
Ștefan Talpalaru
10f5f67767
gogc: GCC-8.2.0 compatibility and other improvements ( #9211 )
...
- Go's write barriers are now plugged-in in all the relevant points
- "gcGo" is correctly classified by usesWriteBarrier()
- some gogc structures and functions now use golib wrappers to keep GCC
version-specific conditions out of the compiler/stdlib code
- we no longer allow mixing the C malloc with Go's
- fix a problem with string copying
2018-10-11 22:15:17 +02:00
Araq
d48e964950
fixes #9281
2018-10-11 19:52:48 +02:00
LemonBoy
0ead36dae6
Unchecked arrays now have their own type ( #9267 )
2018-10-10 21:03:18 +02:00
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