Commit Graph

62 Commits (0590ebf914cad5794ca22e052a5df4c93d3fb924)

Author SHA1 Message Date
Björn Lindqvist 7d9bad465c VM: refactoring allot_code_block() to work like allot_large_object()
To make it possible to eventually grow the code heap
2016-10-17 08:03:48 +02:00
Björn Lindqvist 603f5f9bbf VM: better? comment for uninitialized_blocks 2016-09-28 20:38:52 +02:00
Alexander Iljin 0d57734dab vm: replace block comments /**/ with line comments // 2016-09-09 05:47:52 +02:00
Björn Lindqvist 39c888230a VM: new function set_safepoint_guard to replace the functions (un)guard_safepoint 2015-08-24 07:23:40 -07:00
Björn Lindqvist 56ddb59b00 VM: new function set_memory_locked(true/false)
it wraps the mprotect/VirtualProtect platform differences and makes it
so you can unify some windows/unix code path forks
2015-08-24 07:23:40 -07:00
Björn Lindqvist 2b1c6ca11a VM: move the frame_predecessor() method to the code_heap class 2015-08-14 20:19:54 -07:00
Björn Lindqvist ee5fd49b9e VM: simplified fixup_gc_workhorse::fixup_data by mering lots of functions only used once 2015-01-15 09:29:14 +00:00
Björn Lindqvist 693e8ad33a VM: the clear_mark_bits methods are only called once -- make the calls inline instead 2015-01-15 09:29:14 +00:00
Björn Lindqvist 4a96e6163b VM: new primitive (callback-room) for querying the VM about memory usage
The word works exactly like (code-room) except it looks at the memory
usage in the callback heap instead of the code heap.
2014-09-29 07:30:21 -07:00
Erik Charlebois ffe41b3d7f VM: Fixup cast formatting after clang-format
clang-format doesn't recognize casts to non-pointer/non-template types
so it winds up adding a space between the right paren and the expression
and then failing to recognize prefix operators in the process
(e.g. foo = (cell) & bar; should be foo = (cell)&bar;). This commit
manually fixes up the major cases (fixnum, cell, all types ending in _t).
2013-05-13 14:59:24 -04:00
Erik Charlebois 7f56458820 VM: Refactor code_heap to Factor style 2013-05-12 13:24:42 -04:00
Erik Charlebois ca2ea548be VM: Remove exec bit from VM source files 2013-05-11 17:04:23 -04:00
Joe Groff 3868895b56 vm: make all_blocks a set of cells
gcc was doing bad things assuming the pointer given to upper_bound was aligned
2011-12-14 09:56:46 -08:00
Joe Groff bd7e6b33f8 vm: erase code blocks from all_blocks during sweep
Fixes #437
2011-12-13 12:28:09 -08:00
Joe Groff 083b856604 vm: reinitialize all_blocks from scratch after gc
Faster and more likely to be correct than trying to fixup the existing set
2011-12-12 19:05:48 -08:00
Joe Groff 065a4d4353 vm: remove useless forward declare 2011-11-23 11:11:28 -08:00
Joe Groff 15c4b7aa57 vm: verify code heap's all_blocks set when DEBUG 2011-11-23 11:11:27 -08:00
Joe Groff 81911b9f87 vm: initialize all_blocks map from image
um, code blocks from the image need to go in the set too
2011-11-23 11:11:26 -08:00
Joe Groff 2705fc67cb vm: keep a set of all code_blocks in the code_heap
This way looking up code blocks by return address is an O(log n) set lookup rather than an O(n) linear scan.
2011-11-23 11:11:26 -08:00
Joe Groff a6b80f3efa vm: code_block_for_address method -> code_heap 2011-10-27 21:18:20 -07:00
Joe Groff b3e5f75c9e vm: handle async signals at safepoints on unix
Factor now supports the new 4.0BSD feature of "signals".
2011-10-27 21:14:46 -07:00
Joe Groff 99804d5e3f vm: code_heap::(un)guard_safepoint methods 2011-10-27 21:14:44 -07:00
Joe Groff 4c8dec1e98 vm: take a page from code_heap for safepoints 2011-10-27 21:14:44 -07:00
Slava Pestov e5e51c40a1 vm: implement frame-based SEH for 64-bit Windows 2010-04-08 10:32:14 -07:00
Slava Pestov 066d2836ca Get modify-code-heap working if stack traces are stripped (but then it won't update existing code blocks), and rename code_heap::code_heap_free() to code_heap::free() 2009-12-02 05:27:48 -06:00
Slava Pestov 68c09f0e93 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 d49c86ba11 vm: Clean up more code duplication and rename a few methods 2009-12-02 01:17:30 -06:00
Slava Pestov c6602bda27 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 d95a98eb9c vm: add primitives for getting at GC events, data-room and code-room primitives now return structs instead of arrays 2009-10-27 03:32:28 -05:00
Slava Pestov 62e718eaa9 vm: combine heap_block and code_block structs, eliminates some boilerplate 2009-10-24 21:33:31 -05:00
Slava Pestov fd1e992e7d 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
Slava Pestov f0816d72f1 vm: split off free_list_allocator from heap class, rename zone to bump_allocator 2009-10-20 15:26:11 -05:00
Slava Pestov a9dbbd1efb vm: simplify code heap by eliminating HeapLayout template parameter 2009-10-20 14:01:46 -05:00
Slava Pestov e482940dca vm: object start recording in cards is now independent of allocation strategy 2009-10-20 13:47:04 -05:00
Slava Pestov acdcb181e0 vm: working on making heap more generic 2009-10-20 10:22:06 -05:00
Slava Pestov 85b746e7b5 vm: simpler and more efficient code heap compaction; restructure a few things to get ready for runtime code heap compaction 2009-10-16 04:33:35 -05:00
Slava Pestov 0a3d08bc52 vm: make the code nice and pretty 2009-10-16 02:55:02 -05:00
Slava Pestov d34c7854cd vm: simplify card marking logic, and unmark more cards during aging collections by checking if they actually contained young pointers or not 2009-10-09 01:37:45 -05:00
Slava Pestov 21f55ab1a3 vm: more efficient code heap remembered set 2009-10-08 23:10:32 -05:00
Slava Pestov 5c774d8c84 vm: more code cleanups 2009-10-07 08:33:54 -05:00
Slava Pestov 16c3251072 vm: free up a cell in compiled code block headers 2009-10-06 05:52:45 -05:00
Slava Pestov ed1ee19ce1 vm: add a remembered set for code blocks which may reference young literals. Improves loading time 2009-10-06 04:36:34 -05:00
Slava Pestov d10e27149c vm: cleanup 2009-10-06 01:42:17 -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 c046ff4b23 vm: make heap data-type object-oriented 2009-09-25 20:32:00 -05:00
Phil Dawes 83b0769eef renamed factorvm to factor_vm 2009-09-24 08:16:52 +01:00
Phil Dawes 700e03a6a6 removed some vm-> forwarding functions 2009-09-16 08:17:26 +01:00