Commit Graph

1692 Commits (265f19e9522b9688b12805e2d576816cd5904a7e)

Author SHA1 Message Date
Doug Coleman dcc1e7773f contexts.hpp: Increase callstack reserve space to 16k for Mac64. Fixes issue . 2015-08-04 12:43:24 -07:00
John Benediktsson 5c0d8c7e4f vm: minor fixes. 2015-08-04 07:49:50 -07:00
Björn Lindqvist 22bd11c4a4 VM: fix silly compile error 2015-08-04 16:02:10 +02:00
Björn Lindqvist 6fedb79c73 VM: bump stack_reserved from 1kb to 4kb
The added test case fails with a doulbe fault, which appears to be
caused by a stack overflow in the code that tries to handle the stack
overflow. So bumping it to 4096 bytes should give the code enough stack
space to play with.
2015-08-04 16:02:10 +02:00
Björn Lindqvist beb71ce49b VM: merge full_collector.hpp into full_collector.cpp 2015-08-04 16:02:10 +02:00
Björn Lindqvist a7757eed41 VM: new method context::address_to_error 2015-08-04 16:02:10 +02:00
Björn Lindqvist 504be0c7cb VM: signal_error and fp_trap_error not needed, call general_error directly 2015-08-04 16:02:10 +02:00
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
Björn Lindqvist ae725b737a VM: lets merge entry_points.hpp with vm.hpp, so you have one less header
file to worry about
2015-08-04 16:02:09 +02:00
Björn Lindqvist 282c52b872 VM: you can insert the write_barrier() the first time you interate the
blocks, so you don't need to do it twice
2015-08-04 16:02:09 +02:00
Björn Lindqvist 03d861976c VM: new method visit_instruction_operands(), it replaces the instruction
operand iteration code in compaction.cpp and image.cpp
2015-08-04 16:02:09 +02:00
Björn Lindqvist e565b0291f VM: refactors slot_visitor by removing a lot of one-use methods
I think it's easier to see the code flow if small method bodies that are
only called once are inlined into visit_all_roots() instead
2015-08-04 16:02:09 +02:00
Björn Lindqvist f5f8ce1501 VM: word_stack_frame_p() is not used and find_all_quotations() is
trivial so those methods can be removed
2015-08-04 16:02:09 +02:00
Björn Lindqvist 49a406d880 VM: using compute_external_address everywhere instead of store_external_address 2015-08-04 16:02:09 +02:00
Björn Lindqvist 50318a6f77 VM: new method compute_external_address 2015-08-04 16:02:08 +02:00
Björn Lindqvist 718ea51d8a VM: remove the collect_compact_code_impl(), collect_compact_impl() can
be used instead

this might slow down collect_growing_heap(), but heap growth happens so
rarely that it shouldn't matter
2015-08-04 16:02:08 +02:00
Björn Lindqvist b44db91f65 VM: init_code_heap is trivial and only used once, so let's remove it 2015-08-04 16:02:08 +02:00
Björn Lindqvist 18ab09e493 VM: object_compaction_updater -> lambda func 2015-08-04 16:02:08 +02:00
Björn Lindqvist 9049aa1f65 VM: another opportunity to use a lambda function over a struct 2015-08-04 16:02:08 +02:00
Björn Lindqvist a5a7232b8f VM: use a function update_relocation to replace the
code_block_compaction_relocation_visitor struct
2015-08-04 16:02:08 +02:00
John Benediktsson b065d6172d vm: rename emit_quot to emit_quotation. 2015-07-15 11:21:20 -07:00
John Benediktsson 4c2c8f133f vm: rename some primitives, and some cleanup.
* quot-compiled? => quotation-compiled?
* optimized? => word-optimized?
2015-07-15 11:13:52 -07:00
Björn Lindqvist b9b75c272b VM: let's merge (save-image) and (save-image-and-exit) into one 3
arg (save-image). it's good not to have to many similar primitives
2015-07-12 22:36:59 +02:00
Björn Lindqvist d608f3377b VM: get_entry_point is unused 2015-07-12 22:36:59 +02:00
Björn Lindqvist c69e1a6e93 VM: move the paths out of gc memory so that they arent unnecessarily
added to the image
2015-07-12 22:36:59 +02:00
John Benediktsson 801fdebde2 vm: bring back FACTOR_ASSERT. 2015-07-06 15:18:09 -07:00
Björn Lindqvist 4bc0720e51 VM: more changes of structs to lambda functions 2015-07-06 22:49:38 +02:00
Björn Lindqvist 4dfac78fc1 VM: move changes of structs to lambda functions 2015-07-06 22:49:38 +02:00
Björn Lindqvist 365b39e0cc VM: change lot of visitation objects to use cool lambda functions instead 2015-07-06 22:49:38 +02:00
Björn Lindqvist fce5d4353a VM: replace binary_payload_start() with slot_count()
This should simplify a little the address calculations when visiting
slots of an object
2015-07-06 22:49:38 +02:00
Björn Lindqvist 46423dfebf VM: merge strings.hpp and tuples.hpp into layouts.hpp, because those
header files were so tiny
2015-07-06 22:49:38 +02:00
Björn Lindqvist 66eb9f1fe5 VM: split the size() method into base_size() and aligned_size() 2015-07-06 22:49:38 +02:00
Björn Lindqvist ed702209ce VM: fix bignum>fixnum-strict conversion, previously most-negative-fixnum
>bignum bignum>fixnum-strict didn't work
2015-06-29 08:19:42 +02:00
Björn Lindqvist 35b04f8ec1 VM: fixes a bug with the handling of 0 bignums, and declares bignum/mod
to maybe output fixnums
2015-06-27 16:14:58 +02:00
Björn Lindqvist 2f835d3666 compiler.tree.propagation.*: implements downgrading to fixnum for the
mod word, maybe a first step in solving 

