Commit Graph

1743 Commits (f7b7b5afbf419cc8ea06e1c55e21b9bb5a32cecd)

Author SHA1 Message Date
Björn Lindqvist 575da3e478 VM: fix so that errno is set if MoveFileEx fails, should fix #1490 2015-10-12 12:19:21 +02:00
Björn Lindqvist 7dfb352a7e VM: replaced calls to out_of_memory() with fatal_error()
No need for a special out of memory function -- it's just a kind of
fatal  error. Also make fatal_error() call dump_memory_layout() for
easier debugging.
2015-10-08 20:46:17 +02:00
Björn Lindqvist cb55fcf20f VM: prettier and more detailed output when dumping generations 2015-10-08 16:25:35 +02:00
Doug Coleman 7eec8621aa vm: MoveFileEx returns BOOL which needs help converting to C++ bool. 2015-10-01 17:04:13 +00:00
John Benediktsson bd04290187 vm: fix signature for safe_fopen. 2015-09-30 19:03:39 -07:00
Björn Lindqvist 85784c5265 VM: make save-image throw exception on error (#1090) 2015-09-30 23:31:47 +02:00
Björn Lindqvist 2536b6cd93 VM: fix move_file called from save_image
save_image() shouldn't throw exceptions because if the 'then_die'
argument is t it would leave factor in an inconsistent state. So
therefore move_file() should be fixed and raw_fclose() called instead of
safe_fclose().
2015-09-29 23:13:10 +02:00
Björn Lindqvist 40eb664425 VM: simplified save_image, goto works here! 2015-09-29 23:13:09 +02:00
Björn Lindqvist ffc441ad63 VM: looks like ERROR_C_STRING is never thrown, so it can be removed 2015-09-29 23:12:56 +02:00
Björn Lindqvist 614595bd9a VM: workhorse attribute not used 2015-09-22 08:51:03 +02:00
Björn Lindqvist b3de115e3c VM: remove RT_EXCEPTION_HANDLER reference 2015-09-02 21:54:47 +02:00
Björn Lindqvist 769c09def5 VM: for consistency, it is easier to put all functions in the exports file 2015-09-02 21:54:44 +02:00
Björn Lindqvist bc7f9ee669 VM: always use undecorated names when loading ffi functions
For win32, Factor tries four different function names when loading
stdcall and fastcall functions, in case decorated names are used in the
dll. It seems to not be necessary because a dll meant for 3rd party use
will always export undecorated
names (http://blogs.msdn.com/b/oldnewthing/archive/2004/01/12/57833.aspx).
2015-09-02 21:54:41 +02:00
Björn Lindqvist da3de080ee VM: callback_entry_point() and update() can be removed 2015-09-02 21:54:39 +02:00
Björn Lindqvist de4917e6a1 VM: give the exception handling special object a real name 2015-09-02 21:54:33 +02:00
Björn Lindqvist 22887c5816 VM: get rid of the odd RT_EXCEPTION_HANDLER relocation
The address to the win32 relocation handler can be stored in a special
object and be accessed by jit-install-seh. Doing it that way is better
because you can remove a lot of special code related to that relocation
type.
2015-09-02 21:54:30 +02:00
Björn Lindqvist 68c0c0f53a VM: clear commented out code 2015-09-02 21:54:27 +02:00
Björn Lindqvist 84ec2164c2 VM: nicer way of initializing those special objects that are aliens 2015-09-02 21:54:18 +02:00
Björn Lindqvist cee0b19324 VM: the ffi-signal-handler and ffi-leaf-signal-handler primitives are unused 2015-09-02 21:54:15 +02:00
Björn Lindqvist a9c33cbfd7 VM: better way to set signal_resumable 2015-08-26 20:23:28 +02:00
Björn Lindqvist 663e5e2a09 VM: fix jit-signal-handler-prolog/epilog to account for the home space
Windows 64bit abi requires callers to reserve 32 bytes of home space in
the stack frame which the callee is free to clobber. Previous versions
of VS didn't compile code to take advantage of the home space so it
worked fined. VS2015 however, is using the home space which causes
registers and flags that were supposed to be saved to be
overwritten. The fix is to put a little extra empty space at the bottom
of the stack frame.
2015-08-26 20:23:25 +02:00
Björn Lindqvist 316b16f377 VM: instead of enqueue_safepoint() just call set_safepoint_guard() directly 2015-08-26 20:23:23 +02:00
Björn Lindqvist 5a39631b4b VM: refactoring, new function get_thread_pc() and simpler logic in exception_handler() 2015-08-26 20:23:20 +02:00
Björn Lindqvist 2a852915d2 VM: signal_fault_pc probably should be set here... 2015-08-26 20:23:17 +02:00
Björn Lindqvist 10464e7e4e VM: LEAF_FRAME_SIZE is 16 bytes on all platforms so we can simplify it 2015-08-26 20:23:15 +02:00
Björn Lindqvist cb0bf3b1ce VM: merge memory_protection_error() with memory_signal_handler_impl() 2015-08-24 07:23:40 -07:00
Björn Lindqvist 39c888230a VM: new function set_safepoint_guard to replace the functions (un)guard_safepoint 2015-08-24 07:23:40 -07:00
Björn Lindqvist 56ddb59b00 VM: new function set_memory_locked(true/false)
it wraps the mprotect/VirtualProtect platform differences and makes it
so you can unify some windows/unix code path forks
2015-08-24 07:23:40 -07:00
Björn Lindqvist 94eb855903 VM: make the debug output a little prettier 2015-08-24 07:23:40 -07:00
Björn Lindqvist 51daaf6be4 VM: the windows_image_path method is unused 2015-08-24 07:23:40 -07:00
Björn Lindqvist 4efef7bfd9 VM: merge the compute_dlsym_toc_address() with the
compute_dlsym_address() method

it makes the code slightly more cluttered but you get rid of a lot of
special casing for the ppc platform
2015-08-23 18:36:31 -07:00
Björn Lindqvist a53d5be683 VM: make allot_alien() and ffi_dlsym() use cell instead of void*
this way we get rid of a bunch of superfluous casts
2015-08-23 18:36:31 -07: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
Björn Lindqvist 59b7a50567 VM: removing the get_datastack/retainstack/callstack primitives
they can all be implemented using the
datastack/retainstack/callstack-for primitives and the less primitives
the better!
2015-08-23 18:36:30 -07:00
Björn Lindqvist 883f65d0e4 VM: fix one callstack overflow problem by "unlocking" the callstacks
border pages

Also a new vocab compiler.tests.callstack-overflow which is supposed to
contain all tests for callstack overflow-related problems.
2015-08-14 20:19:58 -07:00
Björn Lindqvist 59762009f1 VM: simplified logic for allot_object() 2015-08-14 20:19:57 -07:00
Björn Lindqvist 1b1b275a1a VM: simplifies the dispatch_resumable_signal() method 2015-08-14 20:19:57 -07:00
Björn Lindqvist b8aef640f9 VM: new method set_border_locked() in segment, so that you can remove
the protection of the guard pages
2015-08-14 20:19:56 -07:00
Björn Lindqvist 5d7fb5da60 VM: smaller style-fixes, like removing redundant else clauses and this prefixes 2015-08-14 20:19:55 -07:00
Björn Lindqvist e14d820138 VM: move trace_partial_objects to visit_partial_objects since it is a
kind of visitation function
2015-08-14 20:19:55 -07:00
Björn Lindqvist df669298ce VM: split dispatch_signal_handler into two methods, one for resumable
and one for non-resumable signals
2015-08-14 20:19:55 -07:00
Björn Lindqvist 2b1c6ca11a VM: move the frame_predecessor() method to the code_heap class 2015-08-14 20:19:54 -07:00
Björn Lindqvist f3c34e44d4 VM: FRAME_RETURN_ADDRESS define unused 2015-08-14 20:19:54 -07:00
Björn Lindqvist 9413f711b9 VM: the JIT_PROFILING special object is never used, so rename it to
JIT_UNUSED (removing it breaks boot images)
2015-08-14 20:19:53 -07:00
Björn Lindqvist 3f9fa7e39e VM: emit_prolog/emit_epilog can be simplified because stack frame and
safe point is always emitted together
2015-08-14 20:19:51 -07:00
Björn Lindqvist 358fae93c9 VM: the stack_frame_p() and safepoint_p() functions appear to be
semantically identical, let's merge them into a
no_non_safepoint_words_p() function
2015-08-14 20:19:50 -07:00
Björn Lindqvist 510193f012 VM: an unused #define we can eliminate 2015-08-14 20:19:50 -07:00
Björn Lindqvist 81057c4108 VM: the context_object_count must be wrong, there are only 4 of them 2015-08-14 20:19:50 -07:00
Doug Coleman 9f43820076 Revert "vm: don't use implicit this. thanks to Jon Harper for the report."
My bad. A buggy compiler is a buggy compiler. Not a good workaround.

This reverts commit 1602e5094c.
2015-08-14 11:15:55 -07:00