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
dca0fd3487
vm: Revert extra canary page before callstack
...
This reverts commit 7d5c8d6990385b94569116a23163d7e75ae21f49. We pretty much can't avoid unwinding frames without some more drastic redesign.
2011-10-27 21:14:50 -07:00
Joe Groff
c3f007ce0a
vm: allocate an extra canary page before callstack
...
This will let us safely unguard the callstack overflow guard page as a grace page so the callstack overflow handler can do its business without discarding frames.
2011-10-27 21:14:49 -07:00
Slava Pestov
794d371444
vm: fix compiler warning
2010-09-27 20:37:37 -07:00
Slava Pestov
6b5fffc026
compiler: preliminary implementation of tracking derived pointers in GC maps
2010-09-27 20:12:44 -07:00
Slava Pestov
a36bd7fbaf
vm: don't keep more than 10 unused contexts around to prevent address space wastage on low-budget operating systems like OpenBSD
2010-09-17 20:52:27 -07:00
Slava Pestov
451237a028
Fix start-context-and-delete sub-primitive (reported by Sascha Matzke)
2010-08-02 20:28:23 -04:00
Slava Pestov
4aa644a256
vm: fix compile warnings on Windows and add /WX to Nmakefile to report warnings as errors so that mason can catch these in the future
2010-06-17 01:48:39 -04:00
Slava Pestov
e86f434f26
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
997a7543a9
vm: fix typo
2010-06-11 20:08:52 -04:00
Slava Pestov
806e54630a
GC maps for more compact inline GC checks
2010-06-11 20:06:00 -04:00
Slava Pestov
0faa3bcf4a
vm: pre-allocate context alien
2010-04-02 00:02:21 -04:00
Slava Pestov
fb2ecab614
threads: delete old contexts immediately instead of handing them off to a 'context recycler' thread
2010-03-30 21:47:48 -04:00
Slava Pestov
c7142e4281
threads: use context-switching primitives
2010-03-29 20:40:17 -04:00
Slava Pestov
11ddbc03a4
vm: signal handling cleanup
2010-03-27 07:33:28 -04:00
Slava Pestov
1717b8d0f7
Implement start-context and set-context primitives
2010-03-27 02:56:11 -04:00
Slava Pestov
560c119cd2
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Slava Pestov
6aee6b3adc
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
ba5b90e063
Change how non-volatile register preservation is done in alien callbacks, with the aim of fixing callbacks on PowerPC, and to eventually eliminate assembly code from VM
...
- Simplify calculation of offset in relocation table
- Open-code %alien-callback
- Remove magic_frame hack from context objects
- Move magical return instruction from optimizing compiler backend into callback entry stub
2010-01-03 01:11:51 +13:00
Slava Pestov
e96404327e
Get optimizing compiler working without global register variables in VM
2009-12-22 15:42:49 +13:00
Slava Pestov
63edd20a55
vm: eliminating register variables work in progress. Works on x86-32 with non-optimizing compiler
2009-12-19 10:59:56 +13:00
Slava Pestov
cb6552ae6e
vm/contexts: cleanup
2009-11-08 19:44:18 -06:00
Slava Pestov
72ab6ec548
vm: rewrite 'become' primitive so that it uses a slot visitor instead of GC
2009-11-05 19:03:51 -06:00
Slava Pestov
810e309e0c
vm: rename userenv to special_objects
2009-10-23 00:33:53 -05:00
Slava Pestov
d85d84697a
Change data heap alignment to 16 bytes
2009-10-20 12:45:00 -05:00
Slava Pestov
2e65366c6b
vm: rename myvm and parent_vm instance variables to parent, clean up casts in primitive definitions
2009-10-18 20:31:59 -05:00
Slava Pestov
236588208b
vm: rename F to false_object, and rename T to true_object
2009-10-18 20:26:21 -05:00
Slava Pestov
107c96f642
vm: code heap compaction at runtime using compact-gc primitive
2009-10-16 11:39:35 -05:00
Slava Pestov
c04412219b
vm: allocate stacks and data heap segments without execute permissions
2009-10-16 05:16:12 -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
Phil Dawes
7fef05fd76
Removed VM_PTR macros. All builds reentrant by default
2009-10-14 19:14:57 +01:00
Slava Pestov
5c774d8c84
vm: more code cleanups
2009-10-07 08:33:54 -05: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
Phil Dawes
6b7717bf37
forwarding functions replaced with PRIMITIVE_FORWARD() macro
2009-09-25 20:43:01 +01:00
Phil Dawes
83b0769eef
renamed factorvm to factor_vm
2009-09-24 08:16:52 +01:00
Phil Dawes
e566656e46
removed a bunch of superflous blank lines
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
005549ba43
vm pointer passed to nest_stacks and unnest_stacks (win32)
2009-09-16 08:17:26 +01:00
Phil Dawes
cdb6304fef
Dev checkpoint
2009-09-16 08:17:26 +01:00
Phil Dawes
9a37b6abb6
moved stack_chain into vm struct
2009-09-16 08:16:31 +01:00
Phil Dawes
25bbca2f66
removed save_stacks global function
2009-09-16 08:16:30 +01:00
Phil Dawes
2e81b174a7
removed some stub functions from contexts
2009-09-16 08:16:25 +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
88084a66ac
moved contexts functions into vm
2009-09-16 08:16:18 +01: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
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