Example #1
0
 void VariableScope::set_local_internal(STATE, int pos, Object* val) {
    if(isolated()) {
      heap_locals()->put(state, pos, val);
    } else {
      set_local(pos, val);
    }
  }
Example #2
0
 Object* VariableScope::get_local_internal(STATE, int pos) {
    if(isolated()) {
      return heap_locals()->at(pos);
    } else {
      return get_local(pos);
    }
  }
Example #3
0
 void VariableScope::flush_to_heap_internal(STATE) {
   if(isolated_) return;
    Tuple* new_locals = Tuple::create_dirty(state, number_of_locals_);
    for(int i = 0; i < number_of_locals_; i++) {
      new_locals->put(state, i, locals_[i]);
    }
   heap_locals(state, new_locals);
   isolated_ = 1;
 }