#[repr(u8)]pub enum TempOpcode {
Show 19 variants
EnterScope = 1,
LeaveScope = 2,
Label = 3,
ScopeGetVarUndef = 4,
ScopeGetVar = 5,
ScopePutVar = 6,
ScopeDeleteVar = 7,
ScopeMakeRef = 8,
ScopeGetRef = 9,
ScopePutVarInit = 10,
ScopeGetVarCheckthis = 11,
ScopeGetPrivateField = 12,
ScopeGetPrivateField2 = 13,
ScopePutPrivateField = 14,
ScopeInPrivateField = 15,
GetFieldOptChain = 16,
GetArrayElOptChain = 17,
SetClassName = 18,
LineNum = 19,
}Expand description
An instruction that only exists while a function is being compiled.
The numbers overlap the short-form opcodes, exactly as in the reference implementation, because these can never appear in finished bytecode.
Variants§
EnterScope = 1
enter_scope — 3 byte(s), pops 0, pushes 0
LeaveScope = 2
leave_scope — 3 byte(s), pops 0, pushes 0
Label = 3
label — 5 byte(s), pops 0, pushes 0
ScopeGetVarUndef = 4
scope_get_var_undef — 7 byte(s), pops 0, pushes 1
ScopeGetVar = 5
scope_get_var — 7 byte(s), pops 0, pushes 1
ScopePutVar = 6
scope_put_var — 7 byte(s), pops 1, pushes 0
ScopeDeleteVar = 7
scope_delete_var — 7 byte(s), pops 0, pushes 1
ScopeMakeRef = 8
scope_make_ref — 11 byte(s), pops 0, pushes 2
ScopeGetRef = 9
scope_get_ref — 7 byte(s), pops 0, pushes 2
ScopePutVarInit = 10
scope_put_var_init — 7 byte(s), pops 0, pushes 2
ScopeGetVarCheckthis = 11
scope_get_var_checkthis — 7 byte(s), pops 0, pushes 1
ScopeGetPrivateField = 12
scope_get_private_field — 7 byte(s), pops 1, pushes 1
ScopeGetPrivateField2 = 13
scope_get_private_field2 — 7 byte(s), pops 1, pushes 2
ScopePutPrivateField = 14
scope_put_private_field — 7 byte(s), pops 2, pushes 0
ScopeInPrivateField = 15
scope_in_private_field — 7 byte(s), pops 1, pushes 1
GetFieldOptChain = 16
get_field_opt_chain — 5 byte(s), pops 1, pushes 1
GetArrayElOptChain = 17
get_array_el_opt_chain — 1 byte(s), pops 2, pushes 1
SetClassName = 18
set_class_name — 5 byte(s), pops 1, pushes 1
LineNum = 19
line_num — 5 byte(s), pops 0, pushes 0