comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 726:be93aad57795

6655646: dynamic languages need dynamically linked call sites Summary: invokedynamic instruction (JSR 292 RI) Reviewed-by: twisti, never
author jrose
date Tue, 21 Apr 2009 23:21:04 -0700
parents ad8c8ca4ab0f
children c96bf21b756f
comparison
equal deleted inserted replaced
725:928912ce8438 726:be93aad57795
1520 // some methods are obviously bindable without any type checks so 1520 // some methods are obviously bindable without any type checks so
1521 // convert them directly to an invokespecial. 1521 // convert them directly to an invokespecial.
1522 if (target->is_loaded() && !target->is_abstract() && 1522 if (target->is_loaded() && !target->is_abstract() &&
1523 target->can_be_statically_bound() && code == Bytecodes::_invokevirtual) { 1523 target->can_be_statically_bound() && code == Bytecodes::_invokevirtual) {
1524 code = Bytecodes::_invokespecial; 1524 code = Bytecodes::_invokespecial;
1525 }
1526
1527 if (code == Bytecodes::_invokedynamic) {
1528 BAILOUT("invokedynamic NYI"); // FIXME
1529 return;
1525 } 1530 }
1526 1531
1527 // NEEDS_CLEANUP 1532 // NEEDS_CLEANUP
1528 // I've added the target-is_loaded() test below but I don't really understand 1533 // I've added the target-is_loaded() test below but I don't really understand
1529 // how klass->is_loaded() can be true and yet target->is_loaded() is false. 1534 // how klass->is_loaded() can be true and yet target->is_loaded() is false.
2429 case Bytecodes::_getfield : // fall through 2434 case Bytecodes::_getfield : // fall through
2430 case Bytecodes::_putfield : access_field(code); break; 2435 case Bytecodes::_putfield : access_field(code); break;
2431 case Bytecodes::_invokevirtual : // fall through 2436 case Bytecodes::_invokevirtual : // fall through
2432 case Bytecodes::_invokespecial : // fall through 2437 case Bytecodes::_invokespecial : // fall through
2433 case Bytecodes::_invokestatic : // fall through 2438 case Bytecodes::_invokestatic : // fall through
2439 case Bytecodes::_invokedynamic : // fall through
2434 case Bytecodes::_invokeinterface: invoke(code); break; 2440 case Bytecodes::_invokeinterface: invoke(code); break;
2435 case Bytecodes::_xxxunusedxxx : ShouldNotReachHere(); break;
2436 case Bytecodes::_new : new_instance(s.get_index_big()); break; 2441 case Bytecodes::_new : new_instance(s.get_index_big()); break;
2437 case Bytecodes::_newarray : new_type_array(); break; 2442 case Bytecodes::_newarray : new_type_array(); break;
2438 case Bytecodes::_anewarray : new_object_array(); break; 2443 case Bytecodes::_anewarray : new_object_array(); break;
2439 case Bytecodes::_arraylength : ipush(append(new ArrayLength(apop(), lock_stack()))); break; 2444 case Bytecodes::_arraylength : ipush(append(new ArrayLength(apop(), lock_stack()))); break;
2440 case Bytecodes::_athrow : throw_op(s.cur_bci()); break; 2445 case Bytecodes::_athrow : throw_op(s.cur_bci()); break;
2569 , Bytecodes::_getfield 2574 , Bytecodes::_getfield
2570 , Bytecodes::_putfield 2575 , Bytecodes::_putfield
2571 , Bytecodes::_invokevirtual 2576 , Bytecodes::_invokevirtual
2572 , Bytecodes::_invokespecial 2577 , Bytecodes::_invokespecial
2573 , Bytecodes::_invokestatic 2578 , Bytecodes::_invokestatic
2579 , Bytecodes::_invokedynamic
2574 , Bytecodes::_invokeinterface 2580 , Bytecodes::_invokeinterface
2575 , Bytecodes::_new 2581 , Bytecodes::_new
2576 , Bytecodes::_newarray 2582 , Bytecodes::_newarray
2577 , Bytecodes::_anewarray 2583 , Bytecodes::_anewarray
2578 , Bytecodes::_arraylength 2584 , Bytecodes::_arraylength