Doug Coleman
2a409c79e0
vm: Fix unused variable warnings on Windows.
2018-07-13 00:48:58 -05:00
Alexander Iljin
0d57734dab
vm: replace block comments /**/ with line comments //
2016-09-09 05:47:52 +02:00
Alexander Iljin
e0acf4f328
Revert "vm: replace line comments // with block comments /**/ for consintency"
...
This reverts commit 7ee4e5dea5
.
2016-09-09 05:47:52 +02:00
Alexander Iljin
7ee4e5dea5
vm: replace line comments // with block comments /**/ for consintency
...
Fix #1651 .
2016-08-03 09:19:48 -07:00
Björn Lindqvist
fb9fa12cdd
VM: change the definition of entry_point in word and quotation from void* to cell
...
this gets rid of lots of redundant casts from void* to cell
2015-01-15 09:29:13 +00:00
Björn Lindqvist
e47181e87a
VM: change type of callstack_top and callstack_bottom from void* to cell
...
cell and void* is always the same size, but now you can remove lots of
redundant type casts from void* to cell.
2015-01-15 09:29:13 +00:00
Björn Lindqvist
a6e191a490
VM: the frame_return_address and set_frame_return_address functions aren't needed (clearer to read/write the pointers directly)
2015-01-15 09:29:13 +00: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
88d7c10d03
VM: Replace u8-64, s8-64, cell, fixnum with stdint.h equivalents
2013-05-13 00:28:25 -04:00
Erik Charlebois
fb34be6fa7
VM: Refactor cpu-* to Factor style
2013-05-12 13:24:43 -04:00
Erik Charlebois
ca2ea548be
VM: Remove exec bit from VM source files
2013-05-11 17:04:23 -04:00
Joe Groff
604ceb957c
vm: replace remaining stack_frame-based logic
2011-12-14 09:56:49 -08:00
Joe Groff
e6a80aa9aa
vm: callstack_reversed in code_block_visitor
2011-12-14 09:56:48 -08:00
Joe Groff
e116bc497b
vm: reversed callstack iteration
2011-12-14 09:56:47 -08:00
Joe Groff
b6246f2c00
vm: quell warnings from vars only used by asserts
2011-11-23 11:11:28 -08: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
Slava Pestov
74640b7f71
Get green threads working on Windows
...
- store stack base and limit in TIB
- set up a frame-based structured exception handler in each context's callstack
- boot.x86.32.image has now been replaced by boot.winnt-x86.32.image and boot.unix-x86.32.image
2010-04-03 20:24:33 -04:00
Slava Pestov
560c119cd2
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Doug Coleman
d22eb40360
Fix spaces that crept into vm/ cpp files
2010-02-06 01:06:26 -06:00
Slava Pestov
bf40237a17
vm: always check call sites when installing PICs, not just when FACTOR_DEBUG is on, since the check is cheap and saves debugging time when compiler is changed
2010-02-03 23:11:34 +13:00
Slava Pestov
942f6e0943
Update Win64 support
2010-01-25 15:39:34 +13:00
Slava Pestov
36d2ac8921
vm: move c_to_factor, lazy_jit_compile_impl, throw_impl, set_callstack assembly routines into non-optimizing compiler for x86-64
2010-01-06 15:47:36 +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
15eb8d1a0a
vm: remove VM_ASM_API
2009-12-24 01:37:24 +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
0068bce934
vm: big overhaul of non-optimizing compiler
...
- change some primitives into sub-primitives: fixnum+ fixnum- fixnum* inline-cache-miss inline-cache-miss-tail
- rename some relocation types for clarity
- some other minor re-organizations and cleanups
2009-12-15 07:20:09 -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
e26bbbe9a0
removed VM_ASM_API_OVERFLOW (VM_ASM_API now regparm(3))
2009-09-25 20:33:38 +01:00
Phil Dawes
465f06ebc2
throw_impl now forwards the vm ptr
2009-09-16 08:16:30 +01:00
Phil Dawes
4afc16e95b
passing vm ptr to lazy_jit_compile mostly working
2009-09-16 08:16:30 +01:00
Slava Pestov
83c992173e
vm: fix indentation in Joe's changes
2009-09-14 03:09:03 -05:00
Joe Groff
fb43ae2daf
save the FP status out of the signal context and use it as part of the fp trap factor exception. clear the FP status before continuing after an exception
2009-09-13 23:39:12 -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
318552ba60
Fix tail call PICs on x86-64
2009-05-06 22:44:30 -05:00
Slava Pestov
4915e1ced7
Clean up bootstrap.image, and implement new calling convention for tail calls; tail call sites now have PICs
2009-05-06 22:04:01 -05:00
Slava Pestov
581d017b46
Working on inline caching for tail call sites
2009-05-06 19:22:22 -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
Slava Pestov
b923d548cf
Move vmpp to vm
2009-05-02 20:37:18 -05:00