Object* CompiledMethod::default_executor(STATE, CallFrame* call_frame, Dispatch& msg, Arguments& args) { CompiledMethod* cm = as<CompiledMethod>(msg.method); const char* reason = 0; int ip = -1; if(!cm->internalize(state, &reason, &ip)) { Exception::bytecode_error(state, call_frame, cm, ip, reason); return 0; } // Refactor cm->backend_method_->find_super_instructions(); return cm->execute(state, call_frame, msg, args); }
Object* CompiledMethod::set_breakpoint(STATE, GCToken gct, Fixnum* ip, Object* bp) { CompiledMethod* self = this; OnStack<3> os(state, self, ip, bp); int i = ip->to_native(); if(self->backend_method_ == NULL) { if(!self->internalize(state, gct)) return Primitives::failure(); } if(!self->backend_method_->validate_ip(state, i)) return Primitives::failure(); if(self->breakpoints_->nil_p()) { self->breakpoints(state, LookupTable::create(state)); } self->breakpoints_->store(state, ip, bp); self->backend_method_->debugging = 1; self->backend_method_->run = VMMethod::debugger_interpreter; return ip; }
Object* CompiledMethod::default_executor(STATE, CallFrame* call_frame, Executable* exec, Module* mod, Arguments& args) { LockableScopedLock lg(state, &state->shared, __FILE__, __LINE__); CompiledMethod* cm = as<CompiledMethod>(exec); if(cm->execute == default_executor) { const char* reason = 0; int ip = -1; OnStack<4> os(state, cm, exec, mod, args.argument_container_location()); GCTokenImpl gct; if(!cm->internalize(state, gct, &reason, &ip)) { Exception::bytecode_error(state, call_frame, cm, ip, reason); return 0; } } lg.unlock(); return cm->execute(state, call_frame, exec, mod, args); }