VM: the small return_address_index function can be implemented in the header
parent
faaa898975
commit
bc8525eb02
|
@ -46,7 +46,6 @@ ifdef CONFIG
|
|||
vm/free_list.o \
|
||||
vm/full_collector.o \
|
||||
vm/gc.o \
|
||||
vm/gc_info.o \
|
||||
vm/image.o \
|
||||
vm/inline_cache.o \
|
||||
vm/instruction_operands.o \
|
||||
|
|
|
@ -70,7 +70,6 @@ DLL_OBJS = $(PLAF_DLL_OBJS) \
|
|||
vm\free_list.obj \
|
||||
vm\full_collector.obj \
|
||||
vm\gc.obj \
|
||||
vm/gc_info.obj \
|
||||
vm\image.obj \
|
||||
vm\inline_cache.obj \
|
||||
vm\instruction_operands.obj \
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#include "master.hpp"
|
||||
|
||||
namespace factor {
|
||||
|
||||
cell gc_info::return_address_index(cell return_address) {
|
||||
uint32_t* return_address_array = return_addresses();
|
||||
|
||||
for (cell i = 0; i < return_address_count; i++) {
|
||||
if (return_address == return_address_array[i])
|
||||
return i;
|
||||
}
|
||||
|
||||
return (cell)-1;
|
||||
}
|
||||
|
||||
}
|
|
@ -53,7 +53,16 @@ struct gc_info {
|
|||
return base_pointer_map()[index * derived_root_count + derived_root];
|
||||
}
|
||||
|
||||
cell return_address_index(cell return_address);
|
||||
cell return_address_index(cell return_address) {
|
||||
uint32_t* return_address_array = return_addresses();
|
||||
|
||||
for (cell i = 0; i < return_address_count; i++) {
|
||||
if (return_address == return_address_array[i])
|
||||
return i;
|
||||
}
|
||||
|
||||
return (cell)-1;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue