Slava Pestov
235f3238f5
Add alien-assembly form for inline assembler, works like alien-invoke except calls a user-supplied quotation instead of generating a subroutine call. Replaces FPU status control, SSE detection and read timestamp routines in vm/cpu-x86.*S
2010-01-07 17:39:22 +13:00
Slava Pestov
89e9f77b44
vm: Remove some dead code
2010-01-07 13:54:22 +13:00
Slava Pestov
6971df91fe
vm: remove unnecessary call to compile_all_words() from primitive_become()
2010-01-07 13:49:29 +13:00
Slava Pestov
c04fef10c7
vm: ensure that non-optimized calls to generic words which have not yet been compiled can still work
2010-01-06 23:49:14 +13:00
Slava Pestov
47c6197799
Update x86-32 for assembly entry point changes
2010-01-06 17:55:20 +13:00
Slava Pestov
36d2ac8921
vm: move c_to_factor, lazy_jit_compile_impl, throw_impl, set_callstack assembly routines into non-optimizing compiler for x86-64
2010-01-06 15:47:36 +13:00
Slava Pestov
18929373b9
Merge branch 'master' of git://factorcode.org/git/factor
2010-01-03 23:21:31 +13:00
Slava Pestov
ba5b90e063
Change how non-volatile register preservation is done in alien callbacks, with the aim of fixing callbacks on PowerPC, and to eventually eliminate assembly code from VM
...
- Simplify calculation of offset in relocation table
- Open-code %alien-callback
- Remove magic_frame hack from context objects
- Move magical return instruction from optimizing compiler backend into callback entry stub
2010-01-03 01:11:51 +13:00
Doug Coleman
eae646bfa0
remove warning
2009-12-28 10:02:36 -06:00
Doug Coleman
348b4bd2dc
Merge branch 'master' of git://factorcode.org/git/factor
2009-12-28 09:58:19 -06:00
Doug Coleman
964dbfe72d
avoid integer division in nano_count on windows
2009-12-28 09:56:10 -06:00
Slava Pestov
81430947d5
PowerPC: fix set-callstack primitive and start updating optimizing compiler backend for recent changes
2009-12-28 08:08:15 -06:00
Slava Pestov
285caff08e
Updating non-optimizing PowerPC backend for register variable removal (untested)
2009-12-28 12:40:45 +13:00
Slava Pestov
4d70649914
Merge branch 'eliminating_register_variables'
2009-12-27 01:29:53 +13:00
Slava Pestov
a77f48fe6b
Updating x86-64 port for global register variable removal
2009-12-27 01:17:42 +13:00
Slava Pestov
67153bf4bb
Fix bug in c_to_factor
2009-12-26 15:24:46 +13:00
Slava Pestov
7271900e6f
vm: code cleanup
2009-12-26 15:24:21 +13:00
Doug Coleman
7fa3b71c07
Add 0xe06d7363 to debugger.windows. Remove case 0xe06d7363 from SEH.
2009-12-23 14:04:52 -06:00
Slava Pestov
15eb8d1a0a
vm: remove VM_ASM_API
2009-12-24 01:37:24 +13:00
Doug Coleman
ab7792f25c
remove debug output
2009-12-22 14:39:30 -06:00
Doug Coleman
7077cb4bfb
try a different approach to fix the windows monotonic counter
2009-12-22 14:36:33 -06:00
Doug Coleman
c84f46fe8b
Ignore yet another undocumented exception. Tricks of the trade, I guess.
2009-12-22 13:33:39 -06:00
Slava Pestov
2b8521a326
Merge branch 'master' into eliminating_register_variables
2009-12-22 15:50:15 +13:00
Slava Pestov
febccd5f62
vm: if an aging GC is triggered while uninitialized code blocks are in the code heap, the code heap remembered set becomes out of date, resulting in code blocks pointing at invalid data
2009-12-22 15:49:21 +13:00
Slava Pestov
e96404327e
Get optimizing compiler working without global register variables in VM
2009-12-22 15:42:49 +13:00
Slava Pestov
63edd20a55
vm: eliminating register variables work in progress. Works on x86-32 with non-optimizing compiler
2009-12-19 10:59:56 +13:00
Slava Pestov
eb0a28aa54
Merge branch 'master' of git://factorcode.org/git/factor
2009-12-15 07:21:17 -05:00
Slava Pestov
0068bce934
vm: big overhaul of non-optimizing compiler
...
- change some primitives into sub-primitives: fixnum+ fixnum- fixnum* inline-cache-miss inline-cache-miss-tail
- rename some relocation types for clarity
- some other minor re-organizations and cleanups
2009-12-15 07:20:09 -05:00
Slava Pestov
dde84a11fb
Merge branch 'master' of git://factorcode.org/git/factor
2009-12-14 01:09:40 -06:00
Slava Pestov
0a3c5f5ac6
vm: fep out if monotonic counter decreases
2009-12-14 01:09:04 -06:00
Doug Coleman
b0b1da0923
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
vm/os-windows-nt.cpp
2009-12-13 20:45:40 -06:00
Doug Coleman
0eccec2133
workaround for QueryPerformanceCounter: if the high part of the count doesn't increment when the low part overflows, keep track of this and add the correction on future calls to nano_count
2009-12-13 20:42:51 -06:00
Doug Coleman
1454e534fe
fix a couple of warnings on win64
2009-12-13 20:00:02 -06:00
Slava Pestov
62e7aed2d3
vm/os-windows-nt.cpp: fix formatting
2009-12-13 16:52:59 -06:00
Slava Pestov
564934a9f1
fix compiler warning on linux
2009-12-13 16:10:30 -06:00
Slava Pestov
6552a4524c
vm: OS X version ccheck was failing on 10.5.0
2009-12-11 19:31:19 -05:00
Slava Pestov
344c357ef1
vm: grow the heap if a full collection doesn't reclaim enough space
2009-12-05 19:03:53 -05:00
Slava Pestov
9705768e3f
vm: remove DEFPUSHPOP macro
2009-12-04 20:56:48 -05:00
Slava Pestov
ead592697b
vm: be more eager to do a full collection to avoid fragmentation leading to heap growth
2009-12-04 03:41:19 -05:00
Slava Pestov
9963d265ba
vm: fix walker
2009-12-02 18:43:45 -05:00
Slava Pestov
998cc59dbc
vm: PowerPC fixes
2009-12-02 16:24:42 -06:00
Slava Pestov
d76d49d6cd
Fix typo in instruction_operand::load_value_masked()
2009-12-02 09:24:23 -05:00
Slava Pestov
514043eb14
vm: fix instruction_operand::load_value() for PowerPC relocation classes
2009-12-02 09:20:33 -05:00
Slava Pestov
066d2836ca
Get modify-code-heap working if stack traces are stripped (but then it won't update existing code blocks), and rename code_heap::code_heap_free() to code_heap::free()
2009-12-02 05:27:48 -06:00
Slava Pestov
eb840dcf41
RT_HERE now takes its argument from the literal table rather than the parameter table, reducing image size further
2009-12-02 04:55:48 -06:00
Slava Pestov
68c09f0e93
Split literal table into literal and parameter tables, literal table is discarded after code block initialization
2009-12-02 04:28:15 -06:00
Slava Pestov
147edb1ce9
vm: update callback stub machine code at the end of compaction to prevent it from seeing an inconsistent data stack
2009-12-02 03:31:57 -06:00
Slava Pestov
d49c86ba11
vm: Clean up more code duplication and rename a few methods
2009-12-02 01:17:30 -06:00
Slava Pestov
d664507b36
vm: factor out common code between image loading and initial code block relocation
2009-12-02 00:54:16 -06:00
Slava Pestov
c6602bda27
Big cleanup of literal table and relocation-related code
...
- new way to iterate over instruction_operands cleans up relocation code
- move some methods out of the VM class to clean up code
- if debugging is on, die earlier if attempting to allocate inside GC
- callback heap entries are now code_blocks
- replace block_granularity with data_alignment
2009-12-02 00:48:41 -06:00
Slava Pestov
260cc9e2ff
vm: growing heap no longer uses relocate_code_block()
2009-11-28 19:48:26 -06:00
Slava Pestov
9a79a6253c
vm: fix some typos
2009-11-27 22:54:24 -06:00
Slava Pestov
333c7654ae
Merge branch 'no_literal_table' of git://factorcode.org/git/factor into no_literal_table
2009-11-27 18:33:34 -06:00
Slava Pestov
b683ecaa74
Merge branch 'master' of git://factorcode.org/git/factor into no_literal_table
2009-11-27 18:32:21 -06:00
Slava Pestov
58c21a1a11
vm: new image relocation that doesn't use literal table
2009-11-27 17:05:08 -06:00
Slava Pestov
bd02eef38e
Fix non-tail recursive inline recursive compilation
2009-11-25 19:12:09 -06:00
Slava Pestov
77a877789a
vm: new implementation of modify-code-heap that doesn't use literal tables
2009-11-25 17:20:48 -06:00
Slava Pestov
4ebaf956c3
vm: non-optimizing compiler now compiles word definition quotations with the owner set to the word object
2009-11-24 22:44:04 -06:00
Slava Pestov
73e105bfc4
vm: flush icache after GC
2009-11-24 21:36:35 -06:00
Slava Pestov
b09d6ef586
vm: deallocate old PIC after allocating the new one to avoid having the code heap potentially point to a free block during compaction
2009-11-24 21:20:23 -06:00
Slava Pestov
bfd4cce364
vm: compaction now updates the needs_fixup set
2009-11-24 19:29:59 -06:00
Slava Pestov
001a3f2847
vm: mark sweep now traces code block references; rename embedded_pointer to instruction_operand
2009-11-23 19:17:12 -06:00
Slava Pestov
b28619ce2f
vm: minor GC traces embedded pointers
2009-11-22 13:37:39 -06:00
Slava Pestov
57fe0dea48
Fix conflict
2009-11-22 02:12:44 -06:00
Doug Coleman
6b780f5843
fix openbsd compile
2009-11-30 12:58:39 -06:00
Doug Coleman
bce084ac12
fix windows compile error
2009-11-20 04:21:21 -06:00
Slava Pestov
24c3ddbbde
Clean up startup/shutdown hook code
2009-11-20 00:57:49 -06:00
Doug Coleman
987602235e
remove sleep_micros, add sleeo_nanos to vm
2009-11-19 04:49:29 -06:00
Slava Pestov
2e3207b590
vm: fix compilation with DEBUG=1
2009-11-19 02:08:05 -06:00
Slava Pestov
f47b72d98b
Fix potential assertion failure if GC was invoked while enabling profiling
2009-11-19 01:49:26 -06:00
Doug Coleman
251ebb7f91
vm/Config.openbsd: pass in -fno-inline-functions to work around apparent gcc bug
2009-11-18 19:06:26 -06:00
Doug Coleman
6f7ec206a1
rename millis to system-millis, micros to system-micros, add nano-count
2009-11-18 15:58:48 -06:00
Doug Coleman
0145f0f860
link against librt
2009-11-18 11:09:05 -06:00
Doug Coleman
60d8ef22b8
fix current_nanos on windows
2009-11-18 11:04:46 -06:00
Doug Coleman
b4206f5252
initial commit to nanos branch to replace micros
2009-11-18 04:20:05 -06:00
Slava Pestov
cf35ffb126
vm: fix problem in card marking if first block is free
2009-11-16 00:52:32 -06:00
Doug Coleman
51e21a6aa8
update vm for startup branch
2009-11-15 02:53:02 -06:00
Doug Coleman
cc194416f9
Merge branch 'master' into startup
...
Conflicts:
core/bootstrap/primitives.factor
vm/run.hpp
2009-11-15 02:52:50 -06:00
Slava Pestov
4c268f2600
vm: record compaction events correctly
2009-11-13 09:29:21 -06:00
Slava Pestov
86da8ebed9
Instead of bumping the definition counter every time in the VM, bump it only if stack effects changed or macros were redefined
2009-11-13 03:52:14 -06:00
Slava Pestov
cba12eae37
Invalidate inline caches used by call( and execute( when words are redefined
2009-11-12 16:09:07 -06:00
Slava Pestov
9a475570e4
Revert "Revert "vm: faster allocation in tenured space and code heap. If small free list exhausted, allocate a 1kb block and split it up instead of searching larger free lists""
...
This reverts commit 81a68ebd36
.
2009-11-11 19:33:50 -06:00
Slava Pestov
c2b3d6b894
vm: fix fencepost error in write barrier on large object allocation; fixes benchmark.sort crash
2009-11-11 19:31:18 -06:00
Slava Pestov
5169dddc40
Revert "vm: faster allocation in tenured space and code heap. If small free list exhausted, allocate a 1kb block and split it up instead of searching larger free lists"
...
This reverts commit 9af2fa1957
.
2009-11-11 05:47:22 -06:00
Slava Pestov
2c8f67851e
vm: fix GC safety issue in callers of unbox_array_size(), and change how disable-gc-events works so that it doesn't make a byte array that's too large
2009-11-11 05:21:03 -06:00
Slava Pestov
2afd7ce244
Faster identity-hashcode primitive; fast path now opencoded by the compiler
2009-11-11 02:27:19 -06:00
Slava Pestov
064c00f78d
New identity-hashcode primitive
2009-11-10 21:18:54 -06:00
Slava Pestov
4162ee2127
vm: faster allocation in tenured space and code heap. If small free list exhausted, allocate a 1kb block and split it up instead of searching larger free lists
2009-11-10 20:19:29 -06:00
Slava Pestov
cb6552ae6e
vm/contexts: cleanup
2009-11-08 19:44:18 -06:00
Slava Pestov
8b52d85aed
vm: minor cleanup
2009-11-08 06:08:17 -06:00
Samuel Tardieu
351e795a52
Add parentheses to prevent GCC warning
2009-11-08 02:01:48 +01:00
Slava Pestov
57c541ea46
vm: eliminating literal table work in progress
2009-11-07 16:16:09 -06:00
Slava Pestov
43e08c76fb
vm: on 32-bit, the largest free block size was only 512mb, leading to weird errors if the heap grew beyond this. eliminate this limit
2009-11-06 08:44:36 -06:00
Slava Pestov
11075828e5
vm: faster data_root and <array> primitive
2009-11-06 05:30:37 -06:00
Slava Pestov
eac0f9ffcf
vm: report true size of mark stack
2009-11-06 04:15:55 -06:00
Slava Pestov
c512013220
vm: fix crash if all-instances primitive triggers a GC
2009-11-06 01:41:11 -06:00
Slava Pestov
84e191704e
vm: fix crash in profiler
2009-11-06 01:22:53 -06:00
Slava Pestov
e2107166ff
vm: restructure data_roots so that its a sequence of handle/len pairs rather than just handles, use it in inline_gc() and all_instances() so that we don't run out of heap while building the object array
2009-11-06 00:54:28 -06:00
Slava Pestov
b011295300
vm: fix 'become' when aging space is empty
2009-11-05 23:53:53 -06:00
Slava Pestov
c08d325132
Remove unused error from VM
2009-11-05 21:52:31 -06:00