Björn Lindqvist
73956db33a
VM: a bunch of methods on factor_vm that can be converted into free
...
functions
I think that makes it easier to see whats going on than having
everything added to factor_vm
2015-08-04 16:02:09 +02: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
debdb11538
VM: Refactor run.cpp/hpp to Factor style
2013-05-12 13:24:47 -04:00
Erik Charlebois
ca2ea548be
VM: Remove exec bit from VM source files
2013-05-11 17:04:23 -04: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
3fc82282f7
vm: close_console before exiting anywhere
...
Add a factor_vm::exit function that does close_console() before ::exit-ing
2011-11-12 23:05:44 -08:00
Philipp Brüschweiler
db19efe1b3
vm: close the console when exiting
...
This prevents an endless loop caused by the nvidia drivers on linux.
See http://www.nvnews.net/vbulletin/showthread.php?t=164619
2011-11-12 23:05:43 -08:00
Slava Pestov
c3ae7f3a11
vm: hard tabs, indent width 8
2010-08-02 20:50:34 -04:00
Joe Groff
14de58b73c
vm: remove some mixed use of stdio/iostream. when monotonic timer decreases, log old and new values
2010-08-01 16:14:20 -07:00
Doug Coleman
e8d528ad93
Remove system_micros from vm, implement gmt hook on windows
2010-06-16 23:39:16 -05:00
Slava Pestov
942f6e0943
Update Win64 support
2010-01-25 15:39:34 +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
0a3c5f5ac6
vm: fep out if monotonic counter decreases
2009-12-14 01:09:04 -06:00
Doug Coleman
bce084ac12
fix windows compile error
2009-11-20 04:21:21 -06:00
Doug Coleman
987602235e
remove sleep_micros, add sleeo_nanos to vm
2009-11-19 04:49:29 -06:00
Doug Coleman
6f7ec206a1
rename millis to system-millis, micros to system-micros, add nano-count
2009-11-18 15:58:48 -06:00
Doug Coleman
b4206f5252
initial commit to nanos branch to replace micros
2009-11-18 04:20:05 -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
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
810e309e0c
vm: rename userenv to special_objects
2009-10-23 00:33:53 -05:00
Slava Pestov
d689be57a5
vm: new card marking implementation supports marking partial objects
2009-10-13 21:16:04 -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
9b7412b8f8
Moved PRIMITIVE and PRIMITIVE_FORWARDs to primitives.[ch]pp
2009-09-27 19:42:18 +01: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
ef16c4be66
moved userenv into vm in C code (DOESNT BOOTSTRAP YET!!!)
2009-09-16 08:16:32 +01:00
Phil Dawes
a66cf7e609
removed stub function from run
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
a2f14b5a6d
added vm member to gc_root and growable arrays
2009-09-16 08:16:22 +01:00
Phil Dawes
110f925245
move functions from run.cpp into vm
2009-09-16 08:16:18 +01: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
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
e3592ca8f6
Clean up untag_* and tag_* inline functions in favor of more idiomatic C++
2009-05-02 20:47:29 -05:00
Slava Pestov
b923d548cf
Move vmpp to vm
2009-05-02 20:37:18 -05:00