Björn Lindqvist
c55a6ef873
VM: removing the unused callstack-bounds primitive
...
Probably needs new boot images
2016-11-21 22:30:20 +01:00
Björn Lindqvist
e4bdbf1503
VM: better init of stdin, stdout and stderr
2016-11-21 20:40:25 +01:00
Björn Lindqvist
9055ff5189
VM: ensuring all fields are initialized
2016-11-21 04:47:48 +01:00
Björn Lindqvist
abf497938b
Revert "VM: cast to fixnum looks suspicious"
...
This reverts commit 5027830b05
.
2016-11-16 05:23:54 +01:00
Björn Lindqvist
5027830b05
VM: cast to fixnum looks suspicious
2016-11-15 05:58:11 +01:00
Björn Lindqvist
5f869f8181
VM: the else clause is not necessary
2016-11-15 05:57:40 +01:00
Björn Lindqvist
69acbbbefd
VM: next_block_after can be removed
2016-11-15 03:49:46 +01:00
Björn Lindqvist
94b274490c
Revert "VM: undo a8aaa42882
( #1513 )"
...
This reverts commit e50ef532ca
.
2016-11-12 00:19:52 +01:00
Björn Lindqvist
e50ef532ca
VM: undo a8aaa42882
( #1513 )
2016-11-11 17:36:04 +01:00
Björn Lindqvist
0b6ffdc77e
Revert "VM: undoing 0274e889b9
( #1513 )"
...
This reverts commit a4802aba68
.
2016-11-09 02:07:56 +01:00
Björn Lindqvist
a4802aba68
VM: undoing 0274e889b9
( #1513 )
2016-11-08 13:37:52 +01:00
Björn Lindqvist
2308ca06e0
Revert "VM: undoing 22bb0cfecf
( #1513 )"
...
This reverts commit e9c72baf2e
.
2016-11-07 23:43:50 +01:00
Björn Lindqvist
e9c72baf2e
VM: undoing 22bb0cfecf
( #1513 )
2016-11-07 14:18:10 +01:00
John Benediktsson
4fee8bd2cb
vm: change where we set safepoints_fep to false to allow old Ctrl-C behavior.
2016-11-01 19:21:47 -07:00
Alexander Iljin
0245a93bee
VM: add enable-ctrl-break and disable-ctrl-break primitives
...
These are for the Listener to wrap around user-supplied quotations. Nesting
is not supported at the moment.
2016-11-01 16:53:00 -07:00
Alexander Iljin
526a995d64
VM: implement a ctrl-break handler thread ( #1573 )
2016-11-01 16:53:00 -07:00
Björn Lindqvist
e9cd20604c
VM: factor_vm::compile_inline_cache() can be removed
2016-10-31 16:16:42 +01:00
Björn Lindqvist
ffab2bb7e0
VM: code_block::optimized_p() method isn't needed
2016-10-31 14:18:39 +01:00
John Benediktsson
55fdf79afd
vm: fix missing CAPS enum.
2016-10-26 19:52:18 -07:00
Björn Lindqvist
f070a47ec0
VM: add marking as a timed gc phase
...
I think that makes sense because most time when doing a full gc is spent
marking.
2016-10-20 07:46:21 +02:00
Björn Lindqvist
752c895d23
VM: refactor gc_event so that the phase times are stored in an array
...
So that you don't need a new method for each gc phase to time.
2016-10-20 00:34:18 +02:00
Björn Lindqvist
51408b66cb
VM: the jit class doesn't need to store the code block type
2016-10-19 09:28:59 +02:00
Björn Lindqvist
453eca66c4
VM: changing case of code_block_type
2016-10-19 09:14:58 +02:00
Björn Lindqvist
f147bd4404
VM: uppercasing gc_op
2016-10-19 09:09:32 +02:00
Björn Lindqvist
df171b0485
VM: changing case of enums values bignum_comparison and generation
...
It is consistent if all enum values have all uppercase names.
2016-10-19 08:57:33 +02:00
Björn Lindqvist
4f6381587c
VM: removing update_code_roots_for_sweep()
2016-10-19 08:12:40 +02:00
Björn Lindqvist
7d9bad465c
VM: refactoring allot_code_block() to work like allot_large_object()
...
To make it possible to eventually grow the code heap
2016-10-17 08:03:48 +02:00
Björn Lindqvist
026b626203
VM: move allot_code_block() to the allot.hpp file
2016-10-17 08:03:48 +02:00
Björn Lindqvist
3911f7b88c
VM: init_data_heap() isn't needed
2016-10-14 13:52:44 +02:00
Björn Lindqvist
67bb9a7c71
VM: checking addresses differ before memmoving
...
It appears to speed up compaction a bit in cases where only a few
objects need to move.
2016-10-14 13:52:44 +02:00
Björn Lindqvist
aace892527
VM: rename of collect_growing_heap_op and collect_growing_heap()
...
The idea is to "make room" for collect_growing_code_heap_op and
collect_growing_code_heap() to enable code heap growth.
2016-10-13 02:13:09 +02:00
Björn Lindqvist
55e6ccb708
VM: remove the reversing from sampling profiler callstack collection #452
2016-10-13 01:34:55 +02:00
Björn Lindqvist
46105b62f6
VM: change callstack>array primitive so it doesn't reverse anymore
...
This fixes one part of the #452 bug.
2016-10-13 01:34:55 +02:00
Björn Lindqvist
98db13fe9d
VM: merge of clone_object() and primitive_clone()
2016-10-13 01:34:55 +02:00
Björn Lindqvist
bbd71ae975
math.parser: (format-float) doesn't need to zero-terminate returned byte-array
2016-10-09 00:47:37 +02:00
Björn Lindqvist
ac44f3069a
VM: indent comment and change error message
2016-10-08 07:13:08 +02:00
Björn Lindqvist
ae9818db87
VM: simpler code for find_object_containing_card
2016-10-08 07:11:47 +02:00
Björn Lindqvist
8cacf7bf8d
VM: simpler code for reallot_array
2016-10-08 07:10:26 +02:00
Björn Lindqvist
c2f4fdb172
VM: merge of the free_list and free_list_allocator classes
...
Seem simpler to have all the free list stuff in one class rather than
split it over two classes.
2016-10-08 07:04:28 +02:00
Björn Lindqvist
f0eec26f3c
VM: reorg and more comments
2016-10-08 07:04:28 +02:00
Björn Lindqvist
78d9065db0
VM: UAP_SET_TOC_POINTER appears to be a noop on all platforms
2016-09-29 07:14:30 +02:00
Björn Lindqvist
9eab4b5652
VM: make visit_instruction_operands() skip over uninitialized blocks
...
It will crash otherwise when compacting the code heap.
2016-09-29 06:35:35 +02:00
Björn Lindqvist
603f5f9bbf
VM: better? comment for uninitialized_blocks
2016-09-28 20:38:52 +02:00
Björn Lindqvist
91843ef22d
VM: removing end_gc()
2016-09-28 05:22:32 +02:00
Björn Lindqvist
8899914697
VM: better start_gc_again() code
2016-09-28 05:20:12 +02:00
Björn Lindqvist
c6faf98c86
VM: return the loop, it is needed for best performance
2016-09-26 05:16:33 +02:00
Björn Lindqvist
a6df4168af
bootstrap.layouts: sync note in comments
2016-09-25 20:10:16 +02: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
Björn Lindqvist
764a604467
VM: moving initialize_code_blocks() into primitive_modify_code_heap()
2016-09-22 15:16:07 +02:00
Björn Lindqvist
f8b94c2679
VM: allot_large_object fits better in the allot.hpp file
2016-09-22 13:13:55 +02:00
Björn Lindqvist
c02d913579
VM: big refactoring removing the gc_workhorse
...
Each collector were a slot_visitor containing a gc_workhorse containing
a policy class. This commit removes the gc_workhorse and the policies
and instead "inlines" the common code in the collector bodies. So there
is more code duplication, but the control flow doesn't "jump around" so
much so it is easier to understand. It also makes the nursery gc faster
because its collection code can be optimized better without the
workhorse/policy system.
2016-09-22 13:12:59 +02:00
Björn Lindqvist
a0df88f20b
VM: renaming verify_memory_protection_error to set_memory_protection_error
...
and sets the signal_fault_addr and signal_fault_pc in the function.
2016-09-22 13:12:59 +02:00
Björn Lindqvist
b2bb1f8ff4
VM: simplifying the load_image() code
2016-09-16 06:27:46 +02:00
Björn Lindqvist
ab7e077b1d
Docs: fixing docs & comments to work with new stack clearing
2016-09-12 02:11:51 +02:00
Björn Lindqvist
349f99661d
compiler.*: Remove the scrubbing part of the GC maps
...
Instead of generating GC maps which describe which stack locations that
are uninitialized, we emit ##clear instructions for those locations in
front of ##call-gc instructions. This makes the context root scanning
much simpler because the GC can assume that all stack slots are
initialized. It also removes the compiler.cfg.stacks.vacant pass and
seem to reduce the image size slightly because many fewer GC maps needs
to be emitted.
2016-09-11 20:34:44 +02:00
Björn Lindqvist
bc8525eb02
VM: the small return_address_index function can be implemented in the header
2016-09-10 03:18:18 +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
897d0d6eeb
Revert "vm: fix typo from c++ comment patch causing compile failure."
...
This reverts commit 4e48e836b9
.
2016-09-09 05:47:52 +02:00
Björn Lindqvist
0a5f1689e1
VM: init_inline_caching is not needed
2016-08-19 02:58:19 +02:00
Björn Lindqvist
b5c6658ae5
VM: removing the safepoint_state class
...
The code reads better if the safepoint_state methods and
attributes (sample_counts and safepoint_fep_p) are moved to the vm
class.
2016-08-15 15:16:41 +02:00
Björn Lindqvist
2f6f69eb5b
VM: trying to simplify record_sample and the profiling_sample constructor
2016-08-15 15:16:41 +02:00
Björn Lindqvist
76139dca56
VM: new ffi_test functions added
2016-08-05 15:30:28 +02:00
Doug Coleman
4e48e836b9
vm: fix typo from c++ comment patch causing compile failure.
2016-08-04 09:28:50 -07: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
00d15b66a6
compiler.tests.alien: tests for varargs calls
2016-08-02 23:36:02 +02:00
Alexander Iljin
56880fbacf
vm: add a comment on possible issues with QueryPerformanceCounter
2016-07-30 09:25:30 -07:00
Björn Lindqvist
c646db3ae5
VM: fixing small style issues
...
Like aligning comments and changing //-comments to /* */
2016-07-02 15:50:59 +02:00
Björn Lindqvist
801c70e9da
VM: removes the signal_handler_impl methods from factor_vm
...
Instead the code is in the functions with the same name. That way, they
don't need to exist both as functions and methods.
2016-06-29 18:27:26 +02:00
Björn Lindqvist
f99c684cc5
VM: set_border_locked is the same on windows and unix
2016-06-27 16:27:56 +02:00
Björn Lindqvist
a331ad3788
VM: factor_vm::set_callstack and set_retainstack is not needed
2016-06-27 16:08:58 +02:00
Alexander Iljin
7a94230899
VM: fix the sampler_thread handle leak
2016-06-22 11:27:26 -07:00
Björn Lindqvist
3eef76c686
VM: a little faster definition of contains_p()
2016-06-14 04:40:20 +02:00
Björn Lindqvist
6984bae7ca
VM: rename of JIT_PUSH_IMMEDIATE to JIT_PUSH_LITERAL
...
The code template pushes both immediates and references so the name was
wrong.
2016-06-07 14:54:23 +02:00
Björn Lindqvist
6b95813dbc
VM: refactor the immediate_p check out of visit_pointer()
...
This avoids reassigning to slots that are never changed. It makes the minor-gc pass 2% faster.
2016-06-07 14:42:06 +02:00
Björn Lindqvist
33d5ecefd5
VM: refactor a struct into a c++11 lambda
2016-06-07 14:04:28 +02:00
Björn Lindqvist
a58f8c76f4
VM: rename compile_inline_cache and refactor the loop body into emit_check_and_jump
2016-05-31 03:37:24 +02:00
Björn Lindqvist
dae2229957
VM: omit the type check if checking for fixnum and it's the first check
...
Previously: and ecx, 0xf ; cmp ecx, 0 ; jz <address> was generated. Now
instead: and ecx, 0xf ; jz <address> because the cmp, ecx, 0 instruction
is redundant.
2016-05-31 03:37:24 +02:00
Björn Lindqvist
59443dca01
VM: new method quotation_jit:nth
...
It's less tedious than writing array_nth(elements.untagged(), i + N) everywhere
2016-05-31 03:37:24 +02:00
Alexander Iljin
e302928510
vm: fix a typo in a comment
2016-05-30 12:11:56 -07:00
Alexander Iljin
3ea7fe616e
vm: fix warning C4800: forcing value to bool
...
The warning is issued by the Visual Studio 2015, treated as error.
2016-05-30 12:11:56 -07:00
Alexander Iljin
db9007a713
vm: give windows_stat fewer reasons to fail
...
More sharing flags mean that the file opening attempts will succeed even
if the file is already open by another process for writing or deleting.
2016-05-30 12:11:56 -07:00
Björn Lindqvist
4a471ba07c
VM: make it so compiling mega cache lookups doesn't generate stack frames ( #651 )
2016-05-30 08:23:18 +02:00
Björn Lindqvist
3b016bc254
VM: a bunch of more methods on the factor_vm class that can be made into funtions
2016-05-30 07:44:26 +02:00
Björn Lindqvist
00a64c9271
VM: name change no_non_safepoint_words_p -> stack_frame_p
...
It returns true if the quotation should be wrapped in a stack frame.
2016-05-30 07:44:20 +02:00
Björn Lindqvist
1fddf79724
VM: moving a few methods arounds
...
word_call, word_jump and emit_mega_cache_lookup are only used in quotations.cpp so they should be defined there too.
2016-05-30 03:03:10 +02:00
Björn Lindqvist
4509371f7c
VM: shorter definition of emit_check
2016-05-29 04:55:11 +02:00
Björn Lindqvist
b027285b48
VM: makes some factor_vm methods to free functions
2016-05-29 03:03:07 +02:00
Björn Lindqvist
08c2e3a32d
VM: better logic in factor_vm::set_sampling_profiler
...
It avoids the double-negation.
2016-05-19 01:25:53 +02:00
Björn Lindqvist
8ae6e8e23d
VM: safe_strdup needs to be called in vm_executable_path
2016-05-14 19:00:20 +02:00
Björn Lindqvist
335615a025
VM: more destruction needed in the destructor
...
Console needs to be closed, special objects free'd and code heap
deleted.
2016-05-14 18:21:50 +02:00
Björn Lindqvist
7342d97e6d
VM: add destructor to vm_parameters so that executable and image_path is
...
free'd
Valgrind complained that those were leaking
2016-05-14 18:21:49 +02:00
Björn Lindqvist
9555915e7b
VM: more stuff to deallocate in the destructor
2016-05-14 18:21:49 +02:00
Björn Lindqvist
e2b133e291
VM: return value of vm_executable_path() should be free'd
2016-05-14 18:21:49 +02:00
Björn Lindqvist
63791bf90e
VM: move some logic from factor_vm to the vm_parameters class
...
It's good because the factor_vm class is to fat.
2016-05-14 18:21:49 +02:00
Björn Lindqvist
83ce08487e
VM: initialize the ctx member in the construction
...
To make valgrind happy because it complains that it is uninitialized.
2016-05-14 18:21:49 +02:00
Björn Lindqvist
340ad8b8d9
VM: removes the delete_contexts method
2016-05-14 18:21:49 +02:00
Björn Lindqvist
7f8d5cbef4
VM: when starting the sampling profiler, the data needs to be cleared
2016-05-06 19:56:13 +02:00
Doug Coleman
10164b6af8
GNUMakefile: Explicitly ask for stdlib=libc++ because clang downgrades the version silently if you use backward compatibility mode with OSX 10.5 and then shrink_to_fit() doesn't work.
...
Config.macosx: Support for shrink_to_fit() is claimed to be in 10.7 and later, but 10.7 and 10.8 both throw this huge error:
https://paste.factorcode.org/paste?id=3872
Fixes #1624 .
2016-05-05 16:48:40 -07:00
Björn Lindqvist
9824be8714
VM: The C++11 method shrink_to_fit() can be used to release memory
2016-05-05 14:22:57 +02:00