pub enum Expr {
Show 23 variants
Const(ConstVal),
Local {
var: u32,
ty: TypeRef,
},
This,
New {
cls: String,
ty: TypeRef,
args: Vec<Expr>,
raw: bool,
},
NewArray {
elem: TypeRef,
dims: Vec<Expr>,
trailing_dims: u8,
init: Option<Vec<Expr>>,
},
NewMultiArray {
ty: TypeRef,
dims: Vec<Expr>,
},
Field {
owner: Option<Box<Expr>>,
cls: String,
name: String,
ty: TypeRef,
is_static: bool,
},
Method {
owner: Option<Box<Expr>>,
cls: String,
name: String,
desc: MethodDescriptor,
args: Vec<Expr>,
is_static: bool,
is_interface: bool,
is_special: bool,
is_super: bool,
is_dynamic: bool,
type_args: Vec<String>,
},
ArrayIndex {
array: Box<Expr>,
index: Box<Expr>,
},
Cast {
ty: TypeRef,
e: Box<Expr>,
},
InstanceOf {
e: Box<Expr>,
ty: TypeRef,
},
Un {
op: UnOp,
e: Box<Expr>,
},
Bin {
op: BinOp,
l: Box<Expr>,
r: Box<Expr>,
ty: Option<TypeRef>,
},
Cond {
c: Box<Expr>,
t: Box<Expr>,
f: Box<Expr>,
},
Assign {
target: Box<Expr>,
op: AssignOp,
value: Box<Expr>,
},
PreIncDec {
e: Box<Expr>,
delta: i64,
wide: bool,
},
PostIncDec {
e: Box<Expr>,
delta: i64,
wide: bool,
},
Lambda(Box<LambdaExpr>),
StringConcat(Vec<ConcatPart>),
Raw(String),
RawT(String, TypeRef),
Invokedynamic {
name: String,
desc: MethodDescriptor,
args: Vec<Expr>,
bsm_text: String,
bsm_static_args: Vec<BsmArg>,
},
AnonNew {
cls: String,
base: TypeRef,
args: Vec<Expr>,
body: String,
},
}Variants§
Const(ConstVal)
Local
Local variable by VarId, with its declared type (needed for category-1 vs category-2 stack operations like dup2/pop2).
This
New
new T(args) (constructor call folded with New when possible).
Fields
NewArray
Array creation: new int[n], new int[]{...}, new int[a][b][].
Fields
NewMultiArray
Multi-dimensional array creation multianewarray.
Field
Fields
Method
Fields
desc: MethodDescriptorArrayIndex
Cast
InstanceOf
Un
Bin
Fields
Cond
Assign
PreIncDec
++x / --x (delta = +1 / -1)
PostIncDec
x++ / x--
Lambda(Box<LambdaExpr>)
StringConcat(Vec<ConcatPart>)
String concatenation via StringConcatFactory recipe.
Raw(String)
Pre-rendered source fragment (used for captured expressions that are substituted across method contexts).
RawT(String, TypeRef)
Pre-rendered capture text WITH the captured local’s declared type: comparisons inside local-class bodies need the operand’s generic type to drive witnesses (erased val$ field types cannot).
Invokedynamic
Unrecognized invokedynamic fallback.
Fields
desc: MethodDescriptorAnonNew
new Anon(args) { ...class body... } — anonymous class instantiation.