Skip to content

Commit bbc6061

Browse files
author
Harold Seigel
committedOct 20, 2021
8272614: Unused parameters in MethodHandleNatives linking methods
Reviewed-by: dholmes, lfoltan
1 parent 7e28bdd commit bbc6061

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed
 

‎src/hotspot/share/classfile/systemDictionary.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -2352,11 +2352,10 @@ void SystemDictionary::invoke_bootstrap_method(BootstrapInfo& bootstrap_specifie
23522352
assert(appendix_box->obj_at(0) == NULL, "");
23532353
}
23542354

2355-
// call condy: java.lang.invoke.MethodHandleNatives::linkDynamicConstant(caller, condy_index, bsm, type, info)
2356-
// indy: java.lang.invoke.MethodHandleNatives::linkCallSite(caller, indy_index, bsm, name, mtype, info, &appendix)
2355+
// call condy: java.lang.invoke.MethodHandleNatives::linkDynamicConstant(caller, bsm, type, info)
2356+
// indy: java.lang.invoke.MethodHandleNatives::linkCallSite(caller, bsm, name, mtype, info, &appendix)
23572357
JavaCallArguments args;
23582358
args.push_oop(Handle(THREAD, bootstrap_specifier.caller_mirror()));
2359-
args.push_int(bootstrap_specifier.bss_index());
23602359
args.push_oop(bootstrap_specifier.bsm());
23612360
args.push_oop(bootstrap_specifier.name_arg());
23622361
args.push_oop(bootstrap_specifier.type_arg());

‎src/hotspot/share/classfile/vmSymbols.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@
339339
template(linkMethod_name, "linkMethod") \
340340
template(linkMethod_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
341341
template(linkDynamicConstant_name, "linkDynamicConstant") \
342-
template(linkDynamicConstant_signature, "(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
342+
template(linkDynamicConstant_signature, "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
343343
template(linkCallSite_name, "linkCallSite") \
344-
template(linkCallSite_signature, "(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
344+
template(linkCallSite_signature, "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
345345
template(setTargetNormal_name, "setTargetNormal") \
346346
template(setTargetVolatile_name, "setTargetVolatile") \
347347
template(setTarget_signature, "(Ljava/lang/invoke/MethodHandle;)V") \

‎src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -258,7 +258,6 @@ static boolean verifyConstants() {
258258
* The JVM is linking an invokedynamic instruction. Create a reified call site for it.
259259
*/
260260
static MemberName linkCallSite(Object callerObj,
261-
int indexInCP,
262261
Object bootstrapMethodObj,
263262
Object nameObj, Object typeObj,
264263
Object staticArguments,
@@ -317,7 +316,6 @@ static MemberName linkCallSiteTracing(Class<?> caller,
317316

318317
// this implements the upcall from the JVM, MethodHandleNatives.linkDynamicConstant:
319318
static Object linkDynamicConstant(Object callerObj,
320-
int indexInCP,
321319
Object bootstrapMethodObj,
322320
Object nameObj, Object typeObj,
323321
Object staticArguments) {

0 commit comments

Comments
 (0)
Please sign in to comment.