本文整理汇总了C++中VMMethod::set_execute_status方法的典型用法代码示例。如果您正苦于以下问题:C++ VMMethod::set_execute_status方法的具体用法?C++ VMMethod::set_execute_status怎么用?C++ VMMethod::set_execute_status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VMMethod
的用法示例。
在下文中一共展示了VMMethod::set_execute_status方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: add_specialized
void CompiledMethod::add_specialized(int spec_id, executor exec,
jit::RuntimeDataHolder* rd)
{
if(!backend_method_) rubinius::bug("specializing with no backend");
VMMethod* v = backend_method_;
// Must happen only on the first specialization
if(!v->unspecialized) {
if(execute == specialized_executor) {
rubinius::bug("cant setup unspecialized from specialized");
}
v->unspecialized = execute;
}
for(int i = 0; i < VMMethod::cMaxSpecializations; i++) {
int id = v->specializations[i].class_id;
if(id == 0 || id == spec_id) {
v->specializations[i].class_id = spec_id;
v->specializations[i].execute = exec;
v->specializations[i].jit_data = rd;
v->set_execute_status(VMMethod::eJIT);
execute = specialized_executor;
return;
}
}
// No room for the specialization, this is bad.
std::cerr << "No room for specialization!\n";
}