| 
									
										
										
										
											2009-05-04 02:46:13 -04:00
										 |  |  | namespace factor | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-02 10:19:09 -04:00
										 |  |  | struct quotation_jit : public jit { | 
					
						
							| 
									
										
										
										
											2009-11-02 19:10:34 -05:00
										 |  |  | 	data_root<array> elements; | 
					
						
							| 
									
										
										
										
											2009-05-02 10:19:09 -04:00
										 |  |  | 	bool compiling, relocate; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-24 23:38:15 -05:00
										 |  |  | 	explicit quotation_jit(cell owner, bool compiling_, bool relocate_, factor_vm *vm) | 
					
						
							|  |  |  | 		: jit(code_block_unoptimized,owner,vm), | 
					
						
							|  |  |  | 		  elements(false_object,vm), | 
					
						
							| 
									
										
										
										
											2009-05-02 10:19:09 -04:00
										 |  |  | 		  compiling(compiling_), | 
					
						
							| 
									
										
										
										
											2009-08-17 16:37:09 -04:00
										 |  |  | 		  relocate(relocate_){}; | 
					
						
							| 
									
										
										
										
											2009-05-02 10:19:09 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-24 23:38:15 -05:00
										 |  |  | 	void init_quotation(cell quot); | 
					
						
							| 
									
										
										
										
											2009-05-04 05:50:24 -04:00
										 |  |  | 	void emit_mega_cache_lookup(cell methods, fixnum index, cell cache); | 
					
						
							| 
									
										
										
										
											2009-09-25 19:08:21 -04:00
										 |  |  | 	bool primitive_call_p(cell i, cell length); | 
					
						
							| 
									
										
										
										
											2009-10-06 02:31:39 -04:00
										 |  |  | 	bool trivial_quotation_p(array *elements); | 
					
						
							|  |  |  | 	void emit_quot(cell quot); | 
					
						
							| 
									
										
										
										
											2011-11-16 15:39:25 -05:00
										 |  |  | 	void emit_prolog(bool safepoint, bool stack_frame); | 
					
						
							|  |  |  | 	void emit_epilog(bool safepoint, bool stack_frame); | 
					
						
							| 
									
										
										
										
											2009-09-25 19:08:21 -04:00
										 |  |  | 	bool fast_if_p(cell i, cell length); | 
					
						
							|  |  |  | 	bool fast_dip_p(cell i, cell length); | 
					
						
							|  |  |  | 	bool fast_2dip_p(cell i, cell length); | 
					
						
							|  |  |  | 	bool fast_3dip_p(cell i, cell length); | 
					
						
							|  |  |  | 	bool mega_lookup_p(cell i, cell length); | 
					
						
							|  |  |  | 	bool declare_p(cell i, cell length); | 
					
						
							| 
									
										
										
										
											2011-11-16 15:39:25 -05:00
										 |  |  | 	bool special_subprimitive_p(cell obj); | 
					
						
							| 
									
										
										
										
											2009-12-15 07:20:09 -05:00
										 |  |  | 	bool word_stack_frame_p(cell obj); | 
					
						
							| 
									
										
										
										
											2011-12-13 20:04:35 -05:00
										 |  |  | 	cell word_stack_frame_size(cell obj); | 
					
						
							| 
									
										
										
										
											2011-11-16 15:39:25 -05:00
										 |  |  | 	bool word_safepoint_p(cell obj); | 
					
						
							| 
									
										
										
										
											2009-05-02 10:19:09 -04:00
										 |  |  | 	bool stack_frame_p(); | 
					
						
							| 
									
										
										
										
											2011-11-16 15:39:25 -05:00
										 |  |  | 	bool safepoint_p(); | 
					
						
							| 
									
										
										
										
											2009-05-02 10:19:09 -04:00
										 |  |  | 	void iterate_quotation(); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-23 07:37:24 -05:00
										 |  |  | VM_C_API cell lazy_jit_compile(cell quot, factor_vm *parent); | 
					
						
							| 
									
										
										
										
											2009-05-04 02:46:13 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |