Björn Lindqvist
da4812ba21
VM: refactoring which removes two not useful short methods
2016-04-04 23:32:23 +02:00
Doug Coleman
b324c30cc7
vm: Fix four compile warnings reported by gcc with -pedantic flag.
2016-03-30 15:39:42 -07:00
Björn Lindqvist
10ac4da0f6
VM: fixes to make some if-else statements read better
2016-03-31 00:37:59 +02:00
John Benediktsson
02956a25ce
vm: compact-gc was checked twice.
2016-03-28 22:28:57 -07:00
Björn Lindqvist
9a531076f0
VM: improved vm_executable_path which works for arbitrary long paths
2016-03-23 16:15:30 +01:00
Björn Lindqvist
83e1ee5084
VM: fix string copying to not use PATH_MAX here
2016-03-23 16:15:29 +01:00
Björn Lindqvist
4f33f22b56
VM: on errors, only dump the heap if it has been initialized
2016-03-23 01:56:40 +01:00
Björn Lindqvist
579875821b
VM: removes the OBJ-ERROR special object in favor of a constant
...
The special object contained the string "kernel-error" which were used
to tag VM errors. But it is simplier and removes a little complexity to
just tag them with a fixnum constant.
2016-03-22 17:52:19 +01:00
Björn Lindqvist
2f1e963587
Build: never dynlink with gui libs
2016-03-11 05:17:04 +01:00
Doug Coleman
7488e54825
math.cpp: Fix two warnings. Fixes #1549 .
2016-03-08 10:02:28 -08:00
Jon Harper
13ba081ac8
primitive_format_float, return empty string on bad locale instead of C++ exception
2016-03-08 07:55:25 -08:00
Jon Harper
19fadb6c96
prettyprinter, locale independant float printing
2016-03-08 07:55:25 -08:00
Doug Coleman
5813e8384e
command-line.startup: document more command line flags. we already have -nosignals, but it was hidden in the source code. Fix spacing for default image. Closes #1514 .
2016-03-03 17:16:39 -08:00
Doug Coleman
67eb64cf00
vm/contexts.cpp: We are only deleting half the contexts because we increment the iter twice per loop! Fixes #1534 . Thanks clang!
2016-03-01 00:19:43 -08:00
Björn Lindqvist
44b9b26baa
VM: nitpick fix of filenames in comments
2016-02-28 01:23:59 +01:00
Björn Lindqvist
2db1e7e6a5
VM: simplifies factor_vm::determine_inline_cache_type
2016-02-28 01:10:12 +01:00
Björn Lindqvist
0c9c0b2f82
VM: removes a few methods related to relocation handling
...
They are only used once, so it is simpler to "inline" them
2015-12-13 13:56:36 +01:00
Björn Lindqvist
7da72ac77c
VM: the compute_vm_address method can be removed
2015-12-13 13:56:36 +01:00
Björn Lindqvist
08766090d3
VM: more fine-grained control over which special objects to save
...
It removes a few roots that doesn't need to be saved in the image and
can save a few hundred bytes.
2015-12-13 13:56:36 +01:00
Björn Lindqvist
46bfcbf3a2
VM: the rel_type() and rel_offset() accessors in instruction_operand can be removed
2015-12-13 13:56:36 +01:00
Björn Lindqvist
1a72f731e0
VM: now special-objects is used for -1, 0, 1 and t
...
The fields in the image_header aren't read or written to but I haven't
changed the format yet.
2015-12-10 10:22:38 +01:00
Björn Lindqvist
339b1b6466
VM: put the singletons t, -1, 0 and 1 in the special objects table
...
Having them there instead of as fields in the vm struct removes a bunch
of special handling. This commit just adds them and doesn't remove the
old ones to avoid potential chicken-and-egg bootstrap problems.
2015-12-09 21:31:13 +01:00
Björn Lindqvist
d911bc45fd
VM: refactors the prepare_boot_image method
...
easier to read if the methods compile_all_words and
initialize_all_quotations which are only used once are "inlined"
2015-12-04 13:57:57 +01:00
Björn Lindqvist
867c85f1c5
VM: can't go through the accessor here because it triggers the assert
2015-11-25 18:12:55 +01:00
Björn Lindqvist
0274e889b9
VM: refactor tagged.hpp so it's not dependent on the factor_vm class
...
this way untag<byte_array>(relocation) can be used in code_blocks.hpp
2015-11-24 16:00:50 +01: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
a8aaa42882
VM: refactoring to use the TAG macro directly over the tagged struct
...
eg. TAG(obj) is equivalent to tagged<object>(obj).type()
2015-11-22 23:42:54 +01:00
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