VM: the small return_address_index function can be implemented in the header

char-rename
Björn Lindqvist 2016-09-10 03:17:00 +02:00
parent faaa898975
commit bc8525eb02
4 changed files with 10 additions and 19 deletions

View File

@ -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 \

View File

@ -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 \

View File

@ -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;
}
}

View File

@ -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;
}
};
}