Slava Pestov
f27080498d
Remove bignum>float VM primitive, and use bignum/f to implement >float on bignums instead, for a slight accuracy gain. Also, bignum/f now has a more efficient post-scaling algorithm to break the circular dependency on bignum>float
2010-11-24 22:41:15 -08:00
Slava Pestov
6b5fffc026
compiler: preliminary implementation of tracking derived pointers in GC maps
2010-09-27 20:12:44 -07:00
Slava Pestov
a36bd7fbaf
vm: don't keep more than 10 unused contexts around to prevent address space wastage on low-budget operating systems like OpenBSD
2010-09-17 20:52:27 -07:00
Slava Pestov
e8b1a06dad
vm: a stack underflow inside a primitive could leave a data root in an uninitialized state; if allocating the thrown underflow error triggered a GC, the GC would visit a garbage pointer
2010-09-17 19:46:57 -07:00
Slava Pestov
2498a4d881
vm: don't call nano_count() from the GC at all, unless GC event recording is on
2010-09-04 13:21:45 -07:00
Slava Pestov
7b35f82bf4
vm: fix crash when doing GC with profiling enabled
2010-09-03 21:54:40 -05:00
Slava Pestov
d74817cedf
vm: Remove signal_callstack_top nonsense
2010-09-02 22:57:17 -05:00
Slava Pestov
1818bcb780
Fix three problems discovered by running math.floats.env tests in a loop:
...
- Crash if allocating error triggers a GC from a signal/SEH handler
- Crash if GC runs with floating point traps enabled on Windows
- Floating point traps didn't prettyprint properly
2010-09-02 22:57:14 -05:00
Slava Pestov
1985705413
compiler: now that FFI has been deconcatenatized, we no longer need the special ##unary-float-function and ##binary-float-function fastpaths
2010-08-13 23:59:19 -07:00
Slava Pestov
b23aac1beb
compiler.cfg: open-code parameter boxing and unboxing for certain C types
2010-07-19 10:25:13 -04:00
Doug Coleman
e8d528ad93
Remove system_micros from vm, implement gmt hook on windows
2010-06-16 23:39:16 -05:00
Slava Pestov
70b8a74208
vm: have to be extra careful when messing with return addresses
2010-06-13 18:12:57 -04:00
Slava Pestov
3f28c0e7f5
vm: context switching needs to scrub the return address
2010-06-12 19:54:31 -04:00
Slava Pestov
806e54630a
GC maps for more compact inline GC checks
2010-06-11 20:06:00 -04:00
Slava Pestov
5b48cd2a63
FFI rewrite part 5: return value boxing and callback parameter boxing now uses vregs; simplify return value unboxing
2010-05-16 03:43:23 -04:00
Slava Pestov
45689dbfe6
compiler: simplify ##unbox-small/large-struct by emitting an ##unbox-any-c-ptr first
2010-05-10 01:38:34 -04:00
Slava Pestov
95ff5ffe51
New GC checks work in progress
2010-05-03 17:34:16 -04:00
Slava Pestov
a9ccfa8f05
strings: move string-nth primitive out of the VM and into the library
2010-05-03 17:34:12 -04:00
Doug Coleman
366ce2896f
Add callstack-bounds primitive to vm/ for use with javascriptcore library
2010-04-19 20:08:15 -05:00
Slava Pestov
288090d993
math.parser: expose a format-float primitive for use by formatting vocabulary
2010-04-13 21:21:28 -07:00
Slava Pestov
74640b7f71
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
0faa3bcf4a
vm: pre-allocate context alien
2010-04-02 00:02:21 -04:00
Slava Pestov
fb2ecab614
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
c7142e4281
threads: use context-switching primitives
2010-03-29 20:40:17 -04:00
Slava Pestov
43b2e02534
vm: split up TLS code and add a dummy implementation for a dummy OS known as NetBSD
2010-03-29 02:23:21 -04:00
Slava Pestov
9ffe0a69d1
vm: use sigaltstack to handle callstack overflow properly
2010-03-28 11:37:28 -04:00
Slava Pestov
11ddbc03a4
vm: signal handling cleanup
2010-03-27 07:33:28 -04:00
Slava Pestov
1717b8d0f7
Implement start-context and set-context primitives
2010-03-27 02:56:11 -04:00
Slava Pestov
560c119cd2
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Slava Pestov
6aee6b3adc
Add context-specific special object table, generalizing catchstack_save and current_callback_save fields of context struct
2010-03-18 22:06:00 +13:00
Slava Pestov
747974f4ae
vm: nuke unused (string>float) primitive
2010-02-08 08:16:56 +13:00
Doug Coleman
d22eb40360
Fix spaces that crept into vm/ cpp files
2010-02-06 01:06:26 -06:00
Doug Coleman
f72bcd3346
reorder functions in header file
2010-02-04 23:55:17 -06:00
Doug Coleman
06f02d1314
Refactor error handling in io.cpp. Update image.cpp and header files for changes.
2010-02-04 23:53:54 -06:00
Doug Coleman
950eaed73a
Change the MOVE_FILE macro to a function named move_file
2010-02-03 15:12:13 -06:00
Slava Pestov
26cae00eeb
Add code heap introspection primitive to VM, and make a code-blocks word in tools.memory that wraps a useful interface around this. Add a lookup-return-address word and use this in tools.disassembler.utils
2010-02-03 23:11:32 +13:00
Slava Pestov
3259ef4bec
vm: modify-code-heap primitive now takes a pair of parameters, update-existing? and reset-pics?. If no generic words were changed, PICs do not need to be reset. If no existing words were redefined, the code heap doesn't have to be traced at all. Speeds up compilation of PEGs since those create lots of compilation units
2010-02-03 23:11:28 +13:00
Slava Pestov
942f6e0943
Update Win64 support
2010-01-25 15:39:34 +13:00
Doug Coleman
bb2f455747
Save images to a temporary file first, then call MOVE_FILE to avoid writing incomplete and truncated images.
2010-01-22 12:59:20 -06:00
Slava Pestov
00328c85e0
vm: remove vm-ptr primitive
2010-01-20 17:06:49 +13:00
Slava Pestov
5606825e8b
vm: remove primitive table, non-optimizing compiler now looks up primitives with dlsym()
2010-01-19 20:00:33 +13:00
Slava Pestov
637a77c018
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
e4da687413
vm: Tweak Factor VM to compile with Microsoft Visual Studio on Windows, in addition to Mingw. Add an Nmakefile which can be used for this purpose. Rename Makefile to GNUmakefile.
2010-01-17 03:43:22 +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
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
Slava Pestov
15eb8d1a0a
vm: remove VM_ASM_API
2009-12-24 01:37:24 +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