< prev index next >

src/share/vm/opto/generateOptoStub.cpp

Print this page
rev 9081 : imported patch more.patch


 244   Node* cmp = _gvn.transform( new CmpPNode(pending, null()) );
 245   Node* bo  = _gvn.transform( new BoolNode(cmp, BoolTest::ne) );
 246   IfNode   *iff = create_and_map_if(control(), bo, PROB_MIN, COUNT_UNKNOWN);
 247 
 248   Node* if_null     = _gvn.transform( new IfFalseNode(iff) );
 249   Node* if_not_null = _gvn.transform( new IfTrueNode(iff)  );
 250 
 251   assert (StubRoutines::forward_exception_entry() != NULL, "must be generated before");
 252   Node *exc_target = makecon(TypeRawPtr::make( StubRoutines::forward_exception_entry() ));
 253   Node *to_exc = new TailCallNode(if_not_null,
 254                                   i_o(),
 255                                   exit_memory,
 256                                   frameptr(),
 257                                   returnadr(),
 258                                   exc_target, null());
 259   root()->add_req(_gvn.transform(to_exc));  // bind to root to keep live
 260   C->init_start(start);
 261 
 262   //-----------------------------
 263   // If this is a normal subroutine return, issue the return and be done.
 264   Node *ret;
 265   switch( is_fancy_jump ) {
 266   case 0:                       // Make a return instruction
 267     // Return to caller, free any space for return address
 268     ret = new ReturnNode(TypeFunc::Parms, if_null,
 269                          i_o(),
 270                          exit_memory,
 271                          frameptr(),
 272                          returnadr());
 273     if (C->tf()->range()->cnt() > TypeFunc::Parms)
 274       ret->add_req( map()->in(TypeFunc::Parms) );
 275     break;
 276   case 1:    // This is a fancy tail-call jump.  Jump to computed address.
 277     // Jump to new callee; leave old return address alone.
 278     ret = new TailCallNode(if_null,
 279                            i_o(),
 280                            exit_memory,
 281                            frameptr(),
 282                            returnadr(),
 283                            target, map()->in(TypeFunc::Parms));
 284     break;


 244   Node* cmp = _gvn.transform( new CmpPNode(pending, null()) );
 245   Node* bo  = _gvn.transform( new BoolNode(cmp, BoolTest::ne) );
 246   IfNode   *iff = create_and_map_if(control(), bo, PROB_MIN, COUNT_UNKNOWN);
 247 
 248   Node* if_null     = _gvn.transform( new IfFalseNode(iff) );
 249   Node* if_not_null = _gvn.transform( new IfTrueNode(iff)  );
 250 
 251   assert (StubRoutines::forward_exception_entry() != NULL, "must be generated before");
 252   Node *exc_target = makecon(TypeRawPtr::make( StubRoutines::forward_exception_entry() ));
 253   Node *to_exc = new TailCallNode(if_not_null,
 254                                   i_o(),
 255                                   exit_memory,
 256                                   frameptr(),
 257                                   returnadr(),
 258                                   exc_target, null());
 259   root()->add_req(_gvn.transform(to_exc));  // bind to root to keep live
 260   C->init_start(start);
 261 
 262   //-----------------------------
 263   // If this is a normal subroutine return, issue the return and be done.
 264   Node *ret = NULL;
 265   switch( is_fancy_jump ) {
 266   case 0:                       // Make a return instruction
 267     // Return to caller, free any space for return address
 268     ret = new ReturnNode(TypeFunc::Parms, if_null,
 269                          i_o(),
 270                          exit_memory,
 271                          frameptr(),
 272                          returnadr());
 273     if (C->tf()->range()->cnt() > TypeFunc::Parms)
 274       ret->add_req( map()->in(TypeFunc::Parms) );
 275     break;
 276   case 1:    // This is a fancy tail-call jump.  Jump to computed address.
 277     // Jump to new callee; leave old return address alone.
 278     ret = new TailCallNode(if_null,
 279                            i_o(),
 280                            exit_memory,
 281                            frameptr(),
 282                            returnadr(),
 283                            target, map()->in(TypeFunc::Parms));
 284     break;
< prev index next >