本文整理汇总了C++中VMMethod::jitted方法的典型用法代码示例。如果您正苦于以下问题:C++ VMMethod::jitted方法的具体用法?C++ VMMethod::jitted怎么用?C++ VMMethod::jitted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VMMethod
的用法示例。
在下文中一共展示了VMMethod::jitted方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: find_candidate
CallFrame* LLVMState::find_candidate(CompiledMethod* start, CallFrame* call_frame) {
if(!config_.jit_inline_generic) {
return call_frame;
}
int depth = cInlineMaxDepth;
if(!start) {
start = call_frame->cm;
call_frame = call_frame->previous;
depth--;
}
if(!call_frame || start->backend_method()->total > SMALL_METHOD_SIZE) {
return call_frame;
}
CallFrame* caller = call_frame;
while(depth-- > 0) {
CompiledMethod* cur = call_frame->cm;
VMMethod* vmm = cur->backend_method();
/*
if(call_frame->block_p()
|| vmm->required_args != vmm->total_args // has a splat
|| vmm->call_count < 200 // not called much
|| vmm->jitted() // already jitted
|| vmm->parent() // is a block
) return caller;
*/
if(vmm->required_args != vmm->total_args // has a splat
|| vmm->call_count < 200 // not called much
|| vmm->jitted() // already jitted
|| !vmm->no_inline_p() // method marked as not inlinable
) return caller;
CallFrame* next = call_frame->previous;
if(!next|| cur->backend_method()->total > SMALL_METHOD_SIZE) return call_frame;
caller = call_frame;
call_frame = next;
}
return caller;
}
示例2: create
Location* Location::create(STATE, CallFrame* call_frame,
bool include_variables)
{
if(NativeMethodFrame* nmf = call_frame->native_method_frame()) {
return create(state, nmf);
}
Location* loc = state->new_object<Location>(G(location));
loc->method_module(state, call_frame->module());
loc->receiver(state, call_frame->self());
loc->method(state, call_frame->cm);
loc->ip(state, Fixnum::from(call_frame->ip()));
loc->flags(state, Fixnum::from(0));
if(call_frame->is_block_p(state)) {
loc->name(state, call_frame->top_scope(state)->method()->name());
loc->set_is_block(state);
} else {
loc->name(state, call_frame->name());
}
VMMethod* vmm = call_frame->cm->backend_method();
if(vmm && vmm->jitted()) {
loc->set_is_jit(state);
}
if(include_variables) {
// Use promote_scope because it can figure out of the generated
// VariableScope should be isolated by default (true atm for JITd
// frames)
loc->variables(state, call_frame->promote_scope(state));
}
loc->static_scope(state, call_frame->static_scope());
return loc;
}
示例3: create
Location* Location::create(STATE, CallFrame* call_frame) {
Location* loc = state->new_object<Location>(G(location));
loc->method_module(state, call_frame->module());
loc->receiver(state, call_frame->self());
loc->method(state, call_frame->cm);
loc->ip(state, Fixnum::from(call_frame->ip() - 1));
if(call_frame->is_block_p(state)) {
loc->name(state, call_frame->top_scope(state)->method()->name());
loc->is_block(state, Qtrue);
} else {
loc->name(state, call_frame->name());
loc->is_block(state, Qfalse);
}
VMMethod* vmm = call_frame->cm->backend_method();
if(vmm && vmm->jitted()) {
loc->is_jit(state, Qtrue);
} else {
loc->is_jit(state, Qfalse);
}
return loc;
}