added vm member to jit classes
parent
386dafe747
commit
54b3c1ea88
|
@ -103,7 +103,7 @@ void update_pic_count(cell type)
|
|||
struct inline_cache_jit : public jit {
|
||||
fixnum index;
|
||||
|
||||
inline_cache_jit(cell generic_word_) : jit(PIC_TYPE,generic_word_) {};
|
||||
inline_cache_jit(cell generic_word_,factorvm *vm) : jit(PIC_TYPE,generic_word_,vm) {};
|
||||
|
||||
void emit_check(cell klass);
|
||||
void compile_inline_cache(fixnum index,
|
||||
|
@ -173,7 +173,7 @@ code_block *factorvm::compile_inline_cache(fixnum index,cell generic_word_,cell
|
|||
gc_root<array> methods(methods_);
|
||||
gc_root<array> cache_entries(cache_entries_);
|
||||
|
||||
inline_cache_jit jit(generic_word.value());
|
||||
inline_cache_jit jit(generic_word.value(),this);
|
||||
jit.compile_inline_cache(index,
|
||||
generic_word.value(),
|
||||
methods.value(),
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace factor
|
|||
- polymorphic inline caches (inline_cache.cpp) */
|
||||
|
||||
/* Allocates memory */
|
||||
jit::jit(cell type_, cell owner_)
|
||||
jit::jit(cell type_, cell owner_, factorvm *vm)
|
||||
: type(type_),
|
||||
owner(owner_),
|
||||
code(),
|
||||
|
@ -18,7 +18,8 @@ jit::jit(cell type_, cell owner_)
|
|||
literals(),
|
||||
computing_offset_p(false),
|
||||
position(0),
|
||||
offset(0)
|
||||
offset(0),
|
||||
myvm(vm)
|
||||
{
|
||||
if(stack_traces_p()) literal(owner.value());
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ struct jit {
|
|||
bool computing_offset_p;
|
||||
fixnum position;
|
||||
cell offset;
|
||||
//factorvm *vm;
|
||||
factorvm *myvm;
|
||||
|
||||
jit(cell jit_type, cell owner);
|
||||
jit(cell jit_type, cell owner, factorvm *vm);
|
||||
void compute_position(cell offset);
|
||||
|
||||
void emit_relocation(cell code_template);
|
||||
|
|
|
@ -20,7 +20,7 @@ code_block *factorvm::compile_profiling_stub(cell word_)
|
|||
{
|
||||
gc_root<word> word(word_);
|
||||
|
||||
jit jit(WORD_TYPE,word.value());
|
||||
jit jit(WORD_TYPE,word.value(),this);
|
||||
jit.emit_with(userenv[JIT_PROFILING],word.value());
|
||||
|
||||
return jit.to_code_block();
|
||||
|
|
|
@ -285,7 +285,7 @@ void factorvm::jit_compile(cell quot_, bool relocating)
|
|||
gc_root<quotation> quot(quot_);
|
||||
if(quot->code) return;
|
||||
|
||||
quotation_jit compiler(quot.value(),true,relocating);
|
||||
quotation_jit compiler(quot.value(),true,relocating,this);
|
||||
compiler.iterate_quotation();
|
||||
|
||||
code_block *compiled = compiler.to_code_block();
|
||||
|
@ -368,7 +368,7 @@ fixnum factorvm::quot_code_offset_to_scan(cell quot_, cell offset)
|
|||
gc_root<quotation> quot(quot_);
|
||||
gc_root<array> array(quot->array);
|
||||
|
||||
quotation_jit compiler(quot.value(),false,false);
|
||||
quotation_jit compiler(quot.value(),false,false,this);
|
||||
compiler.compute_position(offset);
|
||||
compiler.iterate_quotation();
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ struct quotation_jit : public jit {
|
|||
gc_root<array> elements;
|
||||
bool compiling, relocate;
|
||||
|
||||
quotation_jit(cell quot, bool compiling_, bool relocate_)
|
||||
: jit(QUOTATION_TYPE,quot),
|
||||
quotation_jit(cell quot, bool compiling_, bool relocate_, factorvm *vm)
|
||||
: jit(QUOTATION_TYPE,quot,vm),
|
||||
elements(owner.as<quotation>().untagged()->array),
|
||||
compiling(compiling_),
|
||||
relocate(relocate_) {};
|
||||
|
|
Loading…
Reference in New Issue