Commit Graph

34 Commits (fcc53d174cfb62b32a2f2304f74d0bff76b5a85f)

Author SHA1 Message Date
Slava Pestov b4e36608da compiler.cfg: remove _gc instruction, it doesn't need to exist, and change GC checks to ensure that the right amount of space is available instead of blindly checking for 1Kb 2009-10-05 05:27:49 -05:00
Slava Pestov 6c047127ee Change C++ exception usage back into a longjmp() due to GCC bugs 2009-10-05 03:27:28 -05:00
Slava Pestov c4ef640f4d 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 3a88d8c49e inlineimpl.hpp is toast 2009-09-29 19:53:10 +01:00
Phil Dawes b6718641dc Converted some callback fns to use member-fn pointers 2009-09-28 19:45:10 +01:00
Phil Dawes 9b7412b8f8 Moved PRIMITIVE and PRIMITIVE_FORWARDs to primitives.[ch]pp 2009-09-27 19:42:18 +01:00
Slava Pestov f81c8549f4 Make segment, context, data_heap, zone more object-oriented, and fix crash when calling undefined symbols 2009-09-25 21:17:20 -05:00
Slava Pestov c046ff4b23 vm: make heap data-type object-oriented 2009-09-25 20:32:00 -05:00
Phil Dawes 6b7717bf37 forwarding functions replaced with PRIMITIVE_FORWARD() macro 2009-09-25 20:43:01 +01:00
Phil Dawes 4552e02624 made inline_gc a VM_C_API function 2009-09-25 18:29:07 +01:00
Phil Dawes f5c70d4ad7 make inline_gc regparm(3) and cleaned up %call-gc stack alignment 2009-09-24 21:45:56 +01:00
Phil Dawes 83b0769eef renamed factorvm to factor_vm 2009-09-24 08:16:52 +01:00
Phil Dawes 46bab62689 misc cleanup 2009-09-24 08:02:14 +01:00
Phil Dawes e3ac531fdb renamed vmprim_ to primitive_ 2009-09-24 08:02:13 +01:00
Phil Dawes 3343723ee3 Don't return functions returning void. -O3 seems to optimize them out! 2009-09-16 08:22:17 +01:00
Phil Dawes b02c602a89 added vm passing to some alien/boxing functions and added some vm asserts 2009-09-16 08:20:10 +01:00
Phil Dawes 6a193bb0d5 Added %vm-invoke to pass vm ptr to vm functions (x86.32 only, otherwise uses singleton vm) 2009-09-16 08:16:30 +01:00
Phil Dawes 39dc71e612 removed global functions from data_gc 2009-09-16 08:16:26 +01:00
Phil Dawes 3025cef1c6 moved global state from data_gc into vm 2009-09-16 08:16:24 +01:00
Phil Dawes 80716a1b6e moved global state from contexts and run into vm
Also renamed template type from T to TYPE to prevent clash with vm::T (true)
2009-09-16 08:16:24 +01:00
Phil Dawes a2f14b5a6d added vm member to gc_root and growable arrays 2009-09-16 08:16:22 +01:00
Phil Dawes 28620619e9 moved alien functions to vm 2009-09-16 08:16:21 +01:00
Phil Dawes 64c2d81306 moved data_gc fns over to vm struct 2009-09-16 08:16:19 +01:00
Slava Pestov 81c4670619 VM: use an std::vector instead of a fixed-size buffer for GC roots 2009-09-08 14:21:09 -05:00
Philipp Brüschweiler 230061783a 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 2d231f066a GC checks now save and restore registers 2009-06-02 18:23:47 -05:00
Slava Pestov 3bf8134476 VM cleanup: replace some #defines with constants and inline functions 2009-05-08 15:05:55 -05:00
Slava Pestov 53db9d737a Change (void) to () 2009-05-05 11:33:35 -05:00
Slava Pestov 2bfde0250e Fixing some build issues on Linux with GCC 4.3 2009-05-04 08:00:06 -04:00
Slava Pestov 8872c40b1e The great type renaming 2009-05-04 04:50:24 -05:00
Slava Pestov edecac508e Use C++ namespaces 2009-05-04 01:46:13 -05:00
Slava Pestov 8e17e0a01e 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 ec28b1ef85 Various VM cleanups, new approach for bignum GC root registration 2009-05-03 05:48:03 -05:00
Slava Pestov b923d548cf Move vmpp to vm 2009-05-02 20:37:18 -05:00