public static class Compiler.CaseExpr extends java.lang.Object implements Compiler.Expr, Compiler.MaybePrimitiveExpr
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Compiler.CaseExpr.Parser |
Modifier and Type | Field and Description |
---|---|
int |
column |
(package private) static Keyword |
compactKey |
Compiler.Expr |
defaultExpr |
(package private) static Method |
equivMethod |
Compiler.LocalBindingExpr |
expr |
(package private) static Method |
hashCodeMethod |
(package private) static Keyword |
hashEquivKey |
(package private) static Keyword |
hashIdentityKey |
(package private) static Method |
hashMethod |
int |
high |
(package private) static Keyword |
intKey |
(package private) static Method |
intValueMethod |
int |
line |
int |
low |
int |
mask |
(package private) static Type |
NUMBER_TYPE |
java.lang.Class |
returnType |
int |
shift |
java.util.Set<java.lang.Integer> |
skipCheck |
(package private) static Keyword |
sparseKey |
Keyword |
switchType |
java.util.SortedMap<java.lang.Integer,Compiler.Expr> |
tests |
Keyword |
testType |
java.util.HashMap<java.lang.Integer,Compiler.Expr> |
thens |
Constructor and Description |
---|
Compiler.CaseExpr(int line,
int column,
Compiler.LocalBindingExpr expr,
int shift,
int mask,
int low,
int high,
Compiler.Expr defaultExpr,
java.util.SortedMap<java.lang.Integer,Compiler.Expr> tests,
java.util.HashMap<java.lang.Integer,Compiler.Expr> thens,
Keyword switchType,
Keyword testType,
java.util.Set<java.lang.Integer> skipCheck) |
Modifier and Type | Method and Description |
---|---|
boolean |
canEmitPrimitive() |
void |
doEmit(Compiler.C context,
Compiler.ObjExpr objx,
GeneratorAdapter gen,
boolean emitUnboxed) |
void |
emit(Compiler.C context,
Compiler.ObjExpr objx,
GeneratorAdapter gen) |
private static void |
emitExpr(Compiler.ObjExpr objx,
GeneratorAdapter gen,
Compiler.Expr expr,
boolean emitUnboxed) |
private void |
emitExprForHashes(Compiler.ObjExpr objx,
GeneratorAdapter gen) |
private void |
emitExprForInts(Compiler.ObjExpr objx,
GeneratorAdapter gen,
Type exprType,
Label defaultLabel) |
private void |
emitShiftMask(GeneratorAdapter gen) |
private void |
emitThenForHashes(Compiler.ObjExpr objx,
GeneratorAdapter gen,
Compiler.Expr test,
Compiler.Expr then,
Label defaultLabel,
boolean emitUnboxed) |
private void |
emitThenForInts(Compiler.ObjExpr objx,
GeneratorAdapter gen,
Type exprType,
Compiler.Expr test,
Compiler.Expr then,
Label defaultLabel,
boolean emitUnboxed) |
void |
emitUnboxed(Compiler.C context,
Compiler.ObjExpr objx,
GeneratorAdapter gen) |
java.lang.Object |
eval() |
java.lang.Class |
getJavaClass() |
boolean |
hasJavaClass() |
private boolean |
isShiftMasked() |
public final Compiler.LocalBindingExpr expr
public final int shift
public final int mask
public final int low
public final int high
public final Compiler.Expr defaultExpr
public final java.util.SortedMap<java.lang.Integer,Compiler.Expr> tests
public final java.util.HashMap<java.lang.Integer,Compiler.Expr> thens
public final Keyword switchType
public final Keyword testType
public final java.util.Set<java.lang.Integer> skipCheck
public final java.lang.Class returnType
public final int line
public final int column
static final Type NUMBER_TYPE
static final Method intValueMethod
static final Method hashMethod
static final Method hashCodeMethod
static final Method equivMethod
static final Keyword compactKey
static final Keyword sparseKey
static final Keyword hashIdentityKey
static final Keyword hashEquivKey
static final Keyword intKey
public Compiler.CaseExpr(int line, int column, Compiler.LocalBindingExpr expr, int shift, int mask, int low, int high, Compiler.Expr defaultExpr, java.util.SortedMap<java.lang.Integer,Compiler.Expr> tests, java.util.HashMap<java.lang.Integer,Compiler.Expr> thens, Keyword switchType, Keyword testType, java.util.Set<java.lang.Integer> skipCheck)
public boolean hasJavaClass()
hasJavaClass
in interface Compiler.Expr
public boolean canEmitPrimitive()
canEmitPrimitive
in interface Compiler.MaybePrimitiveExpr
public java.lang.Class getJavaClass()
getJavaClass
in interface Compiler.Expr
public java.lang.Object eval()
eval
in interface Compiler.Expr
public void emit(Compiler.C context, Compiler.ObjExpr objx, GeneratorAdapter gen)
emit
in interface Compiler.Expr
public void emitUnboxed(Compiler.C context, Compiler.ObjExpr objx, GeneratorAdapter gen)
emitUnboxed
in interface Compiler.MaybePrimitiveExpr
public void doEmit(Compiler.C context, Compiler.ObjExpr objx, GeneratorAdapter gen, boolean emitUnboxed)
private boolean isShiftMasked()
private void emitShiftMask(GeneratorAdapter gen)
private void emitExprForInts(Compiler.ObjExpr objx, GeneratorAdapter gen, Type exprType, Label defaultLabel)
private void emitThenForInts(Compiler.ObjExpr objx, GeneratorAdapter gen, Type exprType, Compiler.Expr test, Compiler.Expr then, Label defaultLabel, boolean emitUnboxed)
private void emitExprForHashes(Compiler.ObjExpr objx, GeneratorAdapter gen)
private void emitThenForHashes(Compiler.ObjExpr objx, GeneratorAdapter gen, Compiler.Expr test, Compiler.Expr then, Label defaultLabel, boolean emitUnboxed)
private static void emitExpr(Compiler.ObjExpr objx, GeneratorAdapter gen, Compiler.Expr expr, boolean emitUnboxed)