本文整理汇总了C++中CallFrame::block_env方法的典型用法代码示例。如果您正苦于以下问题:C++ CallFrame::block_env方法的具体用法?C++ CallFrame::block_env怎么用?C++ CallFrame::block_env使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CallFrame
的用法示例。
在下文中一共展示了CallFrame::block_env方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compile_callframe
void LLVMState::compile_callframe(STATE, GCToken gct, CompiledCode* start,
CallFrame* call_frame, int primitive)
{
// TODO: Fix compile policy checks
if(!start->keywords()->nil_p()) {
metrics().m.jit_metrics.methods_failed++;
return;
}
if(debug_search) {
std::cout << std::endl << "JIT: triggered: "
<< enclosure_name(start) << "#"
<< symbol_debug_str(start->name()) << std::endl;
}
CallFrame* candidate = find_candidate(state, start, call_frame);
if(!candidate || candidate->jitted_p() || candidate->inline_method_p()) {
if(config().jit_show_compiling) {
llvm::outs() << "[[[ JIT error finding call frame "
<< enclosure_name(start) << "#" << symbol_debug_str(start->name());
if(!candidate) {
llvm::outs() << " no candidate";
} else {
if(candidate->jitted_p()) {
llvm::outs() << " candidate is jitted";
}
if(candidate->inline_method_p()) {
llvm::outs() << " candidate is inlined";
}
}
llvm::outs() << " ]]]\n";
}
return;
}
if(debug_search) {
std::cout << "! ";
candidate->print_backtrace(state, 1);
}
if(candidate->compiled_code->machine_code()->call_count <= 1) {
if(!start || start->machine_code()->jitted_p()) return;
// Ignore it. compile this one.
candidate = call_frame;
}
if(candidate->block_p()) {
compile_soon(state, gct, candidate->compiled_code, call_frame,
candidate->self()->direct_class(state), candidate->block_env(), true);
} else {
if(candidate->compiled_code->can_specialize_p()) {
compile_soon(state, gct, candidate->compiled_code, call_frame,
candidate->self()->direct_class(state));
} else {
compile_soon(state, gct, candidate->compiled_code, call_frame, NULL);
}
}
}