Erik Charlebois
							
						 
						
							 
							
							
							
								
							
								ffe41b3d7f 
								
							
								 
							
						 
						
							
							
								
								VM: Fixup cast formatting after clang-format  
							
							 
							
							... 
							
							
							
							clang-format doesn't recognize casts to non-pointer/non-template types
so it winds up adding a space between the right paren and the expression
and then failing to recognize prefix operators in the process
(e.g. foo = (cell) & bar; should be foo = (cell)&bar;). This commit
manually fixes up the major cases (fixnum, cell, all types ending in _t). 
							
						 
						
							2013-05-13 14:59:24 -04:00  
						
					 
				
					
						
							
							
								 
								Erik Charlebois
							
						 
						
							 
							
							
							
								
							
								88d7c10d03 
								
							
								 
							
						 
						
							
							
								
								VM: Replace u8-64, s8-64, cell, fixnum with stdint.h equivalents  
							
							 
							
							
							
						 
						
							2013-05-13 00:28:25 -04:00  
						
					 
				
					
						
							
							
								 
								Erik Charlebois
							
						 
						
							 
							
							
							
								
							
								7b1b1eef23 
								
							
								 
							
						 
						
							
							
								
								VM: Remove unnecessary _ suffix in constructors  
							
							 
							
							
							
						 
						
							2013-05-12 23:20:43 -04:00  
						
					 
				
					
						
							
							
								 
								Erik Charlebois
							
						 
						
							 
							
							
							
								
							
								26ff071205 
								
							
								 
							
						 
						
							
							
								
								VM: Remove unnecessary explicit keywords  
							
							 
							
							
							
						 
						
							2013-05-12 21:48:38 -04:00  
						
					 
				
					
						
							
							
								 
								Erik Charlebois
							
						 
						
							 
							
							
							
								
							
								6d5197923c 
								
							
								 
							
						 
						
							
							
								
								VM: Refactor slot_visitor.hpp to Factor style  
							
							 
							
							
							
						 
						
							2013-05-12 13:24:47 -04:00  
						
					 
				
					
						
							
							
								 
								Erik Charlebois
							
						 
						
							 
							
							
							
								
							
								ca2ea548be 
								
							
								 
							
						 
						
							
							
								
								VM: Remove exec bit from VM source files  
							
							 
							
							
							
						 
						
							2013-05-11 17:04:23 -04:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								d74f194b07 
								
							
								 
							
						 
						
							
							
								
								vm: remove _reversed from callstack iterator names  
							
							 
							
							... 
							
							
							
							Now that they're the only game in town we can give them the short names 
							
						 
						
							2011-12-14 09:56:49 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								9236c05e60 
								
							
								 
							
						 
						
							
							
								
								vm: stage code block map fixup properly for GC  
							
							 
							
							... 
							
							
							
							Don't update the map until the very last thing, and pass untranslated addresses to the iterator functors. Somewhat complicated by the fact that, for startup_fixup, the map is initialized with fixed-up values, so the fixup functor needs a flag indicating whether it operates with a fixed or unfixed code heap map. 
							
						 
						
							2011-12-14 09:56:48 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								e6a80aa9aa 
								
							
								 
							
						 
						
							
							
								
								vm: callstack_reversed in code_block_visitor  
							
							 
							
							
							
						 
						
							2011-12-14 09:56:48 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								d12b6e375b 
								
							
								 
							
						 
						
							
							
								
								vm: iterate_callstack_reversed in slot_visitor  
							
							 
							
							
							
						 
						
							2011-12-14 09:56:47 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								e116bc497b 
								
							
								 
							
						 
						
							
							
								
								vm: reversed callstack iteration  
							
							 
							
							
							
						 
						
							2011-12-14 09:56:47 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								e2fafaed9c 
								
							
								 
							
						 
						
							
							
								
								WIP verify_callstack function  
							
							 
							
							... 
							
							
							
							dumps callstack in reverse order so i can visually inspect that it matches the old forward walking logic 
							
						 
						
							2011-12-14 09:56:47 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								0a1a252cdb 
								
							
								 
							
						 
						
							
							
								
								vm: replace assert with FACTOR_ASSERT  
							
							 
							
							... 
							
							
							
							Factor is finally a real C++ project and has a custom assert macro. Assertion failures were still getting caught as exceptions and causing failure loops. Write our own macro that calls factor::abort on failure. 
							
						 
						
							2011-11-23 11:11:26 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								c31530caec 
								
							
								 
							
						 
						
							
							
								
								vm: strip out call-counting profiler  
							
							 
							
							... 
							
							
							
							This makes the separate "code" and "entry_point" fields in word and quotation redundant, so also remove them to reclaim an additional cell per word and quotation object, which should help with #318 . 
							
						 
						
							2011-11-10 16:01:07 -08:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								be8db5aed3 
								
							
								 
							
						 
						
							
							
								
								vm: sample thread object rather than raw context  
							
							 
							
							
							
						 
						
							2011-11-02 13:23:18 -07:00  
						
					 
				
					
						
							
							
								 
								Joe Groff
							
						 
						
							 
							
							
							
								
							
								7da8a9776f 
								
							
								 
							
						 
						
							
							
								
								vm: sample code block owners instead of blocks  
							
							 
							
							
							
						 
						
							2011-11-02 13:23:17 -07:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								813e13140a 
								
							
								 
							
						 
						
							
							
								
								vm: fix 64-bit regression  
							
							 
							
							
							
						 
						
							2010-10-09 15:14:14 -07:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								0fc8ee8250 
								
							
								 
							
						 
						
							
							
								
								Fix win64 compile error  
							
							 
							
							
							
						 
						
							2010-10-09 16:03:46 -05:00  
						
					 
				
					
						
							
							
								 
								Doug Coleman
							
						 
						
							 
							
							
							
								
							
								8a0d0fca83 
								
							
								 
							
						 
						
							
							
								
								Revert previous patch; not simply a typo.  Still broken on win64.  
							
							 
							
							
							
						 
						
							2010-09-29 20:49:37 -05:00  
						
					 
				
					
						
							
							
								 
								Doug Coleman
							
						 
						
							 
							
							
							
								
							
								466e630dc9 
								
							
								 
							
						 
						
							
							
								
								Win64 Windows SDK hates int/cell type errors  
							
							 
							
							
							
						 
						
							2010-09-29 17:43:27 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								6b5fffc026 
								
							
								 
							
						 
						
							
							
								
								compiler: preliminary implementation of tracking derived pointers in GC maps  
							
							 
							
							
							
						 
						
							2010-09-27 20:12:44 -07:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								174463e156 
								
							
								 
							
						 
						
							
							
								
								vm: fix another compile warning on 32-bit Windows  
							
							 
							
							
							
						 
						
							2010-06-17 01:04:03 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								e86f434f26 
								
							
								 
							
						 
						
							
							
								
								Add GC maps to ##box, ##box-long-long, ##alien-invoke, ##alien-indirect and ##call-gc; remove ##gc-map instruction  
							
							 
							
							
							
						 
						
							2010-06-14 19:39:46 -04: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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								58c21a1a11 
								
							
								 
							
						 
						
							
							
								
								vm: new image relocation that doesn't use literal table  
							
							 
							
							
							
						 
						
							2009-11-27 17:05:08 -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
							
						 
						
							 
							
							
							
								
							
								57c541ea46 
								
							
								 
							
						 
						
							
							
								
								vm: eliminating literal table work in progress  
							
							 
							
							
							
						 
						
							2009-11-07 16:16:09 -06:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								11075828e5 
								
							
								 
							
						 
						
							
							
								
								vm: faster data_root and <array> primitive  
							
							 
							
							
							
						 
						
							2009-11-06 05:30:37 -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
							
						 
						
							 
							
							
							
								
							
								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
							
						 
						
							 
							
							
							
								
							
								5ae40e26ee 
								
							
								 
							
						 
						
							
							
								
								vm: remove promotion strategy, clean up compaction code  
							
							 
							
							
							
						 
						
							2009-11-01 03:47:09 -06:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								0c1e266302 
								
							
								 
							
						 
						
							
							
								
								vm: got data heap compaction working  
							
							 
							
							
							
						 
						
							2009-10-24 23:51:14 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								fae27fb361 
								
							
								 
							
						 
						
							
							
								
								vm: make some more ctors explicit just for kicks  
							
							 
							
							
							
						 
						
							2009-10-24 23:02:58 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								03f4b4cdd6 
								
							
								 
							
						 
						
							
							
								
								vm: move binary_payload_start() method from factor_vm to object class  
							
							 
							
							
							
						 
						
							2009-10-24 04:27:45 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								29a27cfde4 
								
							
								 
							
						 
						
							
							
								
								vm: data heap compaction work in progress  
							
							 
							
							
							
						 
						
							2009-10-24 04:18:33 -05:00  
						
					 
				
					
						
							
							
								 
								Slava Pestov
							
						 
						
							 
							
							
							
								
							
								fd1e992e7d 
								
							
								 
							
						 
						
							
							
								
								vm: factor out code that visits object slots and code heap blocks into slot_visitor and code_block_visitor  
							
							 
							
							
							
						 
						
							2009-10-24 03:54:53 -05:00