Wed, 20 Aug 2014 10:26:01 +0200
8027043: Turn global accesses into MethodHandle.constant, with one chance of reassignment, e.g. x = value occuring once in the global scope is ok, twice is not.
8027958: NASHORN TEST: Create tests to test markdown javascript engine work with Nashorn
8028345: Remove nashorn repo "bin" scripts to avoid confusion with JDK bin launcher programs
8029090: Developers should be able to pass nashorn properties and enable/disable JFR from command line
8030169: Need regression test for bug JDK-8010731
8033105: Make sure Nashorn test harness can run zlib benchmark
8033334: Make sure that scope depth information is maintained in the RecompilableScriptFunctionDatas, to avoid unnecessary slow proto linkage when doing on demand compilation
8034206: Make parts of code pipeline reusable in order to facilitate faster warmup and faster lazy compilation.
8035820: Optimistic recompilation
8035836: Array performance improvements
8036127: Prototype filter needs to be applied to getter guard as well, not just getter
8036986: Test should check that correctly type is returned running with optimistic. If optimistic assumption was wrong we should get the right one.
8037086: Check that deoptimizing recompilations are correct
8037177: -Dnashorn.optimistic should be enabled by default, meaning that it has to be explicitly set to false to run with the jdk 8 style conservative types
8037534: Use scope types to determine optimistic types
8037572: Add more test cases to check static types
8037967: Broke the build, by commiting without saving the last review comment
8038223: Symbol trace debug output takes time
8038396: fix for the compiler expression evaluator to be more inquisitive about types
8038398: OptimisticRecompilationTest fails on staging repo nashorn/jdk9/nashorn due to test framework
8038406: Testability: as a first step of moving loggers away from the process global space, the Debug object now supports logging POJOs from log entries as an event queue, which can be introspected from test scripts. This is way better than screen scraping brittle and subject-to-change log output.
8038413: NPE in unboxInteger
8038416: Access to undefined scoped variables deoptimized too much
8038426: Move all loggers from process wide scope into Global scope
8038799: Guard and unbox boxed primitives types on setting them in Properties to avoid megamorphisism
8038945: Simplify strict undefined checks
8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
8039746: Transform applies to calls wherever possible, for ScriptFunctions and JSObjects.
8040024: BranchOptimizer produces bad code for NaN FP comparison
8040089: Apply to call transform was incomplete. Now passes all tests and performance is back
8040093: Make sure that optimistic splitting works in optimistic types
8040102: Remove all references to Unsafe and definition of anonymous clases from the code
8040655: When processing a RewriteException debug object, the return value has already been reset to null. We need to catch this value before that.
8041434: Add synchronization to the common global constants structure
8041625: AccessorProperty currentType must only by Object.class when non-primitive, and scoping followup problem for lazily generated with bodies
8041905: Fix apply2call bug that prevented avatar.js unit tests from running correctly
8041995: Problems when loading tree expressions with several optimistic program points when optimistically initializing ObjectNodes
8042118: Separate types from symbols
8043002: Improve performance of Nashorn equality operators
8043003: Use strongly referenced generic invokers
8043004: Reduce variability at JavaAdapter call sites
8043132: Nashorn : all tests failed with java.security.AccessControlException
8043133: Fix corner cases of JDK-8041995
8043137: Collapse long sequences of NOP in Nashorn bytecode output
8043232: Index selection of overloaded java new constructors
8043235: Type-based optimizations interfere with continuation methods
8043431: Fix yet another corner case of JDK-8041995
8043504: Octane test harness was missing argument to print_always at one callsite, causing erroneous logging
8043605: Enable history for empty property maps
8043608: Make equality tests inline better
8043611: Move timing dependent benchmark for apply2call specialization to currently_failing. It is dependent that nothing takes machine time when doing the two runs, causing spurious assertions. Suggest running octane.raytrace manually instead to verify that this works, or incorporating it in the nightly test suite
8043632: Parallelize class installation and various script fixes.
8043633: In order to remove global state outside of contexts, make sure Timing class is an instance and not a static global collection of data. Move into Context. Move -Dnashorn.timing to an official logging option.
8043956: Make code caching work with optimistic typing and lazy compilation
8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
8044154: Nashorn : all tests failed with java.security.AccessControlException
8044171: Make optimistic exception handlers smaller
8044502: Get rid of global optimistic flag
8044518: Ensure exceptions related to optimistic recompilation are not serializable
8044533: Deoptimizing negation produces wrong result for zero
8044534: Constant folding for unary + should produce int for boolean literals
8044760: Avoid PropertyMap duplicate for global instances
8044786: Some tests fail with non-optimistic compilation
8044803: Unnecessary restOf check
8044816: On-demand compiled top-level program doesn't need :createProgramFunction
8044851: nashorn properties leak memory
8046013: TypeError: Cannot apply "with" to non script object
8046014: MultiGlobalCompiledScript should cache :createProgramFunction handle
8046025: AccessorProperty.getGetter is not threadsafe
8046026: CompiledFunction.relinkComposableInvoker assert is being hit
8046201: Avoid repeated flattening of nested ConsStrings
8046215: Running uncompilable scripts throws NullPointerException
8046898: Make sure that lazy compilation is the default, remove redundant "enable lazy compilation" flags, added warning message if compile logging is enabled and lazy is switched off. Verified existing test suite code coverage equivalence between lazy and eager.
8046905: apply on apply is broken
8046921: Deoptimization type information peristence
8047035: (function() "hello")() crashes in Lexer with jdk9
8047057: Add a regression test for the passing test cases from JDK-8042304
8047067: all eval arguments need to be copied in Lower
8047078: Fuzzing bug discovered when ArrayLiteralNodes weren't immutable
8047166: 'do with({}) break ; while(0);' crashes in CodeGenerator
8047331: Assertion in CompiledFunction when running earley-boyer after Merge
8047357: More precise synthetic return + unreachable throw
8047359: large string size RangeError should be thrown rather than reporting negative length
8047369: Add regression tests for passing test cases of JDK-8024971
8047371: local variable declaration in TypeEvaluator should use ScriptObject.addOwnProperty instead of .set
8047728: (function(x){var o={x:0}; with(o){delete x} return o.x})() evaluates to 0 instead of undefined
8047959: bindings created for declarations in eval code are not mutable
8048009: Type info caching accidentally defeated
8048071: eval within 'with' statement does not use correct scope if with scope expression has a copy of eval
8048079: Persistent code store is broken after optimistic types merge
8048505: ScriptingFunctions.readFully couldn't handle file names represented as ConsStrings
8048586: String concatenation with optimistic types is slow
8048718: JSON.parse('{"0":0, "64":0}') throws ArrayindexOutOfBoundsException
8048869: Reduce compile time by about 5% by removing the Class.casts from the AST nodes
8049086: Minor API convenience functions on "Java" object
8049222: JSType class exposes public mutable arrays
8049223: RewriteException class exposes public mutable arrays
8049242: Explicit constructor overload selection should work with StaticClass as well
8049318: Test hideLocationProperties.js fails on Window due to backslash in path
8049524: Global object initialization via javax.script API should be minimal
8050432: javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings
8050964: OptimisticTypesPersistence.java should use java.util.Date instead of java.sql.Date
8051019: Separate src and test execution sandbox directories
8051346: Test262 tests for ECMAScript 5 now in branch "es5-tests"
8051439: Wrong type calculated for ADD operator with undefined operand
8051839: GuardedInvocation needs to clone an argument
8053908: jdeps is not PATH on Mac, results in ant clean test failure on Mac
8053910: ScriptObjectMirror causing havoc with Invocation interface
8053913: Auto format caused warning in CompositeTypeBasedGuardingDynamicLinker
8054223: Nashorn: AssertionError when use __DIR__ and ScriptEngine.eval()
8054411: Add nashorn.args.prepend system property
8054503: test/script/external/test262/test/suite/ch12/12.6/12.6.4/12.6.4-2.js fails with tip
8054651: Global.initConstructor and ScriptFunction.getPrototype(Object) can have stricter types
8054898: Avoid creation of empty type info files
8054993: type info cache may be disabled for test262 and tests explicitly changing that property should use @fork
8055034: jjs exits interactive mode if exception was thrown when trying to print value of last evaluated expression
8055042: Compile-time expression evaluator was missing variables
8055107: Extension directives to turn on callsite profiling, tracing, AST print and other debug features locally
8055139: test/script/trusted/JDK-8055107.js fails with access control exception
8055186: Backport Nashorn optimistic typing to 8u repository
8055529: Clean up the bin directory
Reviewed-by: jlaskey, lagergren, sundar
Contributed-by: marcus.largergren@oracle.com, hannes.wallnoefer@oracle.com, sundararajan.athijegannathan@oracle.com
1 /*
2 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 package jdk.nashorn.internal.ir.visitor;
28 import jdk.nashorn.internal.ir.BinaryNode;
29 import jdk.nashorn.internal.ir.LexicalContext;
30 import jdk.nashorn.internal.ir.Node;
31 import jdk.nashorn.internal.ir.UnaryNode;
33 /**
34 * Like NodeVisitor but navigating further into operators.
35 * @param <T> Lexical context class for this NodeOperatorVisitor
36 */
37 public class NodeOperatorVisitor<T extends LexicalContext> extends NodeVisitor<T> {
38 /**
39 * Constructor
40 *
41 * @param lc a custom lexical context
42 */
43 public NodeOperatorVisitor(final T lc) {
44 super(lc);
45 }
47 @Override
48 public final boolean enterUnaryNode(final UnaryNode unaryNode) {
49 switch (unaryNode.tokenType()) {
50 case ADD:
51 return enterADD(unaryNode);
52 case BIT_NOT:
53 return enterBIT_NOT(unaryNode);
54 case DELETE:
55 return enterDELETE(unaryNode);
56 case NEW:
57 return enterNEW(unaryNode);
58 case NOT:
59 return enterNOT(unaryNode);
60 case SUB:
61 return enterSUB(unaryNode);
62 case TYPEOF:
63 return enterTYPEOF(unaryNode);
64 case VOID:
65 return enterVOID(unaryNode);
66 case DECPREFIX:
67 case DECPOSTFIX:
68 case INCPREFIX:
69 case INCPOSTFIX:
70 return enterDECINC(unaryNode);
71 default:
72 return super.enterUnaryNode(unaryNode);
73 }
74 }
76 @Override
77 public final Node leaveUnaryNode(final UnaryNode unaryNode) {
78 switch (unaryNode.tokenType()) {
79 case ADD:
80 return leaveADD(unaryNode);
81 case BIT_NOT:
82 return leaveBIT_NOT(unaryNode);
83 case DELETE:
84 return leaveDELETE(unaryNode);
85 case NEW:
86 return leaveNEW(unaryNode);
87 case NOT:
88 return leaveNOT(unaryNode);
89 case SUB:
90 return leaveSUB(unaryNode);
91 case TYPEOF:
92 return leaveTYPEOF(unaryNode);
93 case VOID:
94 return leaveVOID(unaryNode);
95 case DECPREFIX:
96 case DECPOSTFIX:
97 case INCPREFIX:
98 case INCPOSTFIX:
99 return leaveDECINC(unaryNode);
100 default:
101 return super.leaveUnaryNode(unaryNode);
102 }
103 }
105 @Override
106 public final boolean enterBinaryNode(final BinaryNode binaryNode) {
107 switch (binaryNode.tokenType()) {
108 case ADD:
109 return enterADD(binaryNode);
110 case AND:
111 return enterAND(binaryNode);
112 case ASSIGN:
113 return enterASSIGN(binaryNode);
114 case ASSIGN_ADD:
115 return enterASSIGN_ADD(binaryNode);
116 case ASSIGN_BIT_AND:
117 return enterASSIGN_BIT_AND(binaryNode);
118 case ASSIGN_BIT_OR:
119 return enterASSIGN_BIT_OR(binaryNode);
120 case ASSIGN_BIT_XOR:
121 return enterASSIGN_BIT_XOR(binaryNode);
122 case ASSIGN_DIV:
123 return enterASSIGN_DIV(binaryNode);
124 case ASSIGN_MOD:
125 return enterASSIGN_MOD(binaryNode);
126 case ASSIGN_MUL:
127 return enterASSIGN_MUL(binaryNode);
128 case ASSIGN_SAR:
129 return enterASSIGN_SAR(binaryNode);
130 case ASSIGN_SHL:
131 return enterASSIGN_SHL(binaryNode);
132 case ASSIGN_SHR:
133 return enterASSIGN_SHR(binaryNode);
134 case ASSIGN_SUB:
135 return enterASSIGN_SUB(binaryNode);
136 case BIND:
137 return enterBIND(binaryNode);
138 case BIT_AND:
139 return enterBIT_AND(binaryNode);
140 case BIT_OR:
141 return enterBIT_OR(binaryNode);
142 case BIT_XOR:
143 return enterBIT_XOR(binaryNode);
144 case COMMARIGHT:
145 return enterCOMMARIGHT(binaryNode);
146 case COMMALEFT:
147 return enterCOMMALEFT(binaryNode);
148 case DIV:
149 return enterDIV(binaryNode);
150 case EQ:
151 return enterEQ(binaryNode);
152 case EQ_STRICT:
153 return enterEQ_STRICT(binaryNode);
154 case GE:
155 return enterGE(binaryNode);
156 case GT:
157 return enterGT(binaryNode);
158 case IN:
159 return enterIN(binaryNode);
160 case INSTANCEOF:
161 return enterINSTANCEOF(binaryNode);
162 case LE:
163 return enterLE(binaryNode);
164 case LT:
165 return enterLT(binaryNode);
166 case MOD:
167 return enterMOD(binaryNode);
168 case MUL:
169 return enterMUL(binaryNode);
170 case NE:
171 return enterNE(binaryNode);
172 case NE_STRICT:
173 return enterNE_STRICT(binaryNode);
174 case OR:
175 return enterOR(binaryNode);
176 case SAR:
177 return enterSAR(binaryNode);
178 case SHL:
179 return enterSHL(binaryNode);
180 case SHR:
181 return enterSHR(binaryNode);
182 case SUB:
183 return enterSUB(binaryNode);
184 default:
185 return super.enterBinaryNode(binaryNode);
186 }
187 }
189 @Override
190 public final Node leaveBinaryNode(final BinaryNode binaryNode) {
191 switch (binaryNode.tokenType()) {
192 case ADD:
193 return leaveADD(binaryNode);
194 case AND:
195 return leaveAND(binaryNode);
196 case ASSIGN:
197 return leaveASSIGN(binaryNode);
198 case ASSIGN_ADD:
199 return leaveASSIGN_ADD(binaryNode);
200 case ASSIGN_BIT_AND:
201 return leaveASSIGN_BIT_AND(binaryNode);
202 case ASSIGN_BIT_OR:
203 return leaveASSIGN_BIT_OR(binaryNode);
204 case ASSIGN_BIT_XOR:
205 return leaveASSIGN_BIT_XOR(binaryNode);
206 case ASSIGN_DIV:
207 return leaveASSIGN_DIV(binaryNode);
208 case ASSIGN_MOD:
209 return leaveASSIGN_MOD(binaryNode);
210 case ASSIGN_MUL:
211 return leaveASSIGN_MUL(binaryNode);
212 case ASSIGN_SAR:
213 return leaveASSIGN_SAR(binaryNode);
214 case ASSIGN_SHL:
215 return leaveASSIGN_SHL(binaryNode);
216 case ASSIGN_SHR:
217 return leaveASSIGN_SHR(binaryNode);
218 case ASSIGN_SUB:
219 return leaveASSIGN_SUB(binaryNode);
220 case BIND:
221 return leaveBIND(binaryNode);
222 case BIT_AND:
223 return leaveBIT_AND(binaryNode);
224 case BIT_OR:
225 return leaveBIT_OR(binaryNode);
226 case BIT_XOR:
227 return leaveBIT_XOR(binaryNode);
228 case COMMARIGHT:
229 return leaveCOMMARIGHT(binaryNode);
230 case COMMALEFT:
231 return leaveCOMMALEFT(binaryNode);
232 case DIV:
233 return leaveDIV(binaryNode);
234 case EQ:
235 return leaveEQ(binaryNode);
236 case EQ_STRICT:
237 return leaveEQ_STRICT(binaryNode);
238 case GE:
239 return leaveGE(binaryNode);
240 case GT:
241 return leaveGT(binaryNode);
242 case IN:
243 return leaveIN(binaryNode);
244 case INSTANCEOF:
245 return leaveINSTANCEOF(binaryNode);
246 case LE:
247 return leaveLE(binaryNode);
248 case LT:
249 return leaveLT(binaryNode);
250 case MOD:
251 return leaveMOD(binaryNode);
252 case MUL:
253 return leaveMUL(binaryNode);
254 case NE:
255 return leaveNE(binaryNode);
256 case NE_STRICT:
257 return leaveNE_STRICT(binaryNode);
258 case OR:
259 return leaveOR(binaryNode);
260 case SAR:
261 return leaveSAR(binaryNode);
262 case SHL:
263 return leaveSHL(binaryNode);
264 case SHR:
265 return leaveSHR(binaryNode);
266 case SUB:
267 return leaveSUB(binaryNode);
268 default:
269 return super.leaveBinaryNode(binaryNode);
270 }
271 }
273 /*
274 * Unary entries and exists.
275 */
277 /**
278 * Unary enter - callback for entering a unary +
279 *
280 * @param unaryNode the node
281 * @return true if traversal should continue and node children be traversed, false otherwise
282 */
283 public boolean enterADD(final UnaryNode unaryNode) {
284 return enterDefault(unaryNode);
285 }
287 /**
288 * Unary leave - callback for leaving a unary +
289 *
290 * @param unaryNode the node
291 * @return processed node, which will replace the original one, or the original node
292 */
293 public Node leaveADD(final UnaryNode unaryNode) {
294 return leaveDefault(unaryNode);
295 }
297 /**
298 * Unary enter - callback for entering a ~ operator
299 *
300 * @param unaryNode the node
301 * @return true if traversal should continue and node children be traversed, false otherwise
302 */
303 public boolean enterBIT_NOT(final UnaryNode unaryNode) {
304 return enterDefault(unaryNode);
305 }
307 /**
308 * Unary leave - callback for leaving a unary ~
309 *
310 * @param unaryNode the node
311 * @return processed node, which will replace the original one, or the original node
312 */
313 public Node leaveBIT_NOT(final UnaryNode unaryNode) {
314 return leaveDefault(unaryNode);
315 }
317 /**
318 * Unary enter - callback for entering a ++ or -- operator
319 *
320 * @param unaryNode the node
321 * @return true if traversal should continue and node children be traversed, false otherwise
322 */
323 public boolean enterDECINC(final UnaryNode unaryNode) {
324 return enterDefault(unaryNode);
325 }
327 /**
328 * Unary leave - callback for leaving a ++ or -- operator
329 *
330 * @param unaryNode the node
331 * @return processed node, which will replace the original one, or the original node
332 */
333 public Node leaveDECINC(final UnaryNode unaryNode) {
334 return leaveDefault(unaryNode);
335 }
337 /**
338 * Unary enter - callback for entering a delete operator
339 *
340 * @param unaryNode the node
341 * @return processed node
342 */
343 public boolean enterDELETE(final UnaryNode unaryNode) {
344 return enterDefault(unaryNode);
345 }
347 /**
348 * Unary leave - callback for leaving a delete operator
349 *
350 * @param unaryNode the node
351 * @return processed node, which will replace the original one, or the original node
352 */
353 public Node leaveDELETE(final UnaryNode unaryNode) {
354 return leaveDefault(unaryNode);
355 }
357 /**
358 * Unary enter - callback for entering a new operator
359 *
360 * @param unaryNode the node
361 * @return true if traversal should continue and node children be traversed, false otherwise
362 */
363 public boolean enterNEW(final UnaryNode unaryNode) {
364 return enterDefault(unaryNode);
365 }
367 /**
368 * Unary leave - callback for leaving a new operator
369 *
370 * @param unaryNode the node
371 * @return processed node, which will replace the original one, or the original node
372 */
373 public Node leaveNEW(final UnaryNode unaryNode) {
374 return leaveDefault(unaryNode);
375 }
377 /**
378 * Unary enter - callback for entering a ! operator
379 *
380 * @param unaryNode the node
381 * @return true if traversal should continue and node children be traversed, false otherwise
382 */
383 public boolean enterNOT(final UnaryNode unaryNode) {
384 return enterDefault(unaryNode);
385 }
387 /**
388 * Unary leave - callback for leaving a ! operator
389 *
390 * @param unaryNode the node
391 * @return processed node, which will replace the original one, or the original node
392 */
393 public Node leaveNOT(final UnaryNode unaryNode) {
394 return leaveDefault(unaryNode);
395 }
397 /**
398 * Unary enter - callback for entering a unary -
399 *
400 * @param unaryNode the node
401 * @return true if traversal should continue and node children be traversed, false otherwise
402 */
403 public boolean enterSUB(final UnaryNode unaryNode) {
404 return enterDefault(unaryNode);
405 }
407 /**
408 * Unary leave - callback for leaving a unary -
409 *
410 * @param unaryNode the node
411 * @return processed node, which will replace the original one, or the original node
412 */
413 public Node leaveSUB(final UnaryNode unaryNode) {
414 return leaveDefault(unaryNode);
415 }
417 /**
418 * Unary enter - callback for entering a typeof
419 *
420 * @param unaryNode the node
421 * @return true if traversal should continue and node children be traversed, false otherwise
422 */
423 public boolean enterTYPEOF(final UnaryNode unaryNode) {
424 return enterDefault(unaryNode);
425 }
427 /**
428 * Unary leave - callback for leaving a typeof operator
429 *
430 * @param unaryNode the node
431 * @return processed node, which will replace the original one, or the original node
432 */
433 public Node leaveTYPEOF(final UnaryNode unaryNode) {
434 return leaveDefault(unaryNode);
435 }
437 /**
438 * Unary enter - callback for entering a void
439 *
440 * @param unaryNode the node
441 * @return true if traversal should continue and node children be traversed, false otherwise
442 */
443 public boolean enterVOID(final UnaryNode unaryNode) {
444 return enterDefault(unaryNode);
445 }
447 /**
448 * Unary leave - callback for leaving a void
449 *
450 * @param unaryNode the node
451 * @return processed node, which will replace the original one, or the original node
452 */
453 public Node leaveVOID(final UnaryNode unaryNode) {
454 return leaveDefault(unaryNode);
455 }
457 /**
458 * Binary enter - callback for entering + operator
459 *
460 * @param binaryNode the node
461 * @return true if traversal should continue and node children be traversed, false otherwise
462 */
463 public boolean enterADD(final BinaryNode binaryNode) {
464 return enterDefault(binaryNode);
465 }
467 /**
468 * Binary leave - callback for leaving a + operator
469 *
470 * @param binaryNode the node
471 * @return processed node, which will replace the original one, or the original node
472 */
473 public Node leaveADD(final BinaryNode binaryNode) {
474 return leaveDefault(binaryNode);
475 }
477 /**
478 * Binary enter - callback for entering {@literal &&} operator
479 *
480 * @param binaryNode the node
481 * @return true if traversal should continue and node children be traversed, false otherwise
482 */
483 public boolean enterAND(final BinaryNode binaryNode) {
484 return enterDefault(binaryNode);
485 }
487 /**
488 * Binary leave - callback for leaving a {@literal &&} operator
489 *
490 * @param binaryNode the node
491 * @return processed node, which will replace the original one, or the original node
492 */
493 public Node leaveAND(final BinaryNode binaryNode) {
494 return leaveDefault(binaryNode);
495 }
497 /**
498 * Binary enter - callback for entering an assignment
499 *
500 * @param binaryNode the node
501 * @return true if traversal should continue and node children be traversed, false otherwise
502 */
503 public boolean enterASSIGN(final BinaryNode binaryNode) {
504 return enterDefault(binaryNode);
505 }
507 /**
508 * Binary leave - callback for leaving an assignment
509 *
510 * @param binaryNode the node
511 * @return processed node, which will replace the original one, or the original node
512 */
513 public Node leaveASSIGN(final BinaryNode binaryNode) {
514 return leaveDefault(binaryNode);
515 }
517 /**
518 * Binary enter - callback for entering += operator
519 *
520 * @param binaryNode the node
521 * @return true if traversal should continue and node children be traversed, false otherwise
522 */
523 public boolean enterASSIGN_ADD(final BinaryNode binaryNode) {
524 return enterDefault(binaryNode);
525 }
527 /**
528 * Binary leave - callback for leaving a += operator
529 *
530 * @param binaryNode the node
531 * @return processed node, which will replace the original one, or the original node
532 */
533 public Node leaveASSIGN_ADD(final BinaryNode binaryNode) {
534 return leaveDefault(binaryNode);
535 }
537 /**
538 * Binary enter - callback for entering {@literal &=} operator
539 *
540 * @param binaryNode the node
541 * @return true if traversal should continue and node children be traversed, false otherwise
542 */
543 public boolean enterASSIGN_BIT_AND(final BinaryNode binaryNode) {
544 return enterDefault(binaryNode);
545 }
547 /**
548 * Binary leave - callback for leaving a {@literal &=} operator
549 *
550 * @param binaryNode the node
551 * @return processed node, which will replace the original one, or the original node
552 */
553 public Node leaveASSIGN_BIT_AND(final BinaryNode binaryNode) {
554 return leaveDefault(binaryNode);
555 }
557 /**
558 * Binary enter - callback for entering |= operator
559 *
560 * @param binaryNode the node
561 * @return true if traversal should continue and node children be traversed, false otherwise
562 */
563 public boolean enterASSIGN_BIT_OR(final BinaryNode binaryNode) {
564 return enterDefault(binaryNode);
565 }
567 /**
568 * Binary leave - callback for leaving a |= operator
569 *
570 * @param binaryNode the node
571 * @return processed node, which will replace the original one, or the original node
572 */
573 public Node leaveASSIGN_BIT_OR(final BinaryNode binaryNode) {
574 return leaveDefault(binaryNode);
575 }
577 /**
578 * Binary enter - callback for entering ^= operator
579 *
580 * @param binaryNode the node
581 * @return true if traversal should continue and node children be traversed, false otherwise
582 */
583 public boolean enterASSIGN_BIT_XOR(final BinaryNode binaryNode) {
584 return enterDefault(binaryNode);
585 }
587 /**
588 * Binary leave - callback for leaving a ^= operator
589 *
590 * @param binaryNode the node
591 * @return processed node, which will replace the original one, or the original node
592 */
593 public Node leaveASSIGN_BIT_XOR(final BinaryNode binaryNode) {
594 return leaveDefault(binaryNode);
595 }
597 /**
598 * Binary enter - callback for entering /= operator
599 *
600 * @param binaryNode the node
601 * @return true if traversal should continue and node children be traversed, false otherwise
602 */
603 public boolean enterASSIGN_DIV(final BinaryNode binaryNode) {
604 return enterDefault(binaryNode);
605 }
607 /**
608 * Binary leave - callback for leaving a /= operator
609 *
610 * @param binaryNode the node
611 * @return processed node, which will replace the original one, or the original node
612 */
613 public Node leaveASSIGN_DIV(final BinaryNode binaryNode) {
614 return leaveDefault(binaryNode);
615 }
617 /**
618 * Binary enter - callback for entering %= operator
619 *
620 * @param binaryNode the node
621 * @return true if traversal should continue and node children be traversed, false otherwise
622 */
623 public boolean enterASSIGN_MOD(final BinaryNode binaryNode) {
624 return enterDefault(binaryNode);
625 }
627 /**
628 * Binary leave - callback for leaving a %= operator
629 *
630 * @param binaryNode the node
631 * @return processed node, which will replace the original one, or the original node
632 */
633 public Node leaveASSIGN_MOD(final BinaryNode binaryNode) {
634 return leaveDefault(binaryNode);
635 }
637 /**
638 * Binary enter - callback for entering *= operator
639 *
640 * @param binaryNode the node
641 * @return true if traversal should continue and node children be traversed, false otherwise
642 */
643 public boolean enterASSIGN_MUL(final BinaryNode binaryNode) {
644 return enterDefault(binaryNode);
645 }
647 /**
648 * Binary leave - callback for leaving a *= operator
649 *
650 * @param binaryNode the node
651 * @return processed node, which will replace the original one, or the original node
652 */
653 public Node leaveASSIGN_MUL(final BinaryNode binaryNode) {
654 return leaveDefault(binaryNode);
655 }
657 /**
658 * Binary enter - callback for entering {@literal >>=} operator
659 *
660 * @param binaryNode the node
661 * @return true if traversal should continue and node children be traversed, false otherwise
662 */
663 public boolean enterASSIGN_SAR(final BinaryNode binaryNode) {
664 return enterDefault(binaryNode);
665 }
667 /**
668 * Binary leave - callback for leaving a {@literal >>=} operator
669 *
670 * @param binaryNode the node
671 * @return processed node, which will replace the original one, or the original node
672 */
673 public Node leaveASSIGN_SAR(final BinaryNode binaryNode) {
674 return leaveDefault(binaryNode);
675 }
677 /**
678 * Binary enter - callback for entering a {@literal <<=} operator
679 *
680 * @param binaryNode the node
681 * @return true if traversal should continue and node children be traversed, false otherwise
682 */
683 public boolean enterASSIGN_SHL(final BinaryNode binaryNode) {
684 return enterDefault(binaryNode);
685 }
687 /**
688 * Binary leave - callback for leaving a {@literal <<=} operator
689 *
690 * @param binaryNode the node
691 * @return processed node, which will replace the original one, or the original node
692 */
693 public Node leaveASSIGN_SHL(final BinaryNode binaryNode) {
694 return leaveDefault(binaryNode);
695 }
697 /**
698 * Binary enter - callback for entering {@literal >>>=} operator
699 *
700 * @param binaryNode the node
701 * @return true if traversal should continue and node children be traversed, false otherwise
702 */
703 public boolean enterASSIGN_SHR(final BinaryNode binaryNode) {
704 return enterDefault(binaryNode);
705 }
707 /**
708 * Binary leave - callback for leaving a {@literal >>>=} operator
709 *
710 * @param binaryNode the node
711 * @return processed node, which will replace the original one, or the original node
712 */
713 public Node leaveASSIGN_SHR(final BinaryNode binaryNode) {
714 return leaveDefault(binaryNode);
715 }
717 /**
718 * Binary enter - callback for entering -= operator
719 *
720 * @param binaryNode the node
721 * @return true if traversal should continue and node children be traversed, false otherwise
722 */
723 public boolean enterASSIGN_SUB(final BinaryNode binaryNode) {
724 return enterDefault(binaryNode);
725 }
727 /**
728 * Binary leave - callback for leaving a -= operator
729 *
730 * @param binaryNode the node
731 * @return processed node, which will replace the original one, or the original node
732 */
733 public Node leaveASSIGN_SUB(final BinaryNode binaryNode) {
734 return leaveDefault(binaryNode);
735 }
737 /**
738 * Binary enter - callback for entering a bind operator
739 *
740 * @param binaryNode the node
741 * @return true if traversal should continue and node children be traversed, false otherwise
742 */
743 public boolean enterBIND(final BinaryNode binaryNode) {
744 return enterDefault(binaryNode);
745 }
747 /**
748 * Binary leave - callback for leaving a bind operator
749 *
750 * @param binaryNode the node
751 * @return processed node, which will replace the original one, or the original node
752 */
753 public Node leaveBIND(final BinaryNode binaryNode) {
754 return leaveDefault(binaryNode);
755 }
757 /**
758 * Binary enter - callback for entering {@literal &} operator
759 *
760 * @param binaryNode the node
761 * @return true if traversal should continue and node children be traversed, false otherwise
762 */
763 public boolean enterBIT_AND(final BinaryNode binaryNode) {
764 return enterDefault(binaryNode);
765 }
767 /**
768 * Binary leave - callback for leaving a {@literal &} operator
769 *
770 * @param binaryNode the node
771 * @return processed node, which will replace the original one, or the original node
772 */
773 public Node leaveBIT_AND(final BinaryNode binaryNode) {
774 return leaveDefault(binaryNode);
775 }
777 /**
778 * Binary enter - callback for entering | operator
779 *
780 * @param binaryNode the node
781 * @return true if traversal should continue and node children be traversed, false otherwise
782 */
783 public boolean enterBIT_OR(final BinaryNode binaryNode) {
784 return enterDefault(binaryNode);
785 }
787 /**
788 * Binary leave - callback for leaving a | operator
789 *
790 * @param binaryNode the node
791 * @return processed node, which will replace the original one, or the original node
792 */
793 public Node leaveBIT_OR(final BinaryNode binaryNode) {
794 return leaveDefault(binaryNode);
795 }
797 /**
798 * Binary enter - callback for entering ^ operator
799 *
800 * @param binaryNode the node
801 * @return true if traversal should continue and node children be traversed, false otherwise
802 */
803 public boolean enterBIT_XOR(final BinaryNode binaryNode) {
804 return enterDefault(binaryNode);
805 }
807 /**
808 * Binary leave - callback for leaving a operator
809 *
810 * @param binaryNode the node
811 * @return processed node, which will replace the original one, or the original node
812 */
813 public Node leaveBIT_XOR(final BinaryNode binaryNode) {
814 return leaveDefault(binaryNode);
815 }
817 /**
818 * Binary enter - callback for entering comma left operator
819 * (a, b) where the result is a
820 *
821 * @param binaryNode the node
822 * @return true if traversal should continue and node children be traversed, false otherwise
823 */
824 public boolean enterCOMMALEFT(final BinaryNode binaryNode) {
825 return enterDefault(binaryNode);
826 }
828 /**
829 * Binary leave - callback for leaving a comma left operator
830 * (a, b) where the result is a
831 *
832 * @param binaryNode the node
833 * @return processed node, which will replace the original one, or the original node
834 */
835 public Node leaveCOMMALEFT(final BinaryNode binaryNode) {
836 return leaveDefault(binaryNode);
837 }
839 /**
840 * Binary enter - callback for entering comma right operator
841 * (a, b) where the result is b
842 *
843 * @param binaryNode the node
844 * @return true if traversal should continue and node children be traversed, false otherwise
845 */
846 public boolean enterCOMMARIGHT(final BinaryNode binaryNode) {
847 return enterDefault(binaryNode);
848 }
850 /**
851 * Binary leave - callback for leaving a comma left operator
852 * (a, b) where the result is b
853 *
854 * @param binaryNode the node
855 * @return processed node, which will replace the original one, or the original node
856 */
857 public Node leaveCOMMARIGHT(final BinaryNode binaryNode) {
858 return leaveDefault(binaryNode);
859 }
861 /**
862 * Binary enter - callback for entering a division
863 *
864 * @param binaryNode the node
865 * @return true if traversal should continue and node children be traversed, false otherwise
866 */
867 public boolean enterDIV(final BinaryNode binaryNode) {
868 return enterDefault(binaryNode);
869 }
871 /**
872 * Binary leave - callback for leaving a division
873 *
874 * @param binaryNode the node
875 * @return processed node, which will replace the original one, or the original node
876 */
877 public Node leaveDIV(final BinaryNode binaryNode) {
878 return leaveDefault(binaryNode);
879 }
881 /**
882 * Binary enter - callback for entering == operator
883 *
884 * @param binaryNode the node
885 * @return true if traversal should continue and node children be traversed, false otherwise
886 */
887 public boolean enterEQ(final BinaryNode binaryNode) {
888 return enterDefault(binaryNode);
889 }
891 /**
892 * Binary leave - callback for leaving == operator
893 *
894 * @param binaryNode the node
895 * @return processed node, which will replace the original one, or the original node
896 */
897 public Node leaveEQ(final BinaryNode binaryNode) {
898 return leaveDefault(binaryNode);
899 }
901 /**
902 * Binary enter - callback for entering === operator
903 *
904 * @param binaryNode the node
905 * @return true if traversal should continue and node children be traversed, false otherwise
906 */
907 public boolean enterEQ_STRICT(final BinaryNode binaryNode) {
908 return enterDefault(binaryNode);
909 }
911 /**
912 * Binary leave - callback for leaving === operator
913 *
914 * @param binaryNode the node
915 * @return processed node, which will replace the original one, or the original node
916 */
917 public Node leaveEQ_STRICT(final BinaryNode binaryNode) {
918 return leaveDefault(binaryNode);
919 }
921 /**
922 * Binary enter - callback for entering {@literal >=} operator
923 *
924 * @param binaryNode the node
925 * @return true if traversal should continue and node children be traversed, false otherwise
926 */
927 public boolean enterGE(final BinaryNode binaryNode) {
928 return enterDefault(binaryNode);
929 }
931 /**
932 * Binary leave - callback for leaving {@literal >=} operator
933 *
934 * @param binaryNode the node
935 * @return processed node, which will replace the original one, or the original node
936 */
937 public Node leaveGE(final BinaryNode binaryNode) {
938 return leaveDefault(binaryNode);
939 }
941 /**
942 * Binary enter - callback for entering {@literal >} operator
943 *
944 * @param binaryNode the node
945 * @return true if traversal should continue and node children be traversed, false otherwise
946 */
947 public boolean enterGT(final BinaryNode binaryNode) {
948 return enterDefault(binaryNode);
949 }
951 /**
952 * Binary leave - callback for leaving {@literal >} operator
953 *
954 * @param binaryNode the node
955 * @return processed node, which will replace the original one, or the original node
956 */
957 public Node leaveGT(final BinaryNode binaryNode) {
958 return leaveDefault(binaryNode);
959 }
961 /**
962 * Binary enter - callback for entering in operator
963 *
964 * @param binaryNode the node
965 * @return true if traversal should continue and node children be traversed, false otherwise
966 */
967 public boolean enterIN(final BinaryNode binaryNode) {
968 return enterDefault(binaryNode);
969 }
971 /**
972 * Binary leave - callback for leaving in operator
973 *
974 * @param binaryNode the node
975 * @return processed node, which will replace the original one, or the original node
976 */
977 public Node leaveIN(final BinaryNode binaryNode) {
978 return leaveDefault(binaryNode);
979 }
981 /**
982 * Binary enter - callback for entering instanceof operator
983 *
984 * @param binaryNode the node
985 * @return true if traversal should continue and node children be traversed, false otherwise
986 */
987 public boolean enterINSTANCEOF(final BinaryNode binaryNode) {
988 return enterDefault(binaryNode);
989 }
991 /**
992 * Binary leave - callback for leaving instanceof operator
993 *
994 * @param binaryNode the node
995 * @return processed node, which will replace the original one, or the original node
996 */
997 public Node leaveINSTANCEOF(final BinaryNode binaryNode) {
998 return leaveDefault(binaryNode);
999 }
1001 /**
1002 * Binary enter - callback for entering {@literal <=} operator
1003 *
1004 * @param binaryNode the node
1005 * @return true if traversal should continue and node children be traversed, false otherwise
1006 */
1007 public boolean enterLE(final BinaryNode binaryNode) {
1008 return enterDefault(binaryNode);
1009 }
1011 /**
1012 * Binary leave - callback for leaving {@literal <=} operator
1013 *
1014 * @param binaryNode the node
1015 * @return processed node, which will replace the original one, or the original node
1016 */
1017 public Node leaveLE(final BinaryNode binaryNode) {
1018 return leaveDefault(binaryNode);
1019 }
1021 /**
1022 * Binary enter - callback for entering {@literal <} operator
1023 *
1024 * @param binaryNode the node
1025 * @return true if traversal should continue and node children be traversed, false otherwise
1026 */
1027 public boolean enterLT(final BinaryNode binaryNode) {
1028 return enterDefault(binaryNode);
1029 }
1031 /**
1032 * Binary leave - callback for leaving {@literal <} operator
1033 *
1034 * @param binaryNode the node
1035 * @return processed node, which will replace the original one, or the original node
1036 */
1037 public Node leaveLT(final BinaryNode binaryNode) {
1038 return leaveDefault(binaryNode);
1039 }
1040 /**
1041 * Binary enter - callback for entering % operator
1042 *
1043 * @param binaryNode the node
1044 * @return true if traversal should continue and node children be traversed, false otherwise
1045 */
1046 public boolean enterMOD(final BinaryNode binaryNode) {
1047 return enterDefault(binaryNode);
1048 }
1050 /**
1051 * Binary leave - callback for leaving % operator
1052 *
1053 * @param binaryNode the node
1054 * @return processed node, which will replace the original one, or the original node
1055 */
1056 public Node leaveMOD(final BinaryNode binaryNode) {
1057 return leaveDefault(binaryNode);
1058 }
1060 /**
1061 * Binary enter - callback for entering * operator
1062 *
1063 * @param binaryNode the node
1064 * @return true if traversal should continue and node children be traversed, false otherwise
1065 */
1066 public boolean enterMUL(final BinaryNode binaryNode) {
1067 return enterDefault(binaryNode);
1068 }
1070 /**
1071 * Binary leave - callback for leaving * operator
1072 *
1073 * @param binaryNode the node
1074 * @return processed node, which will replace the original one, or the original node
1075 */
1076 public Node leaveMUL(final BinaryNode binaryNode) {
1077 return leaveDefault(binaryNode);
1078 }
1080 /**
1081 * Binary enter - callback for entering != operator
1082 *
1083 * @param binaryNode the node
1084 * @return true if traversal should continue and node children be traversed, false otherwise
1085 */
1086 public boolean enterNE(final BinaryNode binaryNode) {
1087 return enterDefault(binaryNode);
1088 }
1090 /**
1091 * Binary leave - callback for leaving != operator
1092 *
1093 * @param binaryNode the node
1094 * @return processed node, which will replace the original one, or the original node
1095 */
1096 public Node leaveNE(final BinaryNode binaryNode) {
1097 return leaveDefault(binaryNode);
1098 }
1100 /**
1101 * Binary enter - callback for entering a !== operator
1102 *
1103 * @param binaryNode the node
1104 * @return true if traversal should continue and node children be traversed, false otherwise
1105 */
1106 public boolean enterNE_STRICT(final BinaryNode binaryNode) {
1107 return enterDefault(binaryNode);
1108 }
1110 /**
1111 * Binary leave - callback for leaving !== operator
1112 *
1113 * @param binaryNode the node
1114 * @return processed node, which will replace the original one, or the original node
1115 */
1116 public Node leaveNE_STRICT(final BinaryNode binaryNode) {
1117 return leaveDefault(binaryNode);
1118 }
1120 /**
1121 * Binary enter - callback for entering || operator
1122 *
1123 * @param binaryNode the node
1124 * @return true if traversal should continue and node children be traversed, false otherwise
1125 */
1126 public boolean enterOR(final BinaryNode binaryNode) {
1127 return enterDefault(binaryNode);
1128 }
1130 /**
1131 * Binary leave - callback for leaving || operator
1132 *
1133 * @param binaryNode the node
1134 * @return processed node, which will replace the original one, or the original node
1135 */
1136 public Node leaveOR(final BinaryNode binaryNode) {
1137 return leaveDefault(binaryNode);
1138 }
1140 /**
1141 * Binary enter - callback for entering {@literal >>} operator
1142 *
1143 * @param binaryNode the node
1144 * @return true if traversal should continue and node children be traversed, false otherwise
1145 */
1146 public boolean enterSAR(final BinaryNode binaryNode) {
1147 return enterDefault(binaryNode);
1148 }
1150 /**
1151 * Binary leave - callback for leaving {@literal >>} operator
1152 *
1153 * @param binaryNode the node
1154 * @return processed node, which will replace the original one, or the original node
1155 */
1156 public Node leaveSAR(final BinaryNode binaryNode) {
1157 return leaveDefault(binaryNode);
1158 }
1160 /**
1161 * Binary enter - callback for entering {@literal <<} operator
1162 *
1163 * @param binaryNode the node
1164 * @return true if traversal should continue and node children be traversed, false otherwise
1165 */
1166 public boolean enterSHL(final BinaryNode binaryNode) {
1167 return enterDefault(binaryNode);
1168 }
1170 /**
1171 * Binary leave - callback for leaving {@literal <<} operator
1172 *
1173 * @param binaryNode the node
1174 * @return processed node, which will replace the original one, or the original node
1175 */
1176 public Node leaveSHL(final BinaryNode binaryNode) {
1177 return leaveDefault(binaryNode);
1178 }
1179 /**
1180 * Binary enter - callback for entering {@literal >>>} operator
1181 *
1182 * @param binaryNode the node
1183 * @return true if traversal should continue and node children be traversed, false otherwise
1184 */
1185 public boolean enterSHR(final BinaryNode binaryNode) {
1186 return enterDefault(binaryNode);
1187 }
1189 /**
1190 * Binary leave - callback for leaving {@literal >>>} operator
1191 *
1192 * @param binaryNode the node
1193 * @return processed node, which will replace the original one, or the original node
1194 */
1195 public Node leaveSHR(final BinaryNode binaryNode) {
1196 return leaveDefault(binaryNode);
1197 }
1199 /**
1200 * Binary enter - callback for entering - operator
1201 *
1202 * @param binaryNode the node
1203 * @return true if traversal should continue and node children be traversed, false otherwise
1204 */
1205 public boolean enterSUB(final BinaryNode binaryNode) {
1206 return enterDefault(binaryNode);
1207 }
1209 /**
1210 * Binary leave - callback for leaving - operator
1211 *
1212 * @param binaryNode the node
1213 * @return processed node, which will replace the original one, or the original node
1214 */
1215 public Node leaveSUB(final BinaryNode binaryNode) {
1216 return leaveDefault(binaryNode);
1217 }
1218 }