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
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
a942e2c34d
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
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
5180f80180
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
912b1265fc
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
8a25e8365a
vm: Clean up more code duplication and rename a few methods
2009-12-02 01:17:30 -06:00
Slava Pestov
49727354d1
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
40a82aba19
tools.time: overhaul
2009-11-05 01:07:59 -06:00
Slava Pestov
363bdf8425
vm: minor fixes after code review
2009-11-03 04:56:58 -06:00
Slava Pestov
b341527428
vm: rename gc_root to data_root, add code_root to fix a problem where code blocks would move underneath the PIC compiler if PIC compiler allocated enough
2009-11-02 18:10:34 -06: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
Slava Pestov
6c561b5c4c
vm: rename userenv to special_objects
2009-10-23 00:33:53 -05:00
Slava Pestov
6ee56ca93a
vm: use iostreams instead of printf for debug messages, clean up a few things
2009-10-21 20:12:57 -05:00
Slava Pestov
f9fc3487c6
vm: change code heap layout somewhat, remove unused allocation bitmap from mark_bits
2009-10-20 09:37:24 -05:00
Slava Pestov
89612b7f31
vm: rename myvm and parent_vm instance variables to parent, clean up casts in primitive definitions
2009-10-18 20:31:59 -05:00
Phil Dawes
0b2db4018a
Removed VM_PTR macros. All builds reentrant by default
2009-10-14 19:14:57 +01:00
Slava Pestov
fa2ee8ee7a
vm: free up a cell in compiled code block headers
2009-10-06 05:52:45 -05:00
Slava Pestov
d066d46c8d
vm: add a remembered set for code blocks which may reference young literals. Improves loading time
2009-10-06 04:36:34 -05:00
Slava Pestov
9ccec33321
vm: more GC refactoring
2009-10-06 00:13:54 -05:00
Slava Pestov
3887292543
Big VM cleanup
...
- Move forward declarations of 'struct factor_vm' to one place
- Rename template parameters from T and TYPE to descriptive names. New convention: CamelCase for template parameters
- Change some higher-order functions taking function pointers into templates, and define classes overriding operator(). There's a bit of new boilerplate here but its more consistent than the old mish-mash approaches
- Put GC state into a gc_state struct
- Use exceptions instead of longjmp for non-local control transfer in GC
- In code GC, instead of interleaving code block tracing with copying, add code blocks which need to be revisited to an std::set stored in the gc_state
2009-10-03 08:47:05 -05:00
Phil Dawes
63266524d7
Moved PRIMITIVE and PRIMITIVE_FORWARDs to primitives.[ch]pp
2009-09-27 19:42:18 +01:00
Slava Pestov
5195fdaeaa
vm: make heap data-type object-oriented
2009-09-25 20:32:00 -05:00
Phil Dawes
c495640cc5
forwarding functions replaced with PRIMITIVE_FORWARD() macro
2009-09-25 20:43:01 +01:00
Phil Dawes
4adcdccd16
renamed myvm member variable to parent_vm
2009-09-24 08:16:57 +01:00
Phil Dawes
1c5329cc2e
renamed factorvm to factor_vm
2009-09-24 08:16:52 +01:00
Phil Dawes
2cfb1b6f02
removed a bunch of superflous blank lines
2009-09-24 08:02:14 +01:00
Phil Dawes
3da9b64c73
renamed vmprim_ to primitive_
2009-09-24 08:02:13 +01:00
Phil Dawes
dd1cf25093
Added vm passing to inline_cache_miss x86.32 asm
2009-09-16 08:22:17 +01:00
Phil Dawes
48d385e5d9
moved userenv into vm in C code (DOESNT BOOTSTRAP YET!!!)
2009-09-16 08:16:32 +01:00
Phil Dawes
23a5207e90
removed some global functions from inline_cache.cpp
2009-09-16 08:16:28 +01:00
Phil Dawes
4188b0fde3
moved global state from inline_cache into vm
2009-09-16 08:16:24 +01:00
Phil Dawes
ebbf2151fe
added vm member to gc_root and growable arrays
2009-09-16 08:16:22 +01:00
Phil Dawes
9282824ccb
added vm member to jit classes
2009-09-16 08:16:21 +01:00
Phil Dawes
502f97dc69
moved inline_cache functions to vm
2009-09-16 08:16:21 +01:00
Philipp Brüschweiler
18240b0219
misc small documentation fixes, some fixes for factor.vim, changed permissions of vm/* to 644
2009-08-10 21:33:07 +02:00
Slava Pestov
4f0a1b024e
Clean up bootstrap.image, and implement new calling convention for tail calls; tail call sites now have PICs
2009-05-06 22:04:01 -05:00
Slava Pestov
d3b85c14c9
Working on inline caching for tail call sites
2009-05-06 19:22:22 -05:00
Slava Pestov
5e90662337
Working on PowerPC backend
2009-05-06 15:39:03 -05:00
Slava Pestov
7dfa61c098
VM now compiles with GCC 3.4 on Windows
2009-05-05 14:17:02 -05:00
Slava Pestov
bec40fd54b
Store forwarding table off to the side instead of in the code block; saves one cell per code block
2009-05-05 11:07:20 -05:00
Slava Pestov
7e75312b60
Fixing some build issues on Linux with GCC 4.3
2009-05-04 08:00:06 -04:00
Slava Pestov
7c0a59f7a9
The great type renaming
2009-05-04 04:50:24 -05:00
Slava Pestov
7f48eb2b2c
Use C++ namespaces
2009-05-04 01:46:13 -05:00
Slava Pestov
1857f90eb6
VM: use better abstractions for tagged pointers, eliminate get()/set() stuff, clean up array, string, and byte-array element access
2009-05-04 01:00:30 -05:00
Slava Pestov
dfaa338af7
Clean up untag_* and tag_* inline functions in favor of more idiomatic C++
2009-05-02 20:47:29 -05:00
Slava Pestov
938d1a4270
Move vmpp to vm
2009-05-02 20:37:18 -05:00