本文整理汇总了C++中CompiledCode::execute方法的典型用法代码示例。如果您正苦于以下问题:C++ CompiledCode::execute方法的具体用法?C++ CompiledCode::execute怎么用?C++ CompiledCode::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompiledCode
的用法示例。
在下文中一共展示了CompiledCode::execute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: default_executor
Object* CompiledCode::default_executor(STATE, CallFrame* call_frame,
Executable* exec, Module* mod, Arguments& args)
{
LockableScopedLock lg(state, &state->shared(), __FILE__, __LINE__);
CompiledCode* code = as<CompiledCode>(exec);
if(code->execute == default_executor) {
const char* reason = 0;
int ip = -1;
OnStack<5> os(state, code, exec, mod, args.recv_location(), args.block_location());
VariableRootBuffer vrb(state->vm()->current_root_buffers(),
&args.arguments_location(), args.total());
GCTokenImpl gct;
if(!code->internalize(state, gct, call_frame, &reason, &ip)) {
Exception::bytecode_error(state, call_frame, code, ip, reason);
return 0;
}
}
lg.unlock();
return code->execute(state, call_frame, exec, mod, args);
}
示例2: default_executor
Object* CompiledCode::default_executor(STATE,
Executable* exec, Module* mod, Arguments& args)
{
CompiledCode* code = as<CompiledCode>(exec);
if(code->execute == default_executor) {
if(!code->internalize(state)) return 0;
}
return code->execute(state, exec, mod, args);
}