本文整理汇总了C++中BlockBegin::lir_oop_map方法的典型用法代码示例。如果您正苦于以下问题:C++ BlockBegin::lir_oop_map方法的具体用法?C++ BlockBegin::lir_oop_map怎么用?C++ BlockBegin::lir_oop_map使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockBegin
的用法示例。
在下文中一共展示了BlockBegin::lir_oop_map方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generate
void LIR_OopMapGenerator::generate() {
// Initialize by iterating down the method's signature and marking
// oop locals in the state
assert((int) oop_map()->size() == frame_map()->num_local_names(), "just checking");
oop_map()->clear();
ciSignature* sig = ir()->method()->signature();
int idx = 0;
// Handle receiver for non-static methods
if (!ir()->method()->is_static()) {
mark(frame_map()->name_for_argument(idx));
++idx;
}
for (int i = 0; i < sig->count(); i++) {
ciType* type = sig->type_at(i);
if (!type->is_primitive_type()) {
mark(frame_map()->name_for_argument(idx));
}
idx += type->size();
}
// The start block contains a Base instruction, which causes the LIR
// for ref-uninit conflicts to be generated. We need to handle this
// block specially so we don't traverse its "osr_entry" successor,
// because we don't know how to set up the state appropriately for
// that entry point.
_base = ir()->start()->end()->as_Base();
// Always start iterating at the start (even for OSR compiles)
merge_state(ir()->start());
BlockBegin* block = work_list_dequeue();
while (block != NULL) {
oop_map()->set_from(*block->lir_oop_map());
iterate_one(block);
block = work_list_dequeue();
}
}