Print this page
rev 2143 : 6839872: remove implementation inheritance from JSR 292 APIs
Summary: Move all JSR 292 classes into the java.dyn package.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/share/vm/prims/methodHandleWalk.cpp
          +++ new/src/share/vm/prims/methodHandleWalk.cpp
↓ open down ↓ 92 lines elided ↑ open up ↑
  93   93    else if ((flags & MethodHandles::_dmf_from_interface) != 0)
  94   94      _last_invoke = Bytecodes::_invokeinterface;
  95   95    else
  96   96      _last_invoke = Bytecodes::_invokevirtual;
  97   97  }
  98   98  
  99   99  
 100  100  BasicType MethodHandleChain::compute_bound_arg_type(oop target, methodOop m, int arg_slot, TRAPS) {
 101  101    // There is no direct indication of whether the argument is primitive or not.
 102  102    // It is implied by the _vmentry code, and by the MethodType of the target.
 103      -  // FIXME: Make it explicit MethodHandleImpl refactors out from MethodHandle
 104  103    BasicType arg_type = T_VOID;
 105  104    if (target != NULL) {
 106  105      oop mtype = java_dyn_MethodHandle::type(target);
 107  106      int arg_num = MethodHandles::argument_slot_to_argnum(mtype, arg_slot);
 108  107      if (arg_num >= 0) {
 109  108        oop ptype = java_dyn_MethodType::ptype(mtype, arg_num);
 110  109        arg_type = java_lang_Class::as_BasicType(ptype);
 111  110      }
 112  111    } else if (m != NULL) {
 113  112      // figure out the argument type from the slot
↓ open down ↓ 839 lines elided ↑ open up ↑
 953  952  
 954  953  // Emit bytecodes for the given invoke instruction.
 955  954  MethodHandleWalker::ArgToken
 956  955  MethodHandleCompiler::make_invoke(methodOop m, vmIntrinsics::ID iid,
 957  956                                    Bytecodes::Code op, bool tailcall,
 958  957                                    int argc, MethodHandleWalker::ArgToken* argv,
 959  958                                    TRAPS) {
 960  959    if (m == NULL) {
 961  960      // Get the intrinsic methodOop.
 962  961      m = vmIntrinsics::method_for(iid);
      962 +    if (m == NULL && iid == vmIntrinsics::_checkSpreadArgument && AllowTransitionalJSR292) {
      963 +      m = vmIntrinsics::method_for(vmIntrinsics::_checkSpreadArgument_TRANS);
      964 +    }
      965 +    if (m == NULL) {
      966 +      ArgToken zero;
      967 +      lose(vmIntrinsics::name_at(iid), CHECK_(zero));
      968 +    }
 963  969    }
 964  970  
 965  971    klassOop  klass   = m->method_holder();
 966  972    Symbol* name      = m->name();
 967  973    Symbol* signature = m->signature();
 968  974  
 969  975    if (tailcall) {
 970  976      // Actually, in order to make these methods more recognizable,
 971  977      // let's put them in holder class MethodHandle.  That way stack
 972  978      // walkers and compiler heuristics can recognize them.
↓ open down ↓ 435 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX