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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								58c21a1a11 
								
							
								 
							
						 
						
							
							
								
								vm: new image relocation that doesn't use literal table  
							
							 
							
							
							
						 
						
							2009-11-27 17:05:08 -06:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								24c3ddbbde 
								
							
								 
							
						 
						
							
							
								
								Clean up startup/shutdown hook code  
							
							 
							
							
							
						 
						
							2009-11-20 00:57:49 -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
							
						 
						
							 
							
							
							
								
							
								064c00f78d 
								
							
								 
							
						 
						
							
							
								
								New identity-hashcode primitive  
							
							 
							
							
							
						 
						
							2009-11-10 21:18:54 -06:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								4061951d1c 
								
							
								 
							
						 
						
							
							
								
								vm: simpler object space implementation. begin-scan/next-object/end-scan primitives replaced by a single all-instances primitive  
							
							 
							
							
							
						 
						
							2009-11-05 21:49:03 -06:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								6c2c87758a 
								
							
								 
							
						 
						
							
							
								
								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
							
						 
						
							 
							
							
							
								
							
								e4ad642134 
								
							
								 
							
						 
						
							
							
								
								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
							
						 
						
							 
							
							
							
								
							
								5ae40e26ee 
								
							
								 
							
						 
						
							
							
								
								vm: remove promotion strategy, clean up compaction code  
							
							 
							
							
							
						 
						
							2009-11-01 03:47:09 -06:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								5536003cf8 
								
							
								 
							
						 
						
							
							
								
								vm: new GC policy: mark sweep after N megabytes promoted, mark compact if tenured space cannot fit nursery+aging in one contiguous block. N = 32 on 32-bit and 64 on 64-bit  
							
							 
							
							
							
						 
						
							2009-10-30 02:26:57 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								e793a72060 
								
							
								 
							
						 
						
							
							
								
								vm: remove crummy old GC stats, split off free list code, clean up various other things  
							
							 
							
							
							
						 
						
							2009-10-26 22:08:35 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								c30df42e48 
								
							
								 
							
						 
						
							
							
								
								vm: make compaction its own gc_op  
							
							 
							
							
							
						 
						
							2009-10-25 14:02:14 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								7d8c85443e 
								
							
								 
							
						 
						
							
							
								
								vm: vm: fix large object allocation logic and change default heap image size for 2009  
							
							 
							
							
							
						 
						
							2009-10-25 13:27:40 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								fae27fb361 
								
							
								 
							
						 
						
							
							
								
								vm: make some more ctors explicit just for kicks  
							
							 
							
							
							
						 
						
							2009-10-24 23:02:58 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								810e309e0c 
								
							
								 
							
						 
						
							
							
								
								vm: rename userenv to special_objects  
							
							 
							
							
							
						 
						
							2009-10-23 00:33:53 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								606a805d7d 
								
							
								 
							
						 
						
							
							
								
								vm: debugging mark and sweep  
							
							 
							
							
							
						 
						
							2009-10-21 23:24:35 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								40351d40be 
								
							
								 
							
						 
						
							
							
								
								vm: use iostreams instead of printf for debug messages, clean up a few things  
							
							 
							
							
							
						 
						
							2009-10-21 20:12:57 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								814f6371d6 
								
							
								 
							
						 
						
							
							
								
								vm: mark sweep gc for tenured space work in progress  
							
							 
							
							
							
						 
						
							2009-10-20 22:20:49 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								f0816d72f1 
								
							
								 
							
						 
						
							
							
								
								vm: split off free_list_allocator from heap class, rename zone to bump_allocator  
							
							 
							
							
							
						 
						
							2009-10-20 15:26:11 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								a9dbbd1efb 
								
							
								 
							
						 
						
							
							
								
								vm: simplify code heap by eliminating HeapLayout template parameter  
							
							 
							
							
							
						 
						
							2009-10-20 14:01:46 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								e482940dca 
								
							
								 
							
						 
						
							
							
								
								vm: object start recording in cards is now independent of allocation strategy  
							
							 
							
							
							
						 
						
							2009-10-20 13:47:04 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								d22d5466fc 
								
							
								 
							
						 
						
							
							
								
								vm: move factor_vm::untagged_object_size() to object::size()  
							
							 
							
							
							
						 
						
							2009-10-20 13:13:39 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								4ddd63d83e 
								
							
								 
							
						 
						
							
							
								
								vm: move compaction algorithm to mark_bits.hpp since it doesn't rely on properties of heaps per se  
							
							 
							
							
							
						 
						
							2009-10-19 03:05:20 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								a81f757a62 
								
							
								 
							
						 
						
							
							
								
								vm: fix conflict in image.cpp  
							
							 
							
							
							
						 
						
							2009-10-18 20:54:13 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								2e65366c6b 
								
							
								 
							
						 
						
							
							
								
								vm: rename myvm and parent_vm instance variables to parent, clean up casts in primitive definitions  
							
							 
							
							
							
						 
						
							2009-10-18 20:31:59 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								236588208b 
								
							
								 
							
						 
						
							
							
								
								vm: rename F to false_object, and rename T to true_object  
							
							 
							
							
							
						 
						
							2009-10-18 20:26:21 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								69f9c80b5b 
								
							
								 
							
						 
						
							
							
								
								vm: code heap: move mark bits to a separate bitmap  
							
							 
							
							
							
						 
						
							2009-10-16 14:41:40 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								107c96f642 
								
							
								 
							
						 
						
							
							
								
								vm: code heap compaction at runtime using compact-gc primitive  
							
							 
							
							
							
						 
						
							2009-10-16 11:39:35 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								85b746e7b5 
								
							
								 
							
						 
						
							
							
								
								vm: simpler and more efficient code heap compaction; restructure a few things to get ready for runtime code heap compaction  
							
							 
							
							
							
						 
						
							2009-10-16 04:33:35 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								ab9b462411 
								
							
								 
							
						 
						
							
							
								
								vm: build fix  
							
							 
							
							
							
						 
						
							2009-10-09 05:12:28 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								95722adebc 
								
							
								 
							
						 
						
							
							
								
								vm: misc cleanups  
							
							 
							
							
							
						 
						
							2009-10-09 03:20:50 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								23e133e383 
								
							
								 
							
						 
						
							
							
								
								vm: make a new old_space type to encapsulate a few things, split up generations array somewhat  
							
							 
							
							
							
						 
						
							2009-10-07 14:05:09 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								651a7fb6fa 
								
							
								 
							
						 
						
							
							
								
								vm: replace generations array with individual instance variables referencing zone objects  
							
							 
							
							
							
						 
						
							2009-10-07 11:59:59 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								5c774d8c84 
								
							
								 
							
						 
						
							
							
								
								vm: more code cleanups  
							
							 
							
							
							
						 
						
							2009-10-07 08:33:54 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								697e2342d0 
								
							
								 
							
						 
						
							
							
								
								vm: put code block owner directly in the header, instead of as the first entry in the literal table. Reduces x86-64 image size by ~700kb, also eliminates separate 'strip' set of staging images from deploy tool  
							
							 
							
							
							
						 
						
							2009-10-06 06:25:07 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								b50d3f3fb0 
								
							
								 
							
						 
						
							
							
								
								vm: number of generations is not configurable anymore, split up begin_gc() and end_gc() into collect_{nursery,aging,aging_again,tenured}()  
							
							 
							
							
							
						 
						
							2009-10-06 02:39:12 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								c4ef640f4d 
								
							
								 
							
						 
						
							
							
								
								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
							
						 
						
							 
							
							
							
								
							
								b6718641dc 
								
							
								 
							
						 
						
							
							
								
								Converted some callback fns to use member-fn pointers  
							
							 
							
							
							
						 
						
							2009-09-28 19:45:10 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								9b7412b8f8 
								
							
								 
							
						 
						
							
							
								
								Moved PRIMITIVE and PRIMITIVE_FORWARDs to primitives.[ch]pp  
							
							 
							
							
							
						 
						
							2009-09-27 19:42:18 +01:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								c046ff4b23 
								
							
								 
							
						 
						
							
							
								
								vm: make heap data-type object-oriented  
							
							 
							
							
							
						 
						
							2009-09-25 20:32:00 -05:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								6b7717bf37 
								
							
								 
							
						 
						
							
							
								
								forwarding functions replaced with PRIMITIVE_FORWARD() macro  
							
							 
							
							
							
						 
						
							2009-09-25 20:43:01 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								83b0769eef 
								
							
								 
							
						 
						
							
							
								
								renamed factorvm to factor_vm  
							
							 
							
							
							
						 
						
							2009-09-24 08:16:52 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								e566656e46 
								
							
								 
							
						 
						
							
							
								
								removed a bunch of superflous blank lines  
							
							 
							
							
							
						 
						
							2009-09-24 08:02:14 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								46bab62689 
								
							
								 
							
						 
						
							
							
								
								misc cleanup  
							
							 
							
							
							
						 
						
							2009-09-24 08:02:14 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								e3ac531fdb 
								
							
								 
							
						 
						
							
							
								
								renamed vmprim_ to primitive_  
							
							 
							
							
							
						 
						
							2009-09-24 08:02:13 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								1887a16ca3 
								
							
								 
							
						 
						
							
							
								
								removed some global functions from image.cpp  
							
							 
							
							
							
						 
						
							2009-09-16 08:16:28 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								82e1ea7110 
								
							
								 
							
						 
						
							
							
								
								vm ptr passed to untag_check  
							
							 
							
							
							
						 
						
							2009-09-16 08:16:26 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								d5da6a3d58 
								
							
								 
							
						 
						
							
							
								
								Dev checkpoint  
							
							 
							
							
							
						 
						
							2009-09-16 08:16:25 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								8fa607e9a9 
								
							
								 
							
						 
						
							
							
								
								Dev checkpoint  
							
							 
							
							
							
						 
						
							2009-09-16 08:16:25 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								839491a828 
								
							
								 
							
						 
						
							
							
								
								moved global state from inline_cache into vm  
							
							 
							
							
							
						 
						
							2009-09-16 08:16:24 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								80716a1b6e 
								
							
								 
							
						 
						
							
							
								
								moved global state from contexts and run into vm  
							
							 
							
							... 
							
							
							
							Also renamed template type from T to TYPE to prevent clash with vm::T (true) 
							
						 
						
							2009-09-16 08:16:24 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								a2f14b5a6d 
								
							
								 
							
						 
						
							
							
								
								added vm member to gc_root and growable arrays  
							
							 
							
							
							
						 
						
							2009-09-16 08:16:22 +01:00  
						
					 
				
					
						
							
							
								 
								Phil Dawes
							
						 
						
							 
							
							
							
								
							
								1bba717b36 
								
							
								 
							
						 
						
							
							
								
								moved image functions to vm  
							
							 
							
							
							
						 
						
							2009-09-16 08:16:20 +01:00  
						
					 
				
					
						
							
							
								 
								Philipp Brüschweiler
							
						 
						
							 
							
							
							
								
							
								230061783a 
								
							
								 
							
						 
						
							
							
								
								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
							
						 
						
							 
							
							
							
								
							
								46688f960d 
								
							
								 
							
						 
						
							
							
								
								image.cpp: don't try to make code heap bigger than p->code_size since on PPC this will cause crashes if the image has a code heap of exactly 32Mb  
							
							 
							
							
							
						 
						
							2009-07-31 23:23:29 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								6e08e29a3a 
								
							
								 
							
						 
						
							
							
								
								Remove compiled slot from quotations since its not needed  
							
							 
							
							
							
						 
						
							2009-05-12 03:09:15 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								3bf8134476 
								
							
								 
							
						 
						
							
							
								
								VM cleanup: replace some #defines with constants and inline functions  
							
							 
							
							
							
						 
						
							2009-05-08 15:05:55 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								12de56c41e 
								
							
								 
							
						 
						
							
							
								
								Fix botched replace all in VM source, clean up image saving code, and fix save-image-and-exit to actually call (save-image-and-exit) instead of (save-image)  
							
							 
							
							
							
						 
						
							2009-05-05 10:29:22 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								8872c40b1e 
								
							
								 
							
						 
						
							
							
								
								The great type renaming  
							
							 
							
							
							
						 
						
							2009-05-04 04:50:24 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								edecac508e 
								
							
								 
							
						 
						
							
							
								
								Use C++ namespaces  
							
							 
							
							
							
						 
						
							2009-05-04 01:46:13 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								8e17e0a01e 
								
							
								 
							
						 
						
							
							
								
								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
							
						 
						
							 
							
							
							
								
							
								b923d548cf 
								
							
								 
							
						 
						
							
							
								
								Move vmpp to vm  
							
							 
							
							
							
						 
						
							2009-05-02 20:37:18 -05:00