Commit Graph

1619 Commits (6a7ef7662fbc9ab7f11b1c95af81603924f2808a)

Author SHA1 Message Date
Björn Lindqvist d18c48c75b VM: possible fix for #1265. the size of the stack frame appears to have been miscalculated in iterate_callstack which this commit fixes. 2015-01-15 09:29:14 +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 8ea1eea4e1 VM: instead of passing around the trace_contexts_p arg, just clear the contexts in primitive_save_image_and_exit() it has the same effect but is simpler 2015-01-15 09:29:14 +00:00
Björn Lindqvist 4d7bc4c169 VM: merge of slot_visitor and code_block_visitor
Looks like there is no reason for them to be separate classes and by
merging them you can simplify lots of code.
2015-01-15 09:29:14 +00:00
Björn Lindqvist d2aea0f606 VM: replaced the reset_generation() generic method with one method for each generation 2015-01-15 09:29:14 +00:00
Björn Lindqvist dc9e937beb VM: vm::iterate_active_callstacks is only used once, so it's simpler if the code body is "inline" 2015-01-15 09:29:14 +00:00
Björn Lindqvist b61eaa8a16 VM: the full_collector class isn't needed since it is 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 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 f0bf693beb VM: free_list_allocator::first_block, last_block and next_block_after can be refactored away 2015-01-15 09:29:13 +00:00
Björn Lindqvist 1beac119d8 VM: removes the template parameter from mark_bits
since mark_bits only deals with arithmetic on memory addresses, it
doesn't need to be specialized so it can be untemplateized
2015-01-15 09:29:13 +00:00
Björn Lindqvist af270cb4d8 VM converts the methods callstack::frame_top_at and code_block::offset to use cells instead of void*'s 2015-01-15 09:29:13 +00:00
Björn Lindqvist 615420fe61 VM: calls to visit_code_roots() replaced with visit_uninitialized_code_blocks() 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 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
Björn Lindqvist 11e906139b VM: code_block::scan, make it so the method always returns -1 if scan can't be determined, part of the fix for #1265 2015-01-15 09:29:13 +00:00
Björn Lindqvist 8ee1f890f2 VM: refactoring intended to remove trace_*-methods that are just
simple delegations to the data/code_visitor instances
2015-01-15 09:29:12 +00:00
John Benediktsson 025283f252 vm: store full command-line including executable first argument. 2014-12-22 22:39:52 -08:00
John Benediktsson 70778b89ae Revert "VM: always clear the data and retainstack in general_error because they might contain uninitialized values (#1187)"
This reverts commit 378f208025.
2014-12-04 11:46:28 -08:00
Doug Coleman 875d2421df vm: We don't want ambiguity for which print triggered on a gc error. Differentiate the error messages. 2014-12-04 10:35:32 -08:00
Björn Lindqvist 378f208025 VM: always clear the data and retainstack in general_error because they might contain uninitialized values (#1187) 2014-12-04 10:26:23 -08:00
Björn Lindqvist 1cec8a7814 VM: modifying the uninitialized_blocks map in place instead of creating a new one is more efficient 2014-12-04 10:23:34 -08:00
Björn Lindqvist 451fc12411 VM: redundant if, trace_cards() doesnt do anything for empty generations anyway 2014-12-04 10:23:33 -08:00
Björn Lindqvist 93134b949f VM: the aging_collector and nursery_collector classes aren't needed because they are just simple instatiations of copying_collector 2014-12-04 10:23:33 -08:00
Björn Lindqvist 423e983514 VM: refactoring to get rid of the megamorphic_call_stub and check_code_pointer() words 2014-12-04 10:23:33 -08:00
Björn Lindqvist 885b5c7043 VM: no need for a nursery_space class, it's just a bump_allocator 2014-12-04 10:23:33 -08:00
John Benediktsson 4837ceebb4 vm: fix OS X issue with using symlinks from outside $factor. 2014-12-03 19:19:52 -08:00
Doug Coleman c675694619 vm: Annotate more places where we can gc.
Code formatting fix.
2014-11-29 19:25:46 -06:00
Björn Lindqvist 231f50039b VM: move next_object_after() and first_object() to aging_space (no iteration possible in nursery) 2014-11-21 02:16:04 -08:00
Björn Lindqvist 50c74fc496 VM: get rid of the duplicated nursery instance in vm->data->nursery
vm.nursery and vm->data->nursery are different objects. They get out
of sync when Factor code bumps vm.nursery but leaves vm->data->nursery
unchanged. The emptiness of vm->data->nursery meant that each_object()
never iterated it.
2014-11-21 02:16:03 -08:00
Björn Lindqvist 2a5e1e06f3 VM: each_object() can't iterate the nursery so instead we assume it's empty 2014-11-21 02:16:03 -08:00
Björn Lindqvist 2095fd57de VM: FACTOR_ASSERT so that data_root never wraps a null pointer, cause if it does, random crashes can happen 2014-11-17 17:27:36 -08:00
Björn Lindqvist 161eb0bb49 VM: fixed bignum_divide_unsigned_large_denominator so that it wont data_root-protect NULL-pointers 2014-11-17 17:27:36 -08:00
Björn Lindqvist f9869d8ad9 VM: remove bignum_roots.clear() (snuck in during rebase) 2014-11-17 17:27:36 -08:00
Björn Lindqvist 0e8e2af0a7 VM: adding a few forgotten .untagged() calls 2014-11-17 17:27:36 -08:00
Björn Lindqvist 8741dbefce VM: bignum_roots traversal code deleted! 2014-11-17 17:27:35 -08:00
Björn Lindqvist 981a02be27 VM: Erasing the last traces of GC_BIGNUM from bignum.cpp 2014-11-17 17:27:35 -08:00
Björn Lindqvist 1f6d6b9a5d VM: cell -> ret 2014-11-17 17:27:35 -08:00
Björn Lindqvist 7d6f282d91 VM: conversion of many more bignum.cpp methods to use data_roots instead
of gc_bignum
2014-11-17 17:27:35 -08:00
Björn Lindqvist 2fcea047d2 VM: bignum_new_sign, bignum_maybe_new_sign and bitnum_magnitude_ash
converted to using data_roots
2014-11-17 17:27:35 -08:00
Björn Lindqvist c6ab72effc VM: windows bignum_gcd variant fixed 2014-11-17 17:27:35 -08:00
Björn Lindqvist a4df09a34e VM: a lot of methods in bignum.cpp converted to use data_roots instead of gc_bignums 2014-11-17 17:27:35 -08:00
Björn Lindqvist 441a4595bb VM: the copy assignment operator is overloaded so you need a custom swap 2014-11-17 17:27:34 -08:00
Björn Lindqvist 8beb4e179d VM: change the BIGNUM_TO_POINTER macro so that it automatically sees through tagged pointers 2014-11-17 17:27:34 -08:00
Björn Lindqvist e862f70a16 VM: reallot_array already data_roots the array, so callers don't need to
do it too
2014-11-17 17:27:34 -08:00
Björn Lindqvist 8489dd9be6 Build: other hpp's use utilities.hpp so it must be included earlier 2014-11-12 19:41:32 -08:00
Doug Coleman 11be8734cb GNUmakefile: Remove LIBPATH from the build system since nothing needs it. Fixes #1192. 2014-11-11 00:05:52 -08:00
Björn Lindqvist 4e63ba8dc8 VM: debug code which memsets the resetted space 2014-11-10 23:23:43 -08:00
Björn Lindqvist d63a6a20ee ffi: test functions for bug #1021
Conflicts:
	vm/ffi_test.c
	vm/ffi_test.h

Note: Let's add tests in basis/compiler/tests/alien.factor for this.
2014-11-10 23:22:35 -08:00