Esempio n. 1
0
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;
}
Esempio n. 2
0
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;
}