removed superflous whitspace lines
							parent
							
								
									e3ac531fdb
								
							
						
					
					
						commit
						d25fe552ab
					
				| 
						 | 
					@ -135,8 +135,6 @@ M:: x86.64 %unbox-large-struct ( n c-type -- )
 | 
				
			||||||
    [ ]
 | 
					    [ ]
 | 
				
			||||||
    tri %copy ;
 | 
					    tri %copy ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
M:: x86.64 %box ( n rep func -- )
 | 
					M:: x86.64 %box ( n rep func -- )
 | 
				
			||||||
    n [
 | 
					    n [
 | 
				
			||||||
        n
 | 
					        n
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,6 @@ IN: bootstrap.x86
 | 
				
			||||||
: rex-length ( -- n ) 1 ;
 | 
					: rex-length ( -- n ) 1 ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[
 | 
					[
 | 
				
			||||||
 | 
					 | 
				
			||||||
    ! load stack_chain
 | 
					    ! load stack_chain
 | 
				
			||||||
    temp0 0 MOV rc-absolute-cell rt-stack-chain jit-rel
 | 
					    temp0 0 MOV rc-absolute-cell rt-stack-chain jit-rel
 | 
				
			||||||
    temp0 temp0 [] MOV
 | 
					    temp0 temp0 [] MOV
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,7 +23,6 @@ array *factorvm::allot_array(cell capacity, cell fill_)
 | 
				
			||||||
	return new_array.untagged();
 | 
						return new_array.untagged();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* push a new array on the stack */
 | 
					/* push a new array on the stack */
 | 
				
			||||||
inline void factorvm::primitive_array()
 | 
					inline void factorvm::primitive_array()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -45,7 +44,6 @@ cell factorvm::allot_array_1(cell obj_)
 | 
				
			||||||
	return a.value();
 | 
						return a.value();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
cell factorvm::allot_array_2(cell v1_, cell v2_)
 | 
					cell factorvm::allot_array_2(cell v1_, cell v2_)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	gc_root<object> v1(v1_,this);
 | 
						gc_root<object> v1(v1_,this);
 | 
				
			||||||
| 
						 | 
					@ -56,7 +54,6 @@ cell factorvm::allot_array_2(cell v1_, cell v2_)
 | 
				
			||||||
	return a.value();
 | 
						return a.value();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
cell factorvm::allot_array_4(cell v1_, cell v2_, cell v3_, cell v4_)
 | 
					cell factorvm::allot_array_4(cell v1_, cell v2_, cell v3_, cell v4_)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	gc_root<object> v1(v1_,this);
 | 
						gc_root<object> v1(v1_,this);
 | 
				
			||||||
| 
						 | 
					@ -71,7 +68,6 @@ cell factorvm::allot_array_4(cell v1_, cell v2_, cell v3_, cell v4_)
 | 
				
			||||||
	return a.value();
 | 
						return a.value();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
inline void factorvm::primitive_resize_array()
 | 
					inline void factorvm::primitive_resize_array()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	array* a = untag_check<array>(dpop());
 | 
						array* a = untag_check<array>(dpop());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,25 +8,21 @@ relocation_type factorvm::relocation_type_of(relocation_entry r)
 | 
				
			||||||
	return (relocation_type)((r & 0xf0000000) >> 28);
 | 
						return (relocation_type)((r & 0xf0000000) >> 28);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
relocation_class factorvm::relocation_class_of(relocation_entry r)
 | 
					relocation_class factorvm::relocation_class_of(relocation_entry r)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return (relocation_class)((r & 0x0f000000) >> 24);
 | 
						return (relocation_class)((r & 0x0f000000) >> 24);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
cell factorvm::relocation_offset_of(relocation_entry r)
 | 
					cell factorvm::relocation_offset_of(relocation_entry r)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return  (r & 0x00ffffff);
 | 
						return  (r & 0x00ffffff);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void factorvm::flush_icache_for(code_block *block)
 | 
					void factorvm::flush_icache_for(code_block *block)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	flush_icache((cell)block,block->size);
 | 
						flush_icache((cell)block,block->size);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
int factorvm::number_of_parameters(relocation_type type)
 | 
					int factorvm::number_of_parameters(relocation_type type)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	switch(type)
 | 
						switch(type)
 | 
				
			||||||
| 
						 | 
					@ -52,7 +48,6 @@ int factorvm::number_of_parameters(relocation_type type)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void *factorvm::object_xt(cell obj)
 | 
					void *factorvm::object_xt(cell obj)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	switch(tagged<object>(obj).type())
 | 
						switch(tagged<object>(obj).type())
 | 
				
			||||||
| 
						 | 
					@ -67,7 +62,6 @@ void *factorvm::object_xt(cell obj)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void *factorvm::xt_pic(word *w, cell tagged_quot)
 | 
					void *factorvm::xt_pic(word *w, cell tagged_quot)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if(tagged_quot == F || max_pic_size == 0)
 | 
						if(tagged_quot == F || max_pic_size == 0)
 | 
				
			||||||
| 
						 | 
					@ -82,19 +76,16 @@ void *factorvm::xt_pic(word *w, cell tagged_quot)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void *factorvm::word_xt_pic(word *w)
 | 
					void *factorvm::word_xt_pic(word *w)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return xt_pic(w,w->pic_def);
 | 
						return xt_pic(w,w->pic_def);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void *factorvm::word_xt_pic_tail(word *w)
 | 
					void *factorvm::word_xt_pic_tail(word *w)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return xt_pic(w,w->pic_tail_def);
 | 
						return xt_pic(w,w->pic_tail_def);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* References to undefined symbols are patched up to call this function on
 | 
					/* References to undefined symbols are patched up to call this function on
 | 
				
			||||||
image load */
 | 
					image load */
 | 
				
			||||||
void factorvm::undefined_symbol()
 | 
					void factorvm::undefined_symbol()
 | 
				
			||||||
| 
						 | 
					@ -152,7 +143,6 @@ void *factorvm::get_rel_symbol(array *literals, cell index)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
cell factorvm::compute_relocation(relocation_entry rel, cell index, code_block *compiled)
 | 
					cell factorvm::compute_relocation(relocation_entry rel, cell index, code_block *compiled)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	array *literals = untag<array>(compiled->literals);
 | 
						array *literals = untag<array>(compiled->literals);
 | 
				
			||||||
| 
						 | 
					@ -197,7 +187,6 @@ cell factorvm::compute_relocation(relocation_entry rel, cell index, code_block *
 | 
				
			||||||
#undef ARG
 | 
					#undef ARG
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void factorvm::iterate_relocations(code_block *compiled, relocation_iterator iter)
 | 
					void factorvm::iterate_relocations(code_block *compiled, relocation_iterator iter)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if(compiled->relocation != F)
 | 
						if(compiled->relocation != F)
 | 
				
			||||||
| 
						 | 
					@ -216,7 +205,6 @@ void factorvm::iterate_relocations(code_block *compiled, relocation_iterator ite
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Store a 32-bit value into a PowerPC LIS/ORI sequence */
 | 
					/* Store a 32-bit value into a PowerPC LIS/ORI sequence */
 | 
				
			||||||
void factorvm::store_address_2_2(cell *ptr, cell value)
 | 
					void factorvm::store_address_2_2(cell *ptr, cell value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -224,7 +212,6 @@ void factorvm::store_address_2_2(cell *ptr, cell value)
 | 
				
			||||||
	ptr[ 0] = ((ptr[ 0] & ~0xffff) | (value & 0xffff));
 | 
						ptr[ 0] = ((ptr[ 0] & ~0xffff) | (value & 0xffff));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Store a value into a bitfield of a PowerPC instruction */
 | 
					/* Store a value into a bitfield of a PowerPC instruction */
 | 
				
			||||||
void factorvm::store_address_masked(cell *ptr, fixnum value, cell mask, fixnum shift)
 | 
					void factorvm::store_address_masked(cell *ptr, fixnum value, cell mask, fixnum shift)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -236,7 +223,6 @@ void factorvm::store_address_masked(cell *ptr, fixnum value, cell mask, fixnum s
 | 
				
			||||||
	*ptr = ((*ptr & ~mask) | ((value >> shift) & mask));
 | 
						*ptr = ((*ptr & ~mask) | ((value >> shift) & mask));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Perform a fixup on a code block */
 | 
					/* Perform a fixup on a code block */
 | 
				
			||||||
void factorvm::store_address_in_code_block(cell klass, cell offset, fixnum absolute_value)
 | 
					void factorvm::store_address_in_code_block(cell klass, cell offset, fixnum absolute_value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -283,7 +269,6 @@ void factorvm::store_address_in_code_block(cell klass, cell offset, fixnum absol
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void factorvm::update_literal_references_step(relocation_entry rel, cell index, code_block *compiled)
 | 
					void factorvm::update_literal_references_step(relocation_entry rel, cell index, code_block *compiled)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if(relocation_type_of(rel) == RT_IMMEDIATE)
 | 
						if(relocation_type_of(rel) == RT_IMMEDIATE)
 | 
				
			||||||
| 
						 | 
					@ -310,7 +295,6 @@ void factorvm::update_literal_references(code_block *compiled)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Copy all literals referenced from a code block to newspace. Only for
 | 
					/* Copy all literals referenced from a code block to newspace. Only for
 | 
				
			||||||
aging and nursery collections */
 | 
					aging and nursery collections */
 | 
				
			||||||
void factorvm::copy_literal_references(code_block *compiled)
 | 
					void factorvm::copy_literal_references(code_block *compiled)
 | 
				
			||||||
| 
						 | 
					@ -418,7 +402,6 @@ void factorvm::check_code_address(cell address)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Update references to words. This is done after a new code block
 | 
					/* Update references to words. This is done after a new code block
 | 
				
			||||||
is added to the heap. */
 | 
					is added to the heap. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -434,7 +417,6 @@ void factorvm::mark_code_block(code_block *compiled)
 | 
				
			||||||
	copy_handle(&compiled->relocation);
 | 
						copy_handle(&compiled->relocation);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void factorvm::mark_stack_frame_step(stack_frame *frame)
 | 
					void factorvm::mark_stack_frame_step(stack_frame *frame)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	mark_code_block(frame_code(frame));
 | 
						mark_code_block(frame_code(frame));
 | 
				
			||||||
| 
						 | 
					@ -457,7 +439,6 @@ void factorvm::mark_active_blocks(context *stacks)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void factorvm::mark_object_code_block(object *object)
 | 
					void factorvm::mark_object_code_block(object *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	switch(object->h.hi_tag())
 | 
						switch(object->h.hi_tag())
 | 
				
			||||||
| 
						 | 
					@ -487,7 +468,6 @@ void factorvm::mark_object_code_block(object *object)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Perform all fixups on a code block */
 | 
					/* Perform all fixups on a code block */
 | 
				
			||||||
void factorvm::relocate_code_block(code_block *compiled)
 | 
					void factorvm::relocate_code_block(code_block *compiled)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -520,7 +500,6 @@ void factorvm::fixup_labels(array *labels, code_block *compiled)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Might GC */
 | 
					/* Might GC */
 | 
				
			||||||
code_block *factorvm::allot_code_block(cell size)
 | 
					code_block *factorvm::allot_code_block(cell size)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -549,7 +528,6 @@ code_block *factorvm::allot_code_block(cell size)
 | 
				
			||||||
	return (code_block *)block;
 | 
						return (code_block *)block;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Might GC */
 | 
					/* Might GC */
 | 
				
			||||||
code_block *factorvm::add_code_block(cell type,cell code_,cell labels_,cell relocation_,cell literals_)
 | 
					code_block *factorvm::add_code_block(cell type,cell code_,cell labels_,cell relocation_,cell literals_)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -587,5 +565,4 @@ code_block *factorvm::add_code_block(cell type,cell code_,cell labels_,cell relo
 | 
				
			||||||
	return compiled;
 | 
						return compiled;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue