本文整理汇总了C++中CompiledMethod::internalize方法的典型用法代码示例。如果您正苦于以下问题:C++ CompiledMethod::internalize方法的具体用法?C++ CompiledMethod::internalize怎么用?C++ CompiledMethod::internalize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompiledMethod
的用法示例。
在下文中一共展示了CompiledMethod::internalize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: default_executor
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);
}
示例2: set_breakpoint
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;
}
示例3: default_executor
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);
}