Commit Graph

27 Commits (5a1b77389970f2bf847f07fb3ae129429a28754a)

Author SHA1 Message Date
Björn Lindqvist 8cacf7bf8d VM: simpler code for reallot_array 2016-10-08 07:10:26 +02:00
Alexander Iljin 0d57734dab vm: replace block comments /**/ with line comments // 2016-09-09 05:47:52 +02:00
Björn Lindqvist 50c74fc496 VM: get rid of the duplicated nursery instance in vm->data->nursery
vm.nursery and vm->data->nursery are different objects. They get out
of sync when Factor code bumps vm.nursery but leaves vm->data->nursery
unchanged. The emptiness of vm->data->nursery meant that each_object()
never iterated it.
2014-11-21 02:16:03 -08:00
Erik Charlebois b918c3e646 VM: Remove redundant #ifdef FACTOR_DEBUGs
FACTOR_DEBUG checks around asserts aren't needed, since FACTOR_ASSERT is
already conditionally defined by FACTOR_DEBUG.
2013-05-12 23:44:32 -04:00
Erik Charlebois 4ea2e9ed06 VM: Refactor generic_arrays.hpp to Factor style 2013-05-12 13:24:44 -04:00
Erik Charlebois ca2ea548be VM: Remove exec bit from VM source files 2013-05-11 17:04:23 -04:00
Doug Coleman 000efd9bbb vm: Add messages about things that can allocate. Fix a gc bug in the primitive for quotation-code. 2012-08-15 21:30:55 -07:00
Joe Groff 0a1a252cdb 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 92d24b0a8f vm: no-op reallot_array with same size, for real 2011-10-17 21:23:01 -07:00
Joe Groff 59f0b93290 vm: make reallot_array for same size a no-op 2011-10-17 21:23:01 -07:00
Slava Pestov 2e3207b590 vm: fix compilation with DEBUG=1 2009-11-19 02:08:05 -06:00
Slava Pestov 6c2c87758a 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 03f4b4cdd6 vm: move binary_payload_start() method from factor_vm to object class 2009-10-24 04:27:45 -05:00
Slava Pestov d85d84697a Change data heap alignment to 16 bytes 2009-10-20 12:45:00 -05:00
Slava Pestov d689be57a5 vm: new card marking implementation supports marking partial objects 2009-10-13 21:16:04 -05:00
Slava Pestov bae2240f62 vm: refactoring garbage collector 2009-10-05 22:16:08 -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 2e129dfc45 moved generic_arrays inline functions to vm.hpp 2009-09-16 08:16:23 +01:00
Phil Dawes 625380c25c moved generic_array.hpp functions to vm 2009-09-16 08:16:22 +01:00
Phil Dawes 1b64155998 moved reallot_array into vm 2009-09-16 08:16:22 +01:00
Phil Dawes a2f14b5a6d added vm member to gc_root and growable arrays 2009-09-16 08:16:22 +01: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 b923d548cf Move vmpp to vm 2009-05-02 20:37:18 -05:00