]> gitweb.factorcode.org Git - factor.git/commitdiff
cleaning up stray vm singleton usage
authorPhil Dawes <phil@phildawes.net>
Mon, 24 Aug 2009 18:15:39 +0000 (19:15 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:17:27 +0000 (08:17 +0100)
vm/code_block.cpp
vm/inlineimpls.hpp

index 9eec4a2ea61b91c0e0fad26ddf127f813e3e75e4..c2dfe1cac3111e01ed3208f44665a0a424458dd8 100755 (executable)
@@ -345,8 +345,8 @@ void copy_literal_references(code_block *compiled, factorvm *myvm)
 void factorvm::relocate_code_block_step(relocation_entry rel, cell index, code_block *compiled)
 {
 #ifdef FACTOR_DEBUG
-       tagged<array>(compiled->literals).untag_check(vm);
-       tagged<byte_array>(compiled->relocation).untag_check(vm);
+       tagged<array>(compiled->literals).untag_check(this);
+       tagged<byte_array>(compiled->relocation).untag_check(this);
 #endif
 
        store_address_in_code_block(relocation_class_of(rel),
index 6b74634715e92db7e5e00c003e1f91b0d05b3eb6..a247afa4d703a1bec1a16372c47c4cd6019d1626 100644 (file)
@@ -176,7 +176,6 @@ struct gc_root : public tagged<TYPE>
 
        void push() { myvm->check_tagged_pointer(tagged<TYPE>::value()); myvm->gc_locals.push_back((cell)this); }
        
-       //explicit gc_root(cell value_, factorvm *vm) : myvm(vm),tagged<TYPE>(value_) { push(); }
        explicit gc_root(cell value_,factorvm *vm) : tagged<TYPE>(value_),myvm(vm) { push(); }
        explicit gc_root(TYPE *value_, factorvm *vm) : tagged<TYPE>(value_),myvm(vm) { push(); }
 
@@ -344,7 +343,7 @@ inline double factorvm::fixnum_to_float(cell tagged)
 keep the callstack in a GC root and use relative offsets */
 template<typename TYPE> void factorvm::iterate_callstack_object(callstack *stack_, TYPE &iterator)
 {
-       gc_root<callstack> stack(stack_,vm);
+       gc_root<callstack> stack(stack_,this);
        fixnum frame_offset = untag_fixnum(stack->length) - sizeof(stack_frame);
 
        while(frame_offset >= 0)