factor_vm::primitive_bignum_mod is changed so that it outputs a fixnum
if the value is small enough. Then the compiler can take advantage of
knowing that expressions like [ >bignum 10 mod ] always result in a
fixnum [-9,9] and inline more arithmetic.
2015-06-27 16:14:58 +02:00
Björn Lindqvist e14d7a3508 VM: make the bignum_to_* family free functions, they don't need to be
members of factor_vm
2015-06-27 16:14:58 +02:00
Doug Coleman 31fe045560 vm: differentiate which strerror is printing the message. 2015-06-08 17:58:00 -07:00
Doug Coleman 1d58f827a2 platform.hpp: Indent so I can see wtf is going on with the preprocessor control flow.
Look for ``__linux__`` on linux instead of ``linux`` because compiling with
-std=c++11 removes the ``linux`` preprocessor symbol.
2015-06-05 10:53:02 -07:00
Doug Coleman a83df49ecc ffi_test.c: Casting a 32bit int to a 64bit pointer is invalid. Instead,
cast it to a 64bit int then to the pointer. Found with visual studio 2015.
2015-06-05 10:21:20 -07:00
Doug Coleman f26c7fc66d utilities.hpp: Use auto pointer instead of gcc extension typeof().
Fixes .
2015-06-05 10:20:32 -07:00
Björn Lindqvist 40b7805e0a VM: fixes so that raw_fread and safe_fread returns a size_t again 2015-06-05 02:14:49 +02:00
Björn Lindqvist 428937dbeb VM: make FACTOR_FOR_EACH not call .end() more than once 2015-06-05 02:14:49 +02:00
Björn Lindqvist 0713f28bdb VM: safe_fread needs to return an int so you can return -1 on error 2015-06-05 02:14:49 +02:00
Björn Lindqvist a0e7bb8770 VM: move free_list_allocator<Block>::next_allocated_block_after to
tenured_space::next_allocated_object_after, because it's only used there
2015-06-05 02:14:49 +02:00
Björn Lindqvist f1ca83524a VM: new functions raw_fclose and raw_fread
These need to be used when the image is loaded because there is no
context so you can't throw io errors yet.
2015-06-05 02:14:49 +02:00
Björn Lindqvist 9d289e35f4 VM: macro FACTOR_FOR_EACH used in more places to drive iteration 2015-06-05 02:14:49 +02:00
Björn Lindqvist b7bd0668b3 VM: macro FACTOR_FOR_EACH to make stl container iteration easier to express 2015-06-05 02:14:48 +02:00
Doug Coleman 27590b514c vm: Only call fclose() once. Rename io_error() to io_error_if_not_EINTR() to be more explicit.
Fixes .
2015-06-03 14:35:48 -07:00
Björn Lindqvist 8e1f3a0e51 VM: after reset_datastack and retainstack clear the stack segment. makes
it easier to find bad accesses to shadow data
2015-05-22 12:22:28 -07:00
Björn Lindqvist 183ec83a6d VM: possible fix for .
Fix for reset_context() so that the top two stack items are never
removed from the stack so if the parent->init_context(ctx) call triggers
a GC, those items are never collected.
2015-05-22 12:22:27 -07:00