本文整理汇总了C++中VMMethod::setup_argument_handler方法的典型用法代码示例。如果您正苦于以下问题:C++ VMMethod::setup_argument_handler方法的具体用法?C++ VMMethod::setup_argument_handler怎么用?C++ VMMethod::setup_argument_handler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VMMethod
的用法示例。
在下文中一共展示了VMMethod::setup_argument_handler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: internalize
VMMethod* CompiledMethod::internalize(STATE, GCToken gct,
const char** reason, int* ip)
{
VMMethod* vmm = backend_method_;
atomic::memory_barrier();
if(vmm) return vmm;
CompiledMethod* self = this;
OnStack<1> os(state, self);
self->hard_lock(state, gct);
vmm = self->backend_method_;
if(!vmm) {
{
BytecodeVerification bv(self);
if(!bv.verify(state)) {
if(reason) *reason = bv.failure_reason();
if(ip) *ip = bv.failure_ip();
std::cerr << "Error validating bytecode: " << bv.failure_reason() << "\n";
return 0;
}
}
vmm = new VMMethod(state, self);
if(self->resolve_primitive(state)) {
vmm->fallback = execute;
} else {
vmm->setup_argument_handler(self);
}
// We need to have an explicit memory barrier here, because we need to
// be sure that vmm is completely initialized before it's set.
// Otherwise another thread might see a partially initialized
// VMMethod.
atomic::memory_barrier();
backend_method_ = vmm;
}
self->hard_unlock(state, gct);
return vmm;
}