Joe Groff
9df2c107dc
vm: remove _reversed from callstack iterator names
...
Now that they're the only game in town we can give them the short names
2011-12-14 09:56:49 -08:00
Joe Groff
841600fc6e
vm: stage code block map fixup properly for GC
...
Don't update the map until the very last thing, and pass untranslated addresses to the iterator functors. Somewhat complicated by the fact that, for startup_fixup, the map is initialized with fixed-up values, so the fixup functor needs a flag indicating whether it operates with a fixed or unfixed code heap map.
2011-12-14 09:56:48 -08:00
Joe Groff
faa9b4ea3f
vm: callstack_reversed in code_block_visitor
2011-12-14 09:56:48 -08:00
Joe Groff
00967b4931
vm: iterate_callstack_reversed in slot_visitor
2011-12-14 09:56:47 -08:00
Joe Groff
41f3190349
vm: reversed callstack iteration
2011-12-14 09:56:47 -08:00
Joe Groff
5926257d1e
WIP verify_callstack function
...
dumps callstack in reverse order so i can visually inspect that it matches the old forward walking logic
2011-12-14 09:56:47 -08:00
Joe Groff
00f00663ad
vm: replace assert with FACTOR_ASSERT
...
Factor is finally a real C++ project and has a custom assert macro. Assertion failures were still getting caught as exceptions and causing failure loops. Write our own macro that calls factor::abort on failure.
2011-11-23 11:11:26 -08:00
Joe Groff
5b43301eb6
vm: strip out call-counting profiler
...
This makes the separate "code" and "entry_point" fields in word and quotation redundant, so also remove them to reclaim an additional cell per word and quotation object, which should help with #318 .
2011-11-10 16:01:07 -08:00
Joe Groff
b0f6dbddec
vm: sample thread object rather than raw context
2011-11-02 13:23:18 -07:00
Joe Groff
2a64c3ed69
vm: sample code block owners instead of blocks
2011-11-02 13:23:17 -07:00
Slava Pestov
9e1ff0c395
vm: fix 64-bit regression
2010-10-09 15:14:14 -07:00
Slava Pestov
f34fd74fb2
Fix win64 compile error
2010-10-09 16:03:46 -05:00
Doug Coleman
e7cd47f8b9
Revert previous patch; not simply a typo. Still broken on win64.
2010-09-29 20:49:37 -05:00
Doug Coleman
d67689aca9
Win64 Windows SDK hates int/cell type errors
2010-09-29 17:43:27 -05:00
Slava Pestov
4877d32cb3
compiler: preliminary implementation of tracking derived pointers in GC maps
2010-09-27 20:12:44 -07:00
Slava Pestov
a8e2017020
vm: fix another compile warning on 32-bit Windows
2010-06-17 01:04:03 -05:00
Slava Pestov
fb4de47abf
Add GC maps to ##box, ##box-long-long, ##alien-invoke, ##alien-indirect and ##call-gc; remove ##gc-map instruction
2010-06-14 19:39:46 -04:00
Slava Pestov
5e39764ccd
vm: have to be extra careful when messing with return addresses
2010-06-13 18:12:57 -04:00
Slava Pestov
d91524b98d
vm: context switching needs to scrub the return address
2010-06-12 19:54:31 -04:00
Slava Pestov
a08295d9b7
GC maps for more compact inline GC checks
2010-06-11 20:06:00 -04:00
Slava Pestov
adeb6fb68f
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Slava Pestov
af573bd022
Add context-specific special object table, generalizing catchstack_save and current_callback_save fields of context struct
2010-03-18 22:06:00 +13:00
Slava Pestov
31a260b74c
vm: big overhaul of non-optimizing compiler
...
- change some primitives into sub-primitives: fixnum+ fixnum- fixnum* inline-cache-miss inline-cache-miss-tail
- rename some relocation types for clarity
- some other minor re-organizations and cleanups
2009-12-15 07:20:09 -05:00
Slava Pestov
912b1265fc
Split literal table into literal and parameter tables, literal table is discarded after code block initialization
2009-12-02 04:28:15 -06:00
Slava Pestov
c04c15c52d
vm: update callback stub machine code at the end of compaction to prevent it from seeing an inconsistent data stack
2009-12-02 03:31:57 -06:00
Slava Pestov
ca7bca6738
Big cleanup of literal table and relocation-related code
...
- new way to iterate over instruction_operands cleans up relocation code
- move some methods out of the VM class to clean up code
- if debugging is on, die earlier if attempting to allocate inside GC
- callback heap entries are now code_blocks
- replace block_granularity with data_alignment
2009-12-02 00:48:41 -06:00
Slava Pestov
3d335474fe
vm: new image relocation that doesn't use literal table
2009-11-27 17:05:08 -06:00
Slava Pestov
3789e75e0c
vm: compaction now updates the needs_fixup set
2009-11-24 19:29:59 -06:00
Slava Pestov
bfa5340ea8
vm: mark sweep now traces code block references; rename embedded_pointer to instruction_operand
2009-11-23 19:17:12 -06:00
Slava Pestov
e66b8673f4
vm: minor GC traces embedded pointers
2009-11-22 13:37:39 -06:00
Slava Pestov
c434201b33
vm: eliminating literal table work in progress
2009-11-07 16:16:09 -06:00
Slava Pestov
2f8ba13da0
vm: faster data_root and <array> primitive
2009-11-06 05:30:37 -06:00
Slava Pestov
858f20ef5f
vm: fix crash in profiler
2009-11-06 01:22:53 -06:00
Slava Pestov
7c0c2fec47
vm: restructure data_roots so that its a sequence of handle/len pairs rather than just handles, use it in inline_gc() and all_instances() so that we don't run out of heap while building the object array
2009-11-06 00:54:28 -06:00
Slava Pestov
b341527428
vm: rename gc_root to data_root, add code_root to fix a problem where code blocks would move underneath the PIC compiler if PIC compiler allocated enough
2009-11-02 18:10:34 -06:00
Slava Pestov
c7430d74c2
vm: remove promotion strategy, clean up compaction code
2009-11-01 03:47:09 -06:00
Slava Pestov
f5a6a3421c
vm: got data heap compaction working
2009-10-24 23:51:14 -05:00
Slava Pestov
074200a213
vm: make some more ctors explicit just for kicks
2009-10-24 23:02:58 -05:00
Slava Pestov
38df6426de
vm: move binary_payload_start() method from factor_vm to object class
2009-10-24 04:27:45 -05:00
Slava Pestov
60f3cb669a
vm: data heap compaction work in progress
2009-10-24 04:18:33 -05:00
Slava Pestov
eefcc0fb8c
vm: factor out code that visits object slots and code heap blocks into slot_visitor and code_block_visitor
2009-10-24 03:54:53 -05:00