public class StaticTypesBinaryExpressionMultiTypeDispatcher
extends BinaryExpressionMultiTypeDispatcher
A specialized version of the multi type binary expression dispatcher which is aware of static compilation. It is able to generate optimized bytecode for some operations using JVM instructions when available.
| Fields inherited from class | Fields |
|---|---|
class BinaryExpressionMultiTypeDispatcher |
binExpWriter, typeMap, typeMapKeyNames |
class BinaryExpressionHelper |
controller |
| Constructor and description |
|---|
StaticTypesBinaryExpressionMultiTypeDispatcher(WriterController wc)Creates a binary-expression dispatcher for statically compiled bytecode generation. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
assignToArray(Expression enclosing, Expression receiver, Expression subscript, Expression rhsValueLoader, boolean safe)* * Emits an array-style assignment using the dynamic putAt protocol.
*
*
|
|
protected void |
evaluateBinaryExpressionWithAssignment(String method, BinaryExpression expression)* * Evaluates an operator-assignment expression such as +=.
*
*
|
|
protected void |
evaluateCompoundAssign(String assignName, String baseName, BinaryExpression expression)* * GEP-15: dynamic-mode compound-assign codegen. Routes through * ScriptBytecodeAdapter.compoundAssign * which dispatches to assignName when the receiver responds to it,
* and falls back to baseName otherwise. The caller stores the helper's
* return value into the LHS — for the in-place branch this is a no-op store
* of the receiver back to itself; for the fallback branch it is the usual
* "x = x.op(y)" assignment.
|
|
public void |
evaluateEqual(BinaryExpression expression, boolean defineVariable)* Evaluates an assignment expression. * *
|
|
protected void |
writePostOrPrefixMethod(int op, String method, Expression expression, Expression orig)* * Emits the method call used to implement a prefix or postfix operation. * *
|
Creates a binary-expression dispatcher for statically compiled bytecode generation.
*
* Emits an array-style assignment using the dynamic putAt protocol.
*
*
parent - the original assignment expression
*receiver - the array or indexable receiver
*index - the subscript expression
*rhsValueLoader - an expression that reloads the right-hand value
*safe - whether the receiver access is null-safe
*
* Evaluates an operator-assignment expression such as +=.
*
*
method - the operator method name
*expression - the assignment expression
*
* GEP-15: dynamic-mode compound-assign codegen. Routes through
* ScriptBytecodeAdapter.compoundAssign
* which dispatches to assignName when the receiver responds to it,
* and falls back to baseName otherwise. The caller stores the helper's
* return value into the LHS — for the in-place branch this is a no-op store
* of the receiver back to itself; for the fallback branch it is the usual
* "x = x.op(y)" assignment.
* Evaluates an assignment expression. * *
expression - the assignment expression
*defineVariable - whether the left-hand side declares a new variable* * Emits the method call used to implement a prefix or postfix operation. * *
op - the token type
*method - the helper method name
*expression - the receiver expression
*orig - the original prefix/postfix expressionCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.