/** * Cache a closure body (BlockBody) for 1.9 mode using invokedynamic. */ @Override public int cacheClosure19(BaseBodyCompiler method, String closureMethod, int arity, StaticScope scope, String file, int line, boolean hasMultipleArgsHead, NodeType argsNodeId, String parameterList, ASTInspector inspector) { String descriptor = Helpers.buildBlockDescriptor19( closureMethod, arity, file, line, hasMultipleArgsHead, argsNodeId, parameterList, inspector); method.loadThis(); method.loadThreadContext(); int scopeIndex = cacheStaticScope(method, scope); method.method.invokedynamic( "getBlockBody19", sig(BlockBody.class, Object.class, ThreadContext.class, StaticScope.class), InvokeDynamicSupport.getBlockBody19Handle(), descriptor); return scopeIndex; }
/** * Cache a closure body (BlockBody) for 1.9 mode using invokedynamic. */ @Override public int cacheClosure19(BaseBodyCompiler method, String closureMethod, int arity, StaticScope scope, String file, int line, boolean hasMultipleArgsHead, NodeType argsNodeId, String parameterList, ASTInspector inspector) { String descriptor = Helpers.buildBlockDescriptor19( closureMethod, arity, file, line, hasMultipleArgsHead, argsNodeId, parameterList, inspector); method.loadThis(); method.loadThreadContext(); int scopeIndex = cacheStaticScope(method, scope); method.method.invokedynamic( "getBlockBody19", sig(BlockBody.class, Object.class, ThreadContext.class, StaticScope.class), InvokeDynamicSupport.getBlockBody19Handle(), descriptor); return scopeIndex; }