diff options
Diffstat (limited to 'src/jdk/nashorn/internal/ir/FunctionCall.java')
-rw-r--r-- | src/jdk/nashorn/internal/ir/FunctionCall.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/jdk/nashorn/internal/ir/FunctionCall.java b/src/jdk/nashorn/internal/ir/FunctionCall.java index 73a6c625..22bf37d1 100644 --- a/src/jdk/nashorn/internal/ir/FunctionCall.java +++ b/src/jdk/nashorn/internal/ir/FunctionCall.java @@ -26,14 +26,18 @@ package jdk.nashorn.internal.ir; /** - * Interface used by AccessNodes, IndexNodes and IdentNodes to signal - * that they are function calls + * Interface used by AccessNodes, IndexNodes and IdentNodes to signal that when evaluated, their value will be treated + * as a function and immediately invoked, e.g. {@code foo()}, {@code foo.bar()} or {@code foo[bar]()}. Used to customize + * the priority of composite dynamic operations when emitting {@code INVOKEDYNAMIC} instructions that implement them, + * namely prioritize {@code getMethod} over {@code getElem} or {@code getProp}. An access or ident node with isFunction + * set to true will be emitted as {@code dyn:getMethod|getProp|getElem} while one with it set to false will be emitted + * as {@code dyn:getProp|getElem|getMethod}. Similarly, an index node with isFunction set to true will be emitted as + * {@code dyn:getMethod|getElem|getProp} while the one set to false will be emitted as {@code dyn:getElem|getProp|getMethod}. */ public interface FunctionCall { /** - * Return true if this function call implementor is a function - * - * @return true if implements a function call + * Returns true if the value of this expression will be treated as a function and immediately invoked. + * @return true if the value of this expression will be treated as a function and immediately invoked. */ public boolean isFunction(); } |