pub enum InstructionValue {
Show 43 variants
LoadLocal {
place: Place,
loc: Option<SourceLocation>,
},
LoadContext {
place: Place,
loc: Option<SourceLocation>,
},
DeclareLocal {
lvalue: LValue,
type_annotation: Option<String>,
loc: Option<SourceLocation>,
},
DeclareContext {
lvalue: LValue,
loc: Option<SourceLocation>,
},
StoreLocal {
lvalue: LValue,
value: Place,
type_annotation: Option<String>,
loc: Option<SourceLocation>,
},
StoreContext {
lvalue: LValue,
value: Place,
loc: Option<SourceLocation>,
},
Destructure {
lvalue: LValuePattern,
value: Place,
loc: Option<SourceLocation>,
},
Primitive {
value: PrimitiveValue,
loc: Option<SourceLocation>,
},
JSXText {
value: String,
loc: Option<SourceLocation>,
},
BinaryExpression {
operator: BinaryOperator,
left: Place,
right: Place,
loc: Option<SourceLocation>,
},
NewExpression {
callee: Place,
args: Vec<PlaceOrSpread>,
loc: Option<SourceLocation>,
},
CallExpression {
callee: Place,
args: Vec<PlaceOrSpread>,
loc: Option<SourceLocation>,
},
MethodCall {
receiver: Place,
property: Place,
args: Vec<PlaceOrSpread>,
loc: Option<SourceLocation>,
},
UnaryExpression {
operator: UnaryOperator,
value: Place,
loc: Option<SourceLocation>,
},
TypeCastExpression {
value: Place,
type_: Type,
type_annotation_name: Option<String>,
type_annotation_kind: Option<String>,
type_annotation: Option<Box<Value>>,
loc: Option<SourceLocation>,
},
JsxExpression {
tag: JsxTag,
props: Vec<JsxAttribute>,
children: Option<Vec<Place>>,
loc: Option<SourceLocation>,
opening_loc: Option<SourceLocation>,
closing_loc: Option<SourceLocation>,
},
ObjectExpression {
properties: Vec<ObjectPropertyOrSpread>,
loc: Option<SourceLocation>,
},
ObjectMethod {
loc: Option<SourceLocation>,
lowered_func: LoweredFunction,
},
ArrayExpression {
elements: Vec<ArrayElement>,
loc: Option<SourceLocation>,
},
JsxFragment {
children: Vec<Place>,
loc: Option<SourceLocation>,
},
RegExpLiteral {
pattern: String,
flags: String,
loc: Option<SourceLocation>,
},
MetaProperty {
meta: String,
property: String,
loc: Option<SourceLocation>,
},
PropertyStore {
object: Place,
property: PropertyLiteral,
value: Place,
loc: Option<SourceLocation>,
},
PropertyLoad {
object: Place,
property: PropertyLiteral,
loc: Option<SourceLocation>,
},
PropertyDelete {
object: Place,
property: PropertyLiteral,
loc: Option<SourceLocation>,
},
ComputedStore {
object: Place,
property: Place,
value: Place,
loc: Option<SourceLocation>,
},
ComputedLoad {
object: Place,
property: Place,
loc: Option<SourceLocation>,
},
ComputedDelete {
object: Place,
property: Place,
loc: Option<SourceLocation>,
},
LoadGlobal {
binding: NonLocalBinding,
loc: Option<SourceLocation>,
},
StoreGlobal {
name: String,
value: Place,
loc: Option<SourceLocation>,
},
FunctionExpression {
name: Option<String>,
name_hint: Option<String>,
lowered_func: LoweredFunction,
expr_type: FunctionExpressionType,
loc: Option<SourceLocation>,
},
TaggedTemplateExpression {
tag: Place,
value: TemplateQuasi,
loc: Option<SourceLocation>,
},
TemplateLiteral {
subexprs: Vec<Place>,
quasis: Vec<TemplateQuasi>,
loc: Option<SourceLocation>,
},
Await {
value: Place,
loc: Option<SourceLocation>,
},
GetIterator {
collection: Place,
loc: Option<SourceLocation>,
},
IteratorNext {
iterator: Place,
collection: Place,
loc: Option<SourceLocation>,
},
NextPropertyOf {
value: Place,
loc: Option<SourceLocation>,
},
PrefixUpdate {
lvalue: Place,
operation: UpdateOperator,
value: Place,
loc: Option<SourceLocation>,
},
PostfixUpdate {
lvalue: Place,
operation: UpdateOperator,
value: Place,
loc: Option<SourceLocation>,
},
Debugger {
loc: Option<SourceLocation>,
},
StartMemoize {
manual_memo_id: u32,
deps: Option<Vec<ManualMemoDependency>>,
deps_loc: Option<Option<SourceLocation>>,
has_invalid_deps: bool,
loc: Option<SourceLocation>,
},
FinishMemoize {
manual_memo_id: u32,
decl: Place,
pruned: bool,
loc: Option<SourceLocation>,
},
UnsupportedNode {
node_type: Option<String>,
original_node: Option<Value>,
loc: Option<SourceLocation>,
},
}Variants§
LoadLocal
LoadContext
DeclareLocal
DeclareContext
StoreLocal
StoreContext
Destructure
Primitive
JSXText
BinaryExpression
NewExpression
CallExpression
MethodCall
UnaryExpression
TypeCastExpression
Fields
§
type_annotation: Option<Box<Value>>The original AST type annotation node, preserved for codegen. For Flow: the inner type from TypeAnnotation.typeAnnotation For TS: the TSType node from TSAsExpression/TSSatisfiesExpression
§
loc: Option<SourceLocation>JsxExpression
Fields
§
props: Vec<JsxAttribute>§
loc: Option<SourceLocation>§
opening_loc: Option<SourceLocation>§
closing_loc: Option<SourceLocation>ObjectExpression
ObjectMethod
ArrayExpression
JsxFragment
RegExpLiteral
MetaProperty
PropertyStore
PropertyLoad
PropertyDelete
ComputedStore
ComputedLoad
ComputedDelete
LoadGlobal
StoreGlobal
FunctionExpression
TaggedTemplateExpression
TemplateLiteral
Await
GetIterator
IteratorNext
NextPropertyOf
PrefixUpdate
PostfixUpdate
Debugger
Fields
§
loc: Option<SourceLocation>StartMemoize
Fields
§
deps: Option<Vec<ManualMemoDependency>>§
deps_loc: Option<Option<SourceLocation>>§
loc: Option<SourceLocation>FinishMemoize
UnsupportedNode
Implementations§
Source§impl InstructionValue
impl InstructionValue
pub fn loc(&self) -> Option<&SourceLocation>
Trait Implementations§
Source§impl Clone for InstructionValue
impl Clone for InstructionValue
Source§fn clone(&self) -> InstructionValue
fn clone(&self) -> InstructionValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InstructionValue
impl RefUnwindSafe for InstructionValue
impl Send for InstructionValue
impl Sync for InstructionValue
impl Unpin for InstructionValue
impl UnsafeUnpin for InstructionValue
impl UnwindSafe for InstructionValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more