moved stack_traces_p into the vm
							parent
							
								
									5bb04857bf
								
							
						
					
					
						commit
						43787e2664
					
				| 
						 | 
					@ -72,9 +72,4 @@ void copy_literal_references(code_block *compiled, factorvm *myvm);
 | 
				
			||||||
void update_word_references(code_block *compiled, factorvm *myvm);
 | 
					void update_word_references(code_block *compiled, factorvm *myvm);
 | 
				
			||||||
void update_literal_and_word_references(code_block *compiled, factorvm *myvm);
 | 
					void update_literal_and_word_references(code_block *compiled, factorvm *myvm);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
inline bool stack_traces_p()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return userenv[STACK_TRACES_ENV] != F;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@ jit::jit(cell type_, cell owner_, factorvm *vm)
 | 
				
			||||||
	  offset(0),
 | 
						  offset(0),
 | 
				
			||||||
	  myvm(vm)
 | 
						  myvm(vm)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if(stack_traces_p()) literal(owner.value());
 | 
						if(myvm->stack_traces_p()) literal(owner.value());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void jit::emit_relocation(cell code_template_)
 | 
					void jit::emit_relocation(cell code_template_)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										10
									
								
								vm/vm.hpp
								
								
								
								
							
							
						
						
									
										10
									
								
								vm/vm.hpp
								
								
								
								
							| 
						 | 
					@ -2,11 +2,15 @@ namespace factor
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct factorvm {
 | 
					struct factorvm {
 | 
				
			||||||
	// if you change this struct, also change vm.factor
 | 
					
 | 
				
			||||||
 | 
						// if you change this struct, also change vm.factor k--------
 | 
				
			||||||
	context *stack_chain; 
 | 
						context *stack_chain; 
 | 
				
			||||||
	zone nursery; /* new objects are allocated here */
 | 
						zone nursery; /* new objects are allocated here */
 | 
				
			||||||
	cell cards_offset;
 | 
						cell cards_offset;
 | 
				
			||||||
	cell decks_offset;
 | 
						cell decks_offset;
 | 
				
			||||||
 | 
						//	cell userenv[USER_ENV];  // prob best to put this last 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// segments
 | 
						// segments
 | 
				
			||||||
	inline cell align_page(cell a);
 | 
						inline cell align_page(cell a);
 | 
				
			||||||
| 
						 | 
					@ -494,6 +498,10 @@ struct factorvm {
 | 
				
			||||||
	void fixup_labels(array *labels, code_block *compiled);
 | 
						void fixup_labels(array *labels, code_block *compiled);
 | 
				
			||||||
	code_block *allot_code_block(cell size);
 | 
						code_block *allot_code_block(cell size);
 | 
				
			||||||
	code_block *add_code_block(cell type,cell code_,cell labels_,cell relocation_,cell literals_);
 | 
						code_block *add_code_block(cell type,cell code_,cell labels_,cell relocation_,cell literals_);
 | 
				
			||||||
 | 
						inline bool stack_traces_p()
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							return userenv[STACK_TRACES_ENV] != F;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//code_heap
 | 
						//code_heap
 | 
				
			||||||
	heap code;
 | 
						heap code;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue