Пример #1
0
bool compilingLookup::isMethodOrBlockInCompileWithSICNames() {
  if (!CompileWithSICNames->is_objVector())
    return false;

  if (resultType() != methodResult)
    return false;

  oop selector_to_test;
  switch (result()->contents()->kind()) {
  case OuterMethodType:
    // we're compiling a method.  simply, test selector() against selectors in
    // CompileWithSICNames
    selector_to_test = selector();
    break;
  case BlockMethodType: {
    // we're compiling a block.  need to find the method containing the block, and
    // test that method's selector against the ones in CompileWithSICNames
    assert(receiver->is_block(), "expecting a block");
    selector_to_test = blockOop(receiver)->outermostMethodSelector();
    break;
  }
 default:
    ShouldNotReachHere();
  }

  return isSelectorInCompileWithSICNames(selector_to_test);
}
Пример #2
0
 void methodAppraiser::do_literal_code( oop lit ) {
   bool isBlk= lit->is_block_with_code();
   penaltyStack.push(isBlk);
   if (isBlk) {
     failLen= methodCost( blockOop(lit)->value(), isLocal, cp, cutoff);
     cost += failLen;
   }
 }
Пример #3
0
void map_enumeration::add_obj(oop obj) {
  assert(graph_maps->member(obj->map()->enclosing_mapOop()), "map should be known");
  if (!graph_maps->find(obj->map()->enclosing_mapOop())) {
    if (obj->is_block()) {
      // TO BE FIXED WHEN THE SIC IS BETTER TO KILL BLOCK OOPS WHEN
      // A SCOPE TREMINATE. 3/31/93 LB.
      // Clone and kill the copy to avoid the problem.
      obj = obj->clone(); 
      blockOop(obj)->kill_block();
    }
    graph_maps->update(obj->map()->enclosing_mapOop(), obj);
  }
}
Пример #4
0
oop catch_interprocess_returns(oop blk) {
  // for debugging: catch nlrs to blocks in other processes
  // (if CatchInterprocessReturns is on)
  // lprintf("blk 0x%x,  scope 0x%x,  scopeID 0x%x\n",
  //         blk, scope, scopeID);
  if (!blk->is_block())
    return blk;
  blockOop b = blockOop(blk);
  if (!b->is_live())
    return b;
  frame* myScope = b->scope(true);
  if (myScope == NULL)
    return b;
  if (!currentProcess->contains(myScope)) {
    b->kill();
  }
  return b;
}
Пример #5
0
oop clone_block_prim(oop rcvr, smiOop fp) {
  return blockOop(rcvr)->clone_block(fp);
}