nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/annotations/SpecializedFunction.java
changeset 42376 8604f1a50c30
parent 34447 ec4c069f9436
equal deleted inserted replaced
42279:f4e854a77aa3 42376:8604f1a50c30
   213      * property.
   213      * property.
   214      *
   214      *
   215      * @return whether this function can throw {@link UnwarrantedOptimismException}.
   215      * @return whether this function can throw {@link UnwarrantedOptimismException}.
   216      */
   216      */
   217     boolean isOptimistic() default false;
   217     boolean isOptimistic() default false;
       
   218 
       
   219     /**
       
   220      * Is it safe to convert non-numeric arguments to numbers for this function's primitive numeric parameters?
       
   221      * This is true for many built-in functions which expect numeric arguments, but not for those that
       
   222      * expect generic arguments and just have specializations with numeric params to avoid boxing overhead.
       
   223      * The default value is {@code true} because that is by far the most common case.
       
   224      *
       
   225      * @return true if it is safe to convert arguments to numbers
       
   226      */
       
   227     boolean convertsNumericArgs() default true;
   218 }
   228 }