Slava Pestov
d91524b98d
vm: context switching needs to scrub the return address
2010-06-12 19:54:31 -04:00
Slava Pestov
3a3b50327f
vm: add a new rc-absolute-1 relocation class to allow storing values in 8-bit operands, and optimized code sequences for inline caches using this
2010-04-12 14:22:41 -07:00
Slava Pestov
89f912fe74
Fiddle with register assignments in non-optimizing x86-32 backend
2010-04-10 00:10:05 -07:00
Slava Pestov
b4ee322ea3
Store stack bounds in TIB on win64 to make C++ exceptions work
2010-04-05 19:07:10 -04:00
Slava Pestov
639a1f7043
cpu.x86.assembler: add support for absolute addressing on x86-64; [RIP+] now behaves like [] did, and [] now does absolute addressing just like in 32-bit mode
2010-04-04 19:42:57 -04:00
Slava Pestov
44b3977c2b
cpu.x86.64: fix typo that caused bootstrap crash
2010-04-03 21:11:04 -04:00
Slava Pestov
cdc4fb3b62
Get green threads working on Windows
...
- store stack base and limit in TIB
- set up a frame-based structured exception handler in each context's callstack
- boot.x86.32.image has now been replaced by boot.winnt-x86.32.image and boot.unix-x86.32.image
2010-04-03 20:24:33 -04:00
Slava Pestov
47f86898d7
vm: pre-allocate context alien
2010-04-02 00:02:21 -04:00
Slava Pestov
eb8432061c
cpu.x86.64: eliminate useless instruction from primitive call sequence for a marginal to non-existent gain
2010-03-31 19:32:36 -04:00
Slava Pestov
22c7654e78
cpu.x86: remove useless crap from c-to-factor sub-primitive
2010-03-31 15:19:00 -04:00
Slava Pestov
de0c2801d2
threads: delete old contexts immediately instead of handing them off to a 'context recycler' thread
2010-03-30 21:47:48 -04:00
Slava Pestov
a04d53c3da
set-context and start-context primitives can now pass parameters around
2010-03-27 08:13:57 -04:00
Slava Pestov
f8134b18cd
Implement start-context and set-context primitives
2010-03-27 02:56:11 -04:00
Slava Pestov
adeb6fb68f
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Slava Pestov
bd13a8d42d
cpu.x86.64: inline cache miss blocks have a prolog generated in the middle of a procedure; undo a recent change to non-optimizing backend to fix random crashes
2010-02-06 18:45:27 +13:00
Slava Pestov
af47e5e8d8
Compiled code size optimizations for x86-64 resulting in development image size reduction of about 350kb
...
- RIP-relative LEA is now used to load program counter in prolog and tail calls; saves 3 bytes of code and 4 bytes of relocation information over an immediate MOV
- VM field accesses no longer involve a redundant addition
2010-02-03 23:11:35 +13:00
Slava Pestov
88004434ec
vm: remove primitive table, non-optimizing compiler now looks up primitives with dlsym()
2010-01-19 20:00:33 +13:00
Slava Pestov
0165daf56c
Stop wearing monocle and use the term "entry point" instead of "XT" throughout VM and compiler; also remove two unused relocation types
2010-01-18 20:54:00 +13:00
Slava Pestov
fe11d9f60a
unwind-stack-frames didn't load VM pointer into the VM register on PowerPC and x86-64, and so if C code had clobbered this register it would crash
2010-01-12 16:31:10 +13:00
Slava Pestov
80e64b8379
Store VM object in a register on x86-64
2010-01-11 01:20:32 +13:00
Slava Pestov
5cdf5a72e1
cpu.x86: c-to-factor needs to deal with the fact that vm-reg might have been clobbered
2010-01-09 19:09:48 +13:00
Slava Pestov
85432e99c3
Fix set-callstack primitive on Windows
2010-01-07 19:31:15 +13:00
Slava Pestov
a9f90026df
Update x86-32 for assembly entry point changes
2010-01-06 17:55:20 +13:00
Slava Pestov
d2baa6dde5
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
9399a68786
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
Slava Pestov
d5489b3ecd
Updating x86-64 port for global register variable removal
2009-12-27 01:17:42 +13:00
Slava Pestov
31a260b74c
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
d65296b334
vm: 4 bit tags, new representation of alien objects makes unbox-any-c-ptr more efficient (work in progress)
2009-11-02 04:25:54 -06:00
Doug Coleman
a57e990af7
parsed -> suffix!, add append!
2009-10-28 13:38:27 -05:00
Slava Pestov
030d035e94
vm: code heap compaction at runtime using compact-gc primitive
2009-10-16 11:39:35 -05:00
Slava Pestov
bfd1f0d6d2
vm: rt-vm relocation now supports accessing a field directly
2009-10-14 19:24:23 -05:00
Phil Dawes
c747e39923
x86 bootstrap cleanup: renamed arg to arg1
2009-09-24 08:16:57 +01:00
Phil Dawes
911471c411
removed superflous whitspace lines
2009-09-24 08:02:14 +01:00
Phil Dawes
a73886942a
vm passed in primitives as arg0 for x86.64
2009-09-16 08:22:17 +01:00
Phil Dawes
44d2d8672e
Primitives now pass vm ptr on 64bit x86
2009-09-16 08:20:09 +01:00
Slava Pestov
32a3abc9b4
cpu.x86: update non-optimizing compiler backends for assembler vocab split
2009-07-30 02:22:37 -05:00
Slava Pestov
c1e25f3b43
JIT now supports multiple relocations per code template. This simplifies non-optimizing compiler backends
2009-05-06 20:04:49 -05:00
Slava Pestov
76281235e7
bootstrap.image: clean up jit-define and define-sub-primitive so that
2009-04-25 22:35:19 -05:00
Slava Pestov
6b99b04531
Add vocab: for vocab-relative paths
2009-02-15 19:53:21 -06:00
Slava Pestov
4b927f732f
Clean up JIT backend a little
2008-12-09 17:14:17 -06:00
Slava Pestov
cfa82cb474
New calling convention for VM primitives:
...
instead of the Factor side passing the stack pointer as the first parameter, and having the VM save it to stack_chain->top, we instead have the Factor side save it. Eliminates a lot of crud in the VM
2008-11-13 03:20:34 -06:00
unknown
7365959f01
Starting work on Win64 port
2008-11-07 20:33:32 -06:00
Slava Pestov
44a2499c17
fixnum-shift-fast and fixnum-mod subprimitives
2008-11-03 01:18:35 -06:00
Slava Pestov
c19f2257f4
Fix permission bits
2008-10-02 08:34:49 -05:00
Slava Pestov
d66f887736
Create basis vocab root
2008-07-28 22:03:13 -05:00