vm: fix 64-bit regression
parent
a84d7af2c5
commit
813e13140a
|
@ -13,7 +13,7 @@ cell gc_info::return_address_index(cell return_address)
|
|||
return i;
|
||||
}
|
||||
|
||||
return gc_info_missing_value;
|
||||
return (cell)-1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
namespace factor
|
||||
{
|
||||
|
||||
const cell gc_info_missing_value = (cell)-1;
|
||||
|
||||
struct gc_info {
|
||||
u32 scrub_d_count;
|
||||
u32 scrub_r_count;
|
||||
|
@ -58,7 +56,7 @@ struct gc_info {
|
|||
+ index * gc_root_count;
|
||||
}
|
||||
|
||||
cell lookup_base_pointer(cell index, cell derived_root)
|
||||
u32 lookup_base_pointer(cell index, cell derived_root)
|
||||
{
|
||||
return base_pointer_map()[index * derived_root_count + derived_root];
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ struct call_frame_slot_visitor {
|
|||
|
||||
assert(return_address < compiled->size());
|
||||
cell callsite = info->return_address_index(return_address);
|
||||
if(callsite == gc_info_missing_value)
|
||||
if(callsite == (cell)-1)
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_GC_MAPS
|
||||
|
@ -305,8 +305,8 @@ struct call_frame_slot_visitor {
|
|||
/* Subtract old value of base pointer from every derived pointer. */
|
||||
for(cell spill_slot = 0; spill_slot < info->derived_root_count; spill_slot++)
|
||||
{
|
||||
cell base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != gc_info_missing_value)
|
||||
u32 base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != (u32)-1)
|
||||
{
|
||||
#ifdef DEBUG_GC_MAPS
|
||||
std::cout << "visiting derived root " << spill_slot
|
||||
|
@ -334,8 +334,8 @@ struct call_frame_slot_visitor {
|
|||
/* Add the base pointers to obtain new derived pointer values. */
|
||||
for(cell spill_slot = 0; spill_slot < info->derived_root_count; spill_slot++)
|
||||
{
|
||||
cell base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != gc_info_missing_value)
|
||||
u32 base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != (u32)-1)
|
||||
stack_pointer[spill_slot] += stack_pointer[base_pointer];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue