Commit Graph

110 Commits (clean-linux-x86-32)

Author SHA1 Message Date
Doug Coleman 2a409c79e0 vm: Fix unused variable warnings on Windows. 2018-07-13 00:48:58 -05:00
Björn Lindqvist d71bd83f57 VM: removing the 1-arg overload of iterate() (better to be explicit about the fixup) 2016-09-22 17:03:38 +02: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 82e2de5e12 VM: oops, fix compilation error i caused 2016-04-24 15:18:45 +02:00
John Benediktsson 02956a25ce vm: compact-gc was checked twice. 2016-03-28 22:28:57 -07:00
Björn Lindqvist 22bb0cfecf VM: fixes to use the TAG macro over tagged<object>(obj).type() 2015-11-23 02:27:22 +01:00
Björn Lindqvist cb55fcf20f VM: prettier and more detailed output when dumping generations 2015-10-08 16:25:35 +02:00
Björn Lindqvist 1045f41778 VM: gc required here because we are iterating all objects 2015-08-23 18:36:31 -07:00
Björn Lindqvist 7f545271f4 VM: new iteration method each_object_each_slot()
used by find_data_references() and dump_edges() instead of the functor structs
2015-08-23 18:36:31 -07:00
John Benediktsson 5c0d8c7e4f vm: minor fixes. 2015-08-04 07:49:50 -07:00
Björn Lindqvist 4dfac78fc1 VM: move changes of structs to lambda functions 2015-07-06 22:49:38 +02:00
Björn Lindqvist 9bfc43144e VM: debug macros FACTOR_PRINT and FACTOR_PRINT_MARK to make better debug
printing messages than just using std::cout
2015-05-09 20:04:21 -07:00
Björn Lindqvist 434e4ef4b7 VM: fix the debug printing so that instead of always printing to std::cout, you supply the stream to print to 2015-01-28 14:58:21 +00: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 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 eb7a5ab1ba VM: some more fixing to make the types match better, converting void* to cell 2015-01-15 09:29:13 +00:00
Björn Lindqvist 60b7631e76 VM: fixing some implicit casts from cell to fixnum
The types are compatible, but it looks a little nicer if the variable
that receives a return value declared as cell also is a cell.
2014-07-10 07:54:07 -07:00
Steven Stewart-Gallus e6dade3f94 Lower the stack usage of a few functions
In vm/compaction.cpp I rescoped some variables to lower the stack usage
from 592 to 560 bytes. I wasn't very successful with this. The stack
usage is larger than it looks because methods on the structures used
take an implicit this pointer and a reference to the data (so the data
has to live out it's full scope and can't be put in a register).

In vm/debug.cpp I made a large (1024 bytes) stack allocated buffer
simply dynamically allocated.

In vm/os-unix.cpp I rescoped signal handling structures to not coincide
with each other and reduced a very large (1024 bytes) amount of stack
usage to less than 500 bytes.
2014-06-19 14:55:57 -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 7b1b1eef23 VM: Remove unnecessary _ suffix in constructors 2013-05-12 23:20:43 -04:00
Erik Charlebois 26ff071205 VM: Remove unnecessary explicit keywords 2013-05-12 21:48:38 -04:00
Erik Charlebois 6955dd8565 VM: Refactor debug.cpp 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 0b72b811fc vm: flush after print_obj so it's usable from gdb 2011-12-21 13:25:28 -08:00
Joe Groff b6f323450f vm: load mega cache object before popping frame
Fixes #457 harder
2011-12-20 14:38:01 -08:00
Joe Groff d74f194b07 vm: remove _reversed from callstack iterator names
Now that they're the only game in town we can give them the short names
2011-12-14 09:56:49 -08:00
Joe Groff 9236c05e60 vm: stage code block map fixup properly for GC
Don't update the map until the very last thing, and pass untranslated addresses to the iterator functors. Somewhat complicated by the fact that, for startup_fixup, the map is initialized with fixed-up values, so the fixup functor needs a flag indicating whether it operates with a fixed or unfixed code heap map.
2011-12-14 09:56:48 -08:00
Joe Groff e6a80aa9aa vm: callstack_reversed in code_block_visitor 2011-12-14 09:56:48 -08:00
Joe Groff d12b6e375b vm: iterate_callstack_reversed in slot_visitor 2011-12-14 09:56:47 -08:00
Joe Groff e116bc497b vm: reversed callstack iteration 2011-12-14 09:56:47 -08:00
Joe Groff e2fafaed9c WIP verify_callstack function
dumps callstack in reverse order so i can visually inspect that it matches the old forward walking logic
2011-12-14 09:56:47 -08:00
Joe Groff d6227c182b vm: pack frame size into code block header bits 2011-12-14 09:56:45 -08:00
Joe Groff e21f316583 vm: store stack frame size in code blocks
Change modify-code-heap primitive so it takes a sixth element in each array for the frame size.
2011-12-14 09:56:45 -08:00
Joe Groff 4870ac8f1d vm: add compact-gc command to factorbug 2011-12-12 19:03:42 -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
Joe Groff 5e99a7bbbf vm: disable SIGINT handler while in factorbug
Fixes #410
2011-11-15 18:50:42 -08:00
Joe Groff e24400679f vm: more defense against multi-faulting
* Clear faulting_p from a safepoint rather than inside general_error, because jumping into unwind-native-frames could blow up.
* Handle multiple faults from fatal_error by breakpointing. Is there anything else we can safely do at that point?
* Verify memory protection faults in the top half of the signal handlers because signal dispatch could fault. Treat memory faults during gc or fep as fatal errors.
* Add a function factor_vm::abort() that restores the default SIGABRT handler and ::abort()s. Use it from fatal_error() so we get useful context from gdb and so the user gets feedback from the system crash reporter that Factor blew up and didn't just disappear.
* In factorbug(), don't proceed with .s .r .c if it would be unsafe to do so.
* Don't pile on signals if we've already called fatal_error().
2011-11-12 13:02:57 -08:00
Joe Groff 2c5014e74e vm: "edges" command for factorbug 2011-11-11 10:12:36 -08:00
Joe Groff 0c58fd5c26 vm: more commentary on lock_console() stuff 2011-11-08 08:52:52 -08:00
Joe Groff f9aa0419c4 vm: interrupt stdin_loop when entering fep
The stdin_loop thread will keep trying to consume input unless we stop it by sending it a signal. Use SIGUSR2 to stop the read syscall and a mutex to hold up the loop while the fep is active.
2011-11-08 08:42:48 -08:00
Joe Groff ec19171220 vm: readable feps for more types 2011-11-06 20:26:52 -08:00
Joe Groff f4479ee1e6 vm: print type names instead of numbers in fep 2011-11-06 20:26:51 -08:00
Joe Groff 34ea20beca vm: only show factorbug help the first time 2011-11-02 13:23:13 -07:00
Joe Groff d9afe92c97 get sampler working under windows 2011-11-02 13:23:12 -07:00
Joe Groff b341b0ce13 vm: only show factorbug basic commands at first
"help" brings up the entire command list.
2011-11-02 13:23:07 -07:00
Joe Groff 23208e5697 vm: give factorbug a help command
Also change the prompt to "> _" instead of "READY\n_" since it's not 1970 anymore
2011-10-27 21:18:23 -07:00
Joe Groff 2d5360778f cleanups from code review 2011-10-27 21:18:23 -07:00
Joe Groff 27c43ea6a3 vm: add "gc" command to factorbug 2011-10-27 21:18:22 -07:00