Andreas Rumpf
bf592c4e94
more destructor based changes ( #10885 )
...
* mark user defined destructors with sfOverriden to simplify the logic
* refactoring in preparation to merge liftings and generic instantiations for destructors
* ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on
* renamed 'patterns' switch to 'trmacros' as it was totally misleading before
* destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking
* test for invalid/too late destructor introductions
* liftdestructors: make code robust for nimsuggest
* --newruntime works for hello world again
* newruntime: code generation for closures
2019-03-23 00:12:05 +01:00
Andreas Rumpf
ed878014be
newruntime: progress
2019-03-15 17:51:52 +01:00
cooldome
5dea7c5ad7
revert discard in destroyer ( #10840 )
...
* revert discard in destroyer
* disable test
2019-03-15 13:49:32 +01:00
Andreas Rumpf
ee7a9a272d
destroyer.nim: added a remark about code generation
2019-03-14 07:59:44 +01:00
Andreas Rumpf
5b1a2eecd5
owned refs must be moved
2019-03-07 12:50:33 +01:00
Andreas Rumpf
f8bf24623c
explicit default values for a leaner codegen, .cursor variables for optimization
2019-03-07 12:50:33 +01:00
Andreas Rumpf
22445867d4
no underscores
2019-03-05 07:45:28 +01:00
Andreas Rumpf
3e922d0fec
destructors/dfa: more documentation
2019-03-04 22:41:50 +01:00
LemonBoy
f39aa1b40b
discard destroys its argument in-place ( #9478 )
2019-02-23 14:03:32 +01:00
Andreas Rumpf
c025786b75
gc:destructors: sink parameters need to be destroyed properly
2019-02-20 02:04:58 +01:00
LemonBoy
d83520ec8f
Do not walk into type sub-nodes for cast/conv expr ( #10616 )
2019-02-13 23:30:14 +01:00
Andreas Rumpf
dee8e6e98a
gc: destructors is beginning to work ( #10483 )
...
* kochdocs.nim: code cleanup
* docgen: nicer indentation
* parser.nim: code cleanup
* fixes #10458
* make tests green again
* make =destroy mixins
* gc:destructors: produced C code is almost working
* --gc:destructors simple program compiles (but leaks memory)
* gc:destructors make examples compile in C++ mode
* destructors: string implementation bugfixes
* strs.nim: minor code cleanup
* destructors: builtin seqs are beginning to work
* remove debugging helpers
2019-01-29 15:12:16 +01:00
cooldome
690f21043d
isLastRead regression fix ( #10463 )
...
* fixes #10462
* add a test
2019-01-28 08:32:14 +01:00
Andreas Rumpf
2655f242a8
use the lastRead analysis; it's correct by construction, not a mess of special cases and seems to be just as fast as the old algorithm
2019-01-23 11:08:51 +01:00
Andreas Rumpf
112f7e650a
destroyer.nim: code cleanup
2019-01-23 11:08:51 +01:00
Andreas Rumpf
1b0372c6e9
make tests green again
2019-01-23 11:08:51 +01:00
Andreas Rumpf
11022fea1b
control flow graphs: introduce 'join' points for easy analyses based on abstract interpretation
2019-01-23 11:08:51 +01:00
Andreas Rumpf
e3a668a33b
--gc:destructors: baby steps
2018-12-15 13:54:41 +01:00
Andrii Riabushenko
a9978db42f
destructor_hotfix
2018-12-10 23:23:46 +00:00
Andrii Riabushenko
d22fa09000
minor correction
2018-12-10 09:20:43 +00:00
Andrii Riabushenko
8b7f416c37
reduce changes
2018-12-09 18:40:46 +00:00
Andrii Riabushenko
8a690fd530
Remove not used code
2018-12-09 18:38:21 +00:00
Andrii Riabushenko
97b9e8a435
remove not used code
2018-12-09 18:37:33 +00:00
Andrii Riabushenko
dc935f2b41
use control flow graph for sink params
2018-12-09 18:32:43 +00:00
Andrii Riabushenko
a50cfbf814
fix
2018-12-08 23:05:45 +00:00
Andrii Riabushenko
ae24b87219
Double sink checks
2018-12-08 23:04:38 +00:00
Andrii Riabushenko
e5b9d89bcf
style improvements
2018-12-08 19:20:34 +00:00
Andrii Riabushenko
0fdd7629b4
remove dropbits in favour of destructive moves
2018-12-08 19:18:00 +00:00
Andrii Riabushenko
43c70a6b12
improve test
2018-12-07 22:25:32 +00:00
Andrii Riabushenko
d9815574c0
more undo
2018-12-07 22:14:46 +00:00
Andrii Riabushenko
948c625f95
undo more stuff
2018-12-07 22:11:34 +00:00
Andrii Riabushenko
135191d9d6
collapse to tables into one
2018-12-05 22:17:19 +00:00
Andrii Riabushenko
268461f06e
add comment
2018-12-05 21:45:01 +00:00
Andrii Riabushenko
972707440a
remove debug
2018-12-05 21:37:27 +00:00
Andrii Riabushenko
f46573c1ed
remove debug statements
2018-12-05 21:36:42 +00:00
Andrii Riabushenko
69347f6c95
implement everything
2018-12-05 21:33:15 +00:00
Andrii Riabushenko
938d3ffad7
add test
2018-12-05 19:29:14 +00:00
Andrii Riabushenko
ca473d0f94
add array constructors
2018-11-30 09:47:55 +00:00
Andrii Riabushenko
6459d4ec72
reduce changes
2018-11-30 09:37:26 +00:00
Andrii Riabushenko
e90f70af42
Improve approach
2018-11-30 09:36:04 +00:00
Andrii Riabushenko
c0b91bc024
revert debug statements
2018-11-29 23:43:19 +00:00
Andrii Riabushenko
4c327d9ae2
merge devel
2018-11-29 23:41:38 +00:00
Andrii Riabushenko
9bba790534
fix spacing
2018-11-29 23:36:06 +00:00
Andrii Riabushenko
4b31d7bb83
move moves
2018-11-29 23:33:48 +00:00
Andreas Rumpf
7d82df20be
gc:destructors further progress
2018-11-29 01:13:32 +01:00
cooldome
5b98afb8a8
Destructors: more moves for tuples ( #9808 )
2018-11-27 18:59:21 +01:00
cooldome
962b2e4b39
Destructors: move into nkTupleConstr and move on tuple unpacking ( #9776 )
2018-11-22 18:33:19 +01:00
LemonBoy
16d82c82e3
Remove a hack in the destroyer impl ( #9479 )
...
Generate nkHiddenAddr nodes w/ proper type attached.
2018-10-24 09:11:46 +02:00
Andreas Rumpf
b39302b0d2
DFA: implement exception handling properly
2018-10-14 17:36:55 +02:00
Andreas Rumpf
fcca59e415
destructors: optimize more assignments into moves; also fixes #9294
2018-10-12 20:36:42 +02:00