--- a/nashorn/src/jdk/internal/dynalink/support/LinkRequestImpl.java Tue Feb 25 18:56:10 2014 +0530
+++ b/nashorn/src/jdk/internal/dynalink/support/LinkRequestImpl.java Wed Feb 26 13:17:57 2014 +0100
@@ -95,6 +95,7 @@
public class LinkRequestImpl implements LinkRequest {
private final CallSiteDescriptor callSiteDescriptor;
+ private final Object callSiteToken;
private final Object[] arguments;
private final boolean callSiteUnstable;
@@ -102,11 +103,13 @@
* Creates a new link request.
*
* @param callSiteDescriptor the descriptor for the call site being linked
+ * @param callSiteToken the opaque token for the call site being linked.
* @param callSiteUnstable true if the call site being linked is considered unstable
* @param arguments the arguments for the invocation
*/
- public LinkRequestImpl(CallSiteDescriptor callSiteDescriptor, boolean callSiteUnstable, Object... arguments) {
+ public LinkRequestImpl(CallSiteDescriptor callSiteDescriptor, Object callSiteToken, boolean callSiteUnstable, Object... arguments) {
this.callSiteDescriptor = callSiteDescriptor;
+ this.callSiteToken = callSiteToken;
this.callSiteUnstable = callSiteUnstable;
this.arguments = arguments;
}
@@ -127,6 +130,11 @@
}
@Override
+ public Object getCallSiteToken() {
+ return callSiteToken;
+ }
+
+ @Override
public boolean isCallSiteUnstable() {
return callSiteUnstable;
}
@@ -138,6 +146,6 @@
@Override
public LinkRequest replaceArguments(CallSiteDescriptor newCallSiteDescriptor, Object[] newArguments) {
- return new LinkRequestImpl(newCallSiteDescriptor, callSiteUnstable, newArguments);
+ return new LinkRequestImpl(newCallSiteDescriptor, callSiteToken, callSiteUnstable, newArguments);
}
}