Commit Graph

27 Commits (4c6db8854898d8fbde8b68541c2667ebc00cb6f6)

Author SHA1 Message Date
Slava Pestov 3887292543 Big VM cleanup
- Move forward declarations of 'struct factor_vm' to one place
- Rename template parameters from T and TYPE to descriptive names. New convention: CamelCase for template parameters
- Change some higher-order functions taking function pointers into templates, and define classes overriding operator(). There's a bit of new boilerplate here but its more consistent than the old mish-mash approaches
- Put GC state into a gc_state struct
- Use exceptions instead of longjmp for non-local control transfer in GC
- In code GC, instead of interleaving code block tracing with copying, add code blocks which need to be revisited to an std::set stored in the gc_state
2009-10-03 08:47:05 -05:00
Phil Dawes 63266524d7 Moved PRIMITIVE and PRIMITIVE_FORWARDs to primitives.[ch]pp 2009-09-27 19:42:18 +01:00
Phil Dawes c495640cc5 forwarding functions replaced with PRIMITIVE_FORWARD() macro 2009-09-25 20:43:01 +01:00
Phil Dawes 1c5329cc2e renamed factorvm to factor_vm 2009-09-24 08:16:52 +01:00
Phil Dawes 2cfb1b6f02 removed a bunch of superflous blank lines 2009-09-24 08:02:14 +01:00
Phil Dawes 3da9b64c73 renamed vmprim_ to primitive_ 2009-09-24 08:02:13 +01:00
Phil Dawes a6e1e39e23 passing ptr in boolean boxing and save_callstack_bottom 2009-09-16 08:17:26 +01:00
Phil Dawes 0e49c2848c removed some global functions from callstack.cpp 2009-09-16 08:16:28 +01:00
Phil Dawes 537402274e vm ptr passed to untag_check 2009-09-16 08:16:26 +01:00
Phil Dawes 03ecc58bbf Dev checkpoint 2009-09-16 08:16:25 +01:00
Phil Dawes ebbf2151fe added vm member to gc_root and growable arrays 2009-09-16 08:16:22 +01:00
Phil Dawes 9ffb1e34a6 moved alien functions to vm 2009-09-16 08:16:21 +01:00
Philipp Brüschweiler 18240b0219 misc small documentation fixes, some fixes for factor.vim, changed permissions of vm/* to 644 2009-08-10 21:33:07 +02:00
Slava Pestov 2faaa66599 Fix compile error on GCC 4.x 2009-05-20 20:01:21 -04:00
Slava Pestov 9bea42405a callstack>array primitive was not GC safe 2009-05-20 18:52:21 -05:00
Slava Pestov c4162971e0 callstack>array was keeping an uninitialized array around across potential GCs; add more assertions 2009-05-17 18:18:07 -05:00
Slava Pestov d2c138150b Fix FEP if there are too many words in the image, clean up some VM code 2009-05-13 00:58:54 -05:00
Slava Pestov 92ae2f7e71 VM cleanup: replace some #defines with constants and inline functions 2009-05-08 15:05:55 -05:00
Slava Pestov ec943c2299 Change (void) to () 2009-05-05 11:33:35 -05:00
Slava Pestov bec40fd54b Store forwarding table off to the side instead of in the code block; saves one cell per code block 2009-05-05 11:07:20 -05:00
Slava Pestov 1e2561f863 Make walker work better with call( and breakpoints which are nested inside combinators 2009-05-05 09:12:32 -05:00
Slava Pestov 7c0a59f7a9 The great type renaming 2009-05-04 04:50:24 -05:00
Slava Pestov 7f48eb2b2c Use C++ namespaces 2009-05-04 01:46:13 -05:00
Slava Pestov 1857f90eb6 VM: use better abstractions for tagged pointers, eliminate get()/set() stuff, clean up array, string, and byte-array element access 2009-05-04 01:00:30 -05:00
Slava Pestov 7820d88271 Various VM cleanups, new approach for bignum GC root registration 2009-05-03 05:48:03 -05:00
Slava Pestov dfaa338af7 Clean up untag_* and tag_* inline functions in favor of more idiomatic C++ 2009-05-02 20:47:29 -05:00
Slava Pestov 938d1a4270 Move vmpp to vm 2009-05-02 20:37:18 -05:00