本文整理汇总了C++中oop::cloneSize方法的典型用法代码示例。如果您正苦于以下问题:C++ oop::cloneSize方法的具体用法?C++ oop::cloneSize怎么用?C++ oop::cloneSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oop
的用法示例。
在下文中一共展示了oop::cloneSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clone_prim_node_pt
oop graph_creator::clone_prim_node_pt(prim_node* n) {
int size = n->num_of_edges(cutoff);
oop oop_node= prim_node_pt->cloneSize(size * 2, CANFAIL);
if (oop_node == failedAllocationOop) return failedAllocationOop;
prim_pt_info->fill(oop_node, n);
return oop_node;
}
示例2: clone_block_pt
oop graph_creator::clone_block_pt(block_node* n) {
int size = n->num_of_edges(cutoff);
oop oop_node= block_node_pt->cloneSize(size * 2, CANFAIL);
if (oop_node == failedAllocationOop) return failedAllocationOop;
// find outer most lexical node
oop o = n->outer_method();
oop lex_oop = NULL;
for (int i= node_path->length() - 1; i >= 0 && !lex_oop ; i--) {
if (node_path->nth(i)->callee->is_method_node()) {
method_node* mn = (method_node*) node_path->nth(i)->callee;
if (mn->method() == o) lex_oop = oop_path->nth(i);
}
}
if (!SpendTimeForDebugging)
assert(TARGET_ARCH == PPC_ARCH || lex_oop,
"lexical node should be on stack (but PPC may miss frame next to bottom)");
else if (TARGET_ARCH != PPC_ARCH && !lex_oop) {
lprintf("\n\nlexical node should be on stack\n");
lprintf("\n\nselector:\n");
n->selector()->print();
lprintf("\nnmethod\n");
n->method()->print();
lprintf("\n\nouter method\n");
n->outer_method()->print();
for (int i= node_path->length() - 1; i >= 0 && !lex_oop; --i) {
lprintf("node %d in path:\n", i);
if (node_path->nth(i)->callee->is_method_node()) {
method_node* mn = (method_node*) node_path->nth(i)->callee;
lprintf("\nselector\n");
mn->selector()->print();
lprintf("\nreceiverMapOop\n");
mn->receiverMapOop()->print();
lprintf("\nprint_map\n");
mn->receiverMap()->print_map();
lprintf("\nmethod\n");
mn->method()->print();
lprintf("\n\n");
}
}
warning1("method = 0x%x\n\n", o);
}
block_pt_info->fill(oop_node, n, lex_oop ? lex_oop : Memory->nilObj);
return oop_node;
}