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 9088 : 8027827: Improve performance of catchException combinator
Reviewed-by: ?


  59 
  60     // Cached lambda form information, for basic types only:
  61     final @Stable LambdaForm[] lambdaForms;
  62     // Indexes into lambdaForms:
  63     static final int
  64             LF_INVVIRTUAL     =  0,  // DMH invokeVirtual
  65             LF_INVSTATIC      =  1,
  66             LF_INVSPECIAL     =  2,
  67             LF_NEWINVSPECIAL  =  3,
  68             LF_INVINTERFACE   =  4,
  69             LF_INVSTATIC_INIT =  5,  // DMH invokeStatic with <clinit> barrier
  70             LF_INTERPRET      =  6,  // LF interpreter
  71             LF_COUNTER        =  7,  // CMH wrapper
  72             LF_REINVOKE       =  8,  // other wrapper
  73             LF_EX_LINKER      =  9,  // invokeExact_MT
  74             LF_EX_INVOKER     = 10,  // invokeExact MH
  75             LF_GEN_LINKER     = 11,
  76             LF_GEN_INVOKER    = 12,
  77             LF_CS_LINKER      = 13,  // linkToCallSite_CS
  78             LF_MH_LINKER      = 14,  // linkToCallSite_MH
  79             LF_LIMIT          = 15;

  80 
  81     public MethodType erasedType() {
  82         return erasedType;
  83     }
  84 
  85     public MethodType basicType() {
  86         return basicType;
  87     }
  88 
  89     public LambdaForm cachedLambdaForm(int which) {
  90         return lambdaForms[which];
  91     }
  92 
  93     public LambdaForm setCachedLambdaForm(int which, LambdaForm form) {
  94         // Should we perform some sort of CAS, to avoid racy duplication?
  95         return lambdaForms[which] = form;
  96     }
  97 
  98     public MethodHandle basicInvoker() {
  99         assert(erasedType == basicType) : "erasedType: " + erasedType + " != basicType: " + basicType;  // primitives must be flattened also




  59 
  60     // Cached lambda form information, for basic types only:
  61     final @Stable LambdaForm[] lambdaForms;
  62     // Indexes into lambdaForms:
  63     static final int
  64             LF_INVVIRTUAL     =  0,  // DMH invokeVirtual
  65             LF_INVSTATIC      =  1,
  66             LF_INVSPECIAL     =  2,
  67             LF_NEWINVSPECIAL  =  3,
  68             LF_INVINTERFACE   =  4,
  69             LF_INVSTATIC_INIT =  5,  // DMH invokeStatic with <clinit> barrier
  70             LF_INTERPRET      =  6,  // LF interpreter
  71             LF_COUNTER        =  7,  // CMH wrapper
  72             LF_REINVOKE       =  8,  // other wrapper
  73             LF_EX_LINKER      =  9,  // invokeExact_MT
  74             LF_EX_INVOKER     = 10,  // invokeExact MH
  75             LF_GEN_LINKER     = 11,
  76             LF_GEN_INVOKER    = 12,
  77             LF_CS_LINKER      = 13,  // linkToCallSite_CS
  78             LF_MH_LINKER      = 14,  // linkToCallSite_MH
  79             LF_GWC            = 15,
  80             LF_LIMIT          = 16;
  81 
  82     public MethodType erasedType() {
  83         return erasedType;
  84     }
  85 
  86     public MethodType basicType() {
  87         return basicType;
  88     }
  89 
  90     public LambdaForm cachedLambdaForm(int which) {
  91         return lambdaForms[which];
  92     }
  93 
  94     public LambdaForm setCachedLambdaForm(int which, LambdaForm form) {
  95         // Should we perform some sort of CAS, to avoid racy duplication?
  96         return lambdaForms[which] = form;
  97     }
  98 
  99     public MethodHandle basicInvoker() {
 100         assert(erasedType == basicType) : "erasedType: " + erasedType + " != basicType: " + basicType;  // primitives must be flattened also


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