src/share/classes/java/lang/invoke/MethodTypeForm.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File jdk Sdiff src/share/classes/java/lang/invoke

src/share/classes/java/lang/invoke/MethodTypeForm.java

Print this page
rev 10354 : 8050052: Small cleanups in java.lang.invoke code
Reviewed-by: ?
rev 10355 : 8050053: Improve caching of different invokers
Reviewed-by: vlivanov, ?
Contributed-by: john.r.rose@oracle.com
rev 10359 : 8050057: Improve caching of MethodHandle reinvokers
Reviewed-by: vlivanov, ?
Contributed-by: john.r.rose@oracle.com
rev 10367 : imported patch 17.gwt


  62     // Cached lambda form information, for basic types only:
  63     final @Stable LambdaForm[] lambdaForms;
  64     // Indexes into lambdaForms:
  65     static final int
  66             LF_INVVIRTUAL     =  0,  // DMH invokeVirtual
  67             LF_INVSTATIC      =  1,
  68             LF_INVSPECIAL     =  2,
  69             LF_NEWINVSPECIAL  =  3,
  70             LF_INVINTERFACE   =  4,
  71             LF_INVSTATIC_INIT =  5,  // DMH invokeStatic with <clinit> barrier
  72             LF_INTERPRET      =  6,  // LF interpreter
  73             LF_REBIND         =  7,  // BoundMethodHandle
  74             LF_DELEGATE       =  8,  // DelegatingMethodHandle
  75             LF_EX_LINKER      =  9,  // invokeExact_MT (for invokehandle)
  76             LF_EX_INVOKER     = 10,  // MHs.invokeExact
  77             LF_GEN_LINKER     = 11,  // generic invoke_MT (for invokehandle)
  78             LF_GEN_INVOKER    = 12,  // generic MHs.invoke
  79             LF_CS_LINKER      = 13,  // linkToCallSite_CS
  80             LF_MH_LINKER      = 14,  // linkToCallSite_MH
  81             LF_GWC            = 15,  // guardWithCatch (catchException)
  82             LF_LIMIT          = 16;

  83 
  84     /** Return the type corresponding uniquely (1-1) to this MT-form.
  85      *  It might have any primitive returns or arguments, but will have no references except Object.
  86      */
  87     public MethodType erasedType() {
  88         return erasedType;
  89     }
  90 
  91     /** Return the basic type derived from the erased type of this MT-form.
  92      *  A basic type is erased (all references Object) and also has all primitive
  93      *  types (except int, long, float, double, void) normalized to int.
  94      *  Such basic types correspond to low-level JVM calling sequences.
  95      */
  96     public MethodType basicType() {
  97         return basicType;
  98     }
  99 
 100     private boolean assertIsBasicType() {
 101         // primitives must be flattened also
 102         assert(erasedType == basicType)




  62     // Cached lambda form information, for basic types only:
  63     final @Stable LambdaForm[] lambdaForms;
  64     // Indexes into lambdaForms:
  65     static final int
  66             LF_INVVIRTUAL     =  0,  // DMH invokeVirtual
  67             LF_INVSTATIC      =  1,
  68             LF_INVSPECIAL     =  2,
  69             LF_NEWINVSPECIAL  =  3,
  70             LF_INVINTERFACE   =  4,
  71             LF_INVSTATIC_INIT =  5,  // DMH invokeStatic with <clinit> barrier
  72             LF_INTERPRET      =  6,  // LF interpreter
  73             LF_REBIND         =  7,  // BoundMethodHandle
  74             LF_DELEGATE       =  8,  // DelegatingMethodHandle
  75             LF_EX_LINKER      =  9,  // invokeExact_MT (for invokehandle)
  76             LF_EX_INVOKER     = 10,  // MHs.invokeExact
  77             LF_GEN_LINKER     = 11,  // generic invoke_MT (for invokehandle)
  78             LF_GEN_INVOKER    = 12,  // generic MHs.invoke
  79             LF_CS_LINKER      = 13,  // linkToCallSite_CS
  80             LF_MH_LINKER      = 14,  // linkToCallSite_MH
  81             LF_GWC            = 15,  // guardWithCatch (catchException)
  82             LF_GWT            = 16,  // guardWithTest
  83             LF_LIMIT          = 17;
  84 
  85     /** Return the type corresponding uniquely (1-1) to this MT-form.
  86      *  It might have any primitive returns or arguments, but will have no references except Object.
  87      */
  88     public MethodType erasedType() {
  89         return erasedType;
  90     }
  91 
  92     /** Return the basic type derived from the erased type of this MT-form.
  93      *  A basic type is erased (all references Object) and also has all primitive
  94      *  types (except int, long, float, double, void) normalized to int.
  95      *  Such basic types correspond to low-level JVM calling sequences.
  96      */
  97     public MethodType basicType() {
  98         return basicType;
  99     }
 100 
 101     private boolean assertIsBasicType() {
 102         // primitives must be flattened also
 103         assert(erasedType == basicType)


src/share/classes/java/lang/invoke/MethodTypeForm.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File