nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/LinkRequest.java
changeset 33333 0bad500ce4e0
parent 33332 f180be6368d8
child 33339 334cd3ebfa5e
equal deleted inserted replaced
33332:f180be6368d8 33333:0bad500ce4e0
    97      * @return the call site descriptor for the call site being linked.
    97      * @return the call site descriptor for the call site being linked.
    98      */
    98      */
    99     public CallSiteDescriptor getCallSiteDescriptor();
    99     public CallSiteDescriptor getCallSiteDescriptor();
   100 
   100 
   101     /**
   101     /**
   102      * Returns the arguments for the invocation being linked. The returned array is a clone; modifications to it won't
   102      * Returns the arguments for the invocation being linked. The returned array
   103      * affect the arguments in this request.
   103      * must be a clone; modifications to it must not affect the arguments in
       
   104      * this request.
   104      *
   105      *
   105      * @return the arguments for the invocation being linked.
   106      * @return the arguments for the invocation being linked.
   106      */
   107      */
   107     public Object[] getArguments();
   108     public Object[] getArguments();
   108 
   109 
   109     /**
   110     /**
   110      * Returns the 0th argument for the invocation being linked; this is typically the receiver object.
   111      * Returns the first argument for the invocation being linked; this is
       
   112      * typically the receiver object. This is a shorthand for
       
   113      * {@code getArguments()[0]} that also avoids the cloning of the arguments
       
   114      * array.
   111      *
   115      *
   112      * @return the receiver object.
   116      * @return the receiver object.
   113      */
   117      */
   114     public Object getReceiver();
   118     public Object getReceiver();
   115 
   119 
   116     /**
   120     /**
   117      * Returns true if the call site is considered unstable, that is, it has been relinked more times than was
   121      * Returns true if the call site is considered unstable, that is, it has been relinked more times than was
   118      * specified in {@link DynamicLinkerFactory#setUnstableRelinkThreshold(int)}. Linkers should use this as a
   122      * specified in {@link DynamicLinkerFactory#setUnstableRelinkThreshold(int)}. Linkers should use this as a
   119      * hint to prefer producing linkage that is more stable (its guard fails less frequently), even if that assumption
   123      * hint to prefer producing linkage that is more stable (its guard fails less frequently), even if that assumption
   120      * causes a less effective version of an operation to be linked. This is just a hint, of course, and linkers are
   124      * causes a less effective version of an operation to be linked. This is just a hint, though, and linkers are
   121      * free to ignore this property.
   125      * allowed to ignore this property.
   122      * @return true if the call site is considered unstable.
   126      * @return true if the call site is considered unstable.
   123      */
   127      */
   124     public boolean isCallSiteUnstable();
   128     public boolean isCallSiteUnstable();
   125 
   129 
   126     /**
   130     /**