|
|
|
@ -92,9 +92,66 @@ pub(crate) use unary_ops::*;
|
|
|
|
|
#[doc(inline)] |
|
|
|
|
pub(crate) use value::*; |
|
|
|
|
|
|
|
|
|
/// The `Operation` trait implements the execution code along with the
|
|
|
|
|
/// identifying Name and Instruction value for an Boa Opcode
|
|
|
|
|
macro_rules! generate_impl { |
|
|
|
|
( |
|
|
|
|
$(#[$outer:meta])* |
|
|
|
|
pub enum $Type:ident { |
|
|
|
|
$( |
|
|
|
|
$(#[$inner:ident $($args:tt)*])* |
|
|
|
|
$Variant:ident |
|
|
|
|
),* |
|
|
|
|
$(,)? |
|
|
|
|
} |
|
|
|
|
) => { |
|
|
|
|
$(#[$outer])* |
|
|
|
|
pub enum $Type { |
|
|
|
|
$( |
|
|
|
|
$(#[$inner $($args)*])* |
|
|
|
|
$Variant |
|
|
|
|
),* |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl $Type { |
|
|
|
|
|
|
|
|
|
/// Create opcode from `u8` byte.
|
|
|
|
|
///
|
|
|
|
|
/// # Safety
|
|
|
|
|
///
|
|
|
|
|
/// Does not check if `u8` type is a valid `Opcode`.
|
|
|
|
|
pub unsafe fn from_raw(value: u8) -> Self { |
|
|
|
|
std::mem::transmute(value) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub fn as_str(self) -> &'static str { |
|
|
|
|
match self { |
|
|
|
|
$( |
|
|
|
|
Self::$Variant => $Variant::NAME |
|
|
|
|
),* |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Name of the profiler event for this opcode
|
|
|
|
|
pub fn as_instruction_str(self) -> &'static str { |
|
|
|
|
match self { |
|
|
|
|
$( |
|
|
|
|
Self::$Variant => $Variant::INSTRUCTION |
|
|
|
|
),* |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub(super) fn execute(self, context: &mut Context) -> JsResult<ShouldExit> { |
|
|
|
|
match self { |
|
|
|
|
$( |
|
|
|
|
Self::$Variant => $Variant::execute(context) |
|
|
|
|
),* |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// The `Operation` trait implements the execution code along with the
|
|
|
|
|
/// identifying Name and Instruction value for an Boa Opcode.
|
|
|
|
|
///
|
|
|
|
|
/// This trait should be implemented for a struct that corresponds with
|
|
|
|
|
/// any arm of the `OpCode` enum.
|
|
|
|
@ -106,6 +163,7 @@ pub(crate) trait Operation {
|
|
|
|
|
fn execute(context: &mut Context) -> JsResult<ShouldExit>; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
generate_impl! { |
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
|
|
|
|
#[repr(u8)] |
|
|
|
|
pub enum Opcode { |
|
|
|
@ -1342,359 +1400,6 @@ pub enum Opcode {
|
|
|
|
|
// in TryFrom<u8> impl.
|
|
|
|
|
Nop, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl Opcode { |
|
|
|
|
/// Create opcode from `u8` byte.
|
|
|
|
|
///
|
|
|
|
|
/// # Safety
|
|
|
|
|
///
|
|
|
|
|
/// Does not check if `u8` type is a valid `Opcode`.
|
|
|
|
|
pub unsafe fn from_raw(value: u8) -> Self { |
|
|
|
|
std::mem::transmute(value) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub fn as_str(self) -> &'static str { |
|
|
|
|
match self { |
|
|
|
|
Self::Pop => Pop::NAME, |
|
|
|
|
Self::PopIfThrown => PopIfThrown::NAME, |
|
|
|
|
Self::Dup => Dup::NAME, |
|
|
|
|
Self::Swap => Swap::NAME, |
|
|
|
|
Self::RotateLeft => RotateLeft::NAME, |
|
|
|
|
Self::RotateRight => RotateRight::NAME, |
|
|
|
|
Self::PushZero => PushZero::NAME, |
|
|
|
|
Self::PushOne => PushOne::NAME, |
|
|
|
|
Self::PushInt8 => PushInt8::NAME, |
|
|
|
|
Self::PushInt16 => PushInt16::NAME, |
|
|
|
|
Self::PushInt32 => PushInt32::NAME, |
|
|
|
|
Self::PushRational => PushRational::NAME, |
|
|
|
|
Self::PushNaN => PushNaN::NAME, |
|
|
|
|
Self::PushPositiveInfinity => PushPositiveInfinity::NAME, |
|
|
|
|
Self::PushNegativeInfinity => PushNegativeInfinity::NAME, |
|
|
|
|
Self::PushNull => PushNull::NAME, |
|
|
|
|
Self::PushTrue => PushTrue::NAME, |
|
|
|
|
Self::PushFalse => PushFalse::NAME, |
|
|
|
|
Self::PushUndefined => PushUndefined::NAME, |
|
|
|
|
Self::PushLiteral => PushLiteral::NAME, |
|
|
|
|
Self::PushEmptyObject => PushEmptyObject::NAME, |
|
|
|
|
Self::PushClassPrototype => PushClassPrototype::NAME, |
|
|
|
|
Self::SetClassPrototype => SetClassPrototype::NAME, |
|
|
|
|
Self::SetHomeObject => SetHomeObject::NAME, |
|
|
|
|
Self::PushNewArray => PushNewArray::NAME, |
|
|
|
|
Self::PushValueToArray => PushValueToArray::NAME, |
|
|
|
|
Self::PushElisionToArray => PushElisionToArray::NAME, |
|
|
|
|
Self::PushIteratorToArray => PushIteratorToArray::NAME, |
|
|
|
|
Self::Add => Add::NAME, |
|
|
|
|
Self::Sub => Sub::NAME, |
|
|
|
|
Self::Div => Div::NAME, |
|
|
|
|
Self::Mul => Mul::NAME, |
|
|
|
|
Self::Mod => Mod::NAME, |
|
|
|
|
Self::Pow => Pow::NAME, |
|
|
|
|
Self::ShiftRight => ShiftRight::NAME, |
|
|
|
|
Self::ShiftLeft => ShiftLeft::NAME, |
|
|
|
|
Self::UnsignedShiftRight => UnsignedShiftRight::NAME, |
|
|
|
|
Self::BitOr => BitOr::NAME, |
|
|
|
|
Self::BitAnd => BitAnd::NAME, |
|
|
|
|
Self::BitXor => BitXor::NAME, |
|
|
|
|
Self::BitNot => BitNot::NAME, |
|
|
|
|
Self::In => In::NAME, |
|
|
|
|
Self::Eq => Eq::NAME, |
|
|
|
|
Self::StrictEq => StrictEq::NAME, |
|
|
|
|
Self::NotEq => NotEq::NAME, |
|
|
|
|
Self::StrictNotEq => StrictNotEq::NAME, |
|
|
|
|
Self::GreaterThan => GreaterThan::NAME, |
|
|
|
|
Self::GreaterThanOrEq => GreaterThanOrEq::NAME, |
|
|
|
|
Self::LessThan => LessThan::NAME, |
|
|
|
|
Self::LessThanOrEq => LessThanOrEq::NAME, |
|
|
|
|
Self::InstanceOf => InstanceOf::NAME, |
|
|
|
|
Self::TypeOf => TypeOf::NAME, |
|
|
|
|
Self::Void => Void::NAME, |
|
|
|
|
Self::LogicalNot => LogicalNot::NAME, |
|
|
|
|
Self::LogicalAnd => LogicalAnd::NAME, |
|
|
|
|
Self::LogicalOr => LogicalOr::NAME, |
|
|
|
|
Self::Coalesce => Coalesce::NAME, |
|
|
|
|
Self::Pos => Pos::NAME, |
|
|
|
|
Self::Neg => Neg::NAME, |
|
|
|
|
Self::Inc => Inc::NAME, |
|
|
|
|
Self::IncPost => IncPost::NAME, |
|
|
|
|
Self::Dec => Dec::NAME, |
|
|
|
|
Self::DecPost => DecPost::NAME, |
|
|
|
|
Self::DefInitArg => DefInitArg::NAME, |
|
|
|
|
Self::DefVar => DefVar::NAME, |
|
|
|
|
Self::DefInitVar => DefInitVar::NAME, |
|
|
|
|
Self::DefLet => DefLet::NAME, |
|
|
|
|
Self::DefInitLet => DefInitLet::NAME, |
|
|
|
|
Self::DefInitConst => DefInitConst::NAME, |
|
|
|
|
Self::GetName => GetName::NAME, |
|
|
|
|
Self::GetNameOrUndefined => GetNameOrUndefined::NAME, |
|
|
|
|
Self::SetName => SetName::NAME, |
|
|
|
|
Self::GetPropertyByName => GetPropertyByName::NAME, |
|
|
|
|
Self::GetPropertyByValue => GetPropertyByValue::NAME, |
|
|
|
|
Self::GetPropertyByValuePush => GetPropertyByValuePush::NAME, |
|
|
|
|
Self::SetPropertyByName => SetPropertyByName::NAME, |
|
|
|
|
Self::DefineOwnPropertyByName => DefineOwnPropertyByName::NAME, |
|
|
|
|
Self::DefineClassMethodByName => DefineClassMethodByName::NAME, |
|
|
|
|
Self::SetPropertyByValue => SetPropertyByValue::NAME, |
|
|
|
|
Self::DefineOwnPropertyByValue => DefineOwnPropertyByValue::NAME, |
|
|
|
|
Self::DefineClassMethodByValue => DefineClassMethodByValue::NAME, |
|
|
|
|
Self::SetPropertyGetterByName => SetPropertyGetterByName::NAME, |
|
|
|
|
Self::DefineClassGetterByName => DefineClassGetterByName::NAME, |
|
|
|
|
Self::SetPropertyGetterByValue => SetPropertyGetterByValue::NAME, |
|
|
|
|
Self::DefineClassGetterByValue => DefineClassGetterByValue::NAME, |
|
|
|
|
Self::SetPropertySetterByName => SetPropertySetterByName::NAME, |
|
|
|
|
Self::DefineClassSetterByName => DefineClassSetterByName::NAME, |
|
|
|
|
Self::SetPropertySetterByValue => SetPropertySetterByValue::NAME, |
|
|
|
|
Self::DefineClassSetterByValue => DefineClassSetterByValue::NAME, |
|
|
|
|
Self::AssignPrivateField => AssignPrivateField::NAME, |
|
|
|
|
Self::SetPrivateField => SetPrivateField::NAME, |
|
|
|
|
Self::SetPrivateMethod => SetPrivateMethod::NAME, |
|
|
|
|
Self::SetPrivateSetter => SetPrivateSetter::NAME, |
|
|
|
|
Self::SetPrivateGetter => SetPrivateGetter::NAME, |
|
|
|
|
Self::GetPrivateField => GetPrivateField::NAME, |
|
|
|
|
Self::PushClassField => PushClassField::NAME, |
|
|
|
|
Self::PushClassFieldPrivate => PushClassFieldPrivate::NAME, |
|
|
|
|
Self::PushClassPrivateGetter => PushClassPrivateGetter::NAME, |
|
|
|
|
Self::PushClassPrivateSetter => PushClassPrivateSetter::NAME, |
|
|
|
|
Self::PushClassPrivateMethod => PushClassPrivateMethod::NAME, |
|
|
|
|
Self::DeletePropertyByName => DeletePropertyByName::NAME, |
|
|
|
|
Self::DeletePropertyByValue => DeletePropertyByValue::NAME, |
|
|
|
|
Self::CopyDataProperties => CopyDataProperties::NAME, |
|
|
|
|
Self::ToPropertyKey => ToPropertyKey::NAME, |
|
|
|
|
Self::Jump => Jump::NAME, |
|
|
|
|
Self::JumpIfFalse => JumpIfFalse::NAME, |
|
|
|
|
Self::JumpIfNotUndefined => JumpIfNotUndefined::NAME, |
|
|
|
|
Self::JumpIfNullOrUndefined => JumpIfNullOrUndefined::NAME, |
|
|
|
|
Self::Throw => Throw::NAME, |
|
|
|
|
Self::TryStart => TryStart::NAME, |
|
|
|
|
Self::TryEnd => TryEnd::NAME, |
|
|
|
|
Self::CatchStart => CatchStart::NAME, |
|
|
|
|
Self::CatchEnd => CatchEnd::NAME, |
|
|
|
|
Self::CatchEnd2 => CatchEnd2::NAME, |
|
|
|
|
Self::FinallyStart => FinallyStart::NAME, |
|
|
|
|
Self::FinallyEnd => FinallyEnd::NAME, |
|
|
|
|
Self::FinallySetJump => FinallySetJump::NAME, |
|
|
|
|
Self::ToBoolean => ToBoolean::NAME, |
|
|
|
|
Self::This => This::NAME, |
|
|
|
|
Self::Super => Super::NAME, |
|
|
|
|
Self::SuperCall => SuperCall::NAME, |
|
|
|
|
Self::SuperCallSpread => SuperCallSpread::NAME, |
|
|
|
|
Self::SuperCallDerived => SuperCallDerived::NAME, |
|
|
|
|
Self::Case => Case::NAME, |
|
|
|
|
Self::Default => Default::NAME, |
|
|
|
|
Self::GetArrowFunction => GetArrowFunction::NAME, |
|
|
|
|
Self::GetFunction => GetFunction::NAME, |
|
|
|
|
Self::GetFunctionAsync => GetFunctionAsync::NAME, |
|
|
|
|
Self::GetGenerator => GetGenerator::NAME, |
|
|
|
|
Self::GetGeneratorAsync => GetGeneratorAsync::NAME, |
|
|
|
|
Self::CallEval => CallEval::NAME, |
|
|
|
|
Self::CallEvalSpread => CallEvalSpread::NAME, |
|
|
|
|
Self::Call => Call::NAME, |
|
|
|
|
Self::CallSpread => CallSpread::NAME, |
|
|
|
|
Self::New => New::NAME, |
|
|
|
|
Self::NewSpread => NewSpread::NAME, |
|
|
|
|
Self::Return => Return::NAME, |
|
|
|
|
Self::PushDeclarativeEnvironment => PushDeclarativeEnvironment::NAME, |
|
|
|
|
Self::PushFunctionEnvironment => PushFunctionEnvironment::NAME, |
|
|
|
|
Self::PopEnvironment => PopEnvironment::NAME, |
|
|
|
|
Self::LoopStart => LoopStart::NAME, |
|
|
|
|
Self::LoopContinue => LoopContinue::NAME, |
|
|
|
|
Self::LoopEnd => LoopEnd::NAME, |
|
|
|
|
Self::ForInLoopInitIterator => ForInLoopInitIterator::NAME, |
|
|
|
|
Self::InitIterator => InitIterator::NAME, |
|
|
|
|
Self::InitIteratorAsync => InitIteratorAsync::NAME, |
|
|
|
|
Self::IteratorNext => IteratorNext::NAME, |
|
|
|
|
Self::IteratorClose => IteratorClose::NAME, |
|
|
|
|
Self::IteratorToArray => IteratorToArray::NAME, |
|
|
|
|
Self::ForInLoopNext => ForInLoopNext::NAME, |
|
|
|
|
Self::ForAwaitOfLoopNext => ForAwaitOfLoopNext::NAME, |
|
|
|
|
Self::ForAwaitOfLoopIterate => ForAwaitOfLoopIterate::NAME, |
|
|
|
|
Self::ConcatToString => ConcatToString::NAME, |
|
|
|
|
Self::RequireObjectCoercible => RequireObjectCoercible::NAME, |
|
|
|
|
Self::ValueNotNullOrUndefined => ValueNotNullOrUndefined::NAME, |
|
|
|
|
Self::RestParameterInit => RestParameterInit::NAME, |
|
|
|
|
Self::RestParameterPop => RestParameterPop::NAME, |
|
|
|
|
Self::PopOnReturnAdd => PopOnReturnAdd::NAME, |
|
|
|
|
Self::PopOnReturnSub => PopOnReturnSub::NAME, |
|
|
|
|
Self::Yield => Yield::NAME, |
|
|
|
|
Self::GeneratorNext => GeneratorNext::NAME, |
|
|
|
|
Self::AsyncGeneratorNext => AsyncGeneratorNext::NAME, |
|
|
|
|
Self::Await => Await::NAME, |
|
|
|
|
Self::PushNewTarget => PushNewTarget::NAME, |
|
|
|
|
Self::GeneratorNextDelegate => GeneratorNextDelegate::NAME, |
|
|
|
|
Self::Nop => Nop::NAME, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Name of the profiler event for this opcode
|
|
|
|
|
pub fn as_instruction_str(self) -> &'static str { |
|
|
|
|
match self { |
|
|
|
|
Self::Pop => Pop::INSTRUCTION, |
|
|
|
|
Self::PopIfThrown => PopIfThrown::INSTRUCTION, |
|
|
|
|
Self::Dup => Dup::INSTRUCTION, |
|
|
|
|
Self::Swap => Swap::INSTRUCTION, |
|
|
|
|
Self::RotateLeft => RotateLeft::INSTRUCTION, |
|
|
|
|
Self::RotateRight => RotateRight::INSTRUCTION, |
|
|
|
|
Self::PushZero => PushZero::INSTRUCTION, |
|
|
|
|
Self::PushOne => PushOne::INSTRUCTION, |
|
|
|
|
Self::PushInt8 => PushInt8::INSTRUCTION, |
|
|
|
|
Self::PushInt16 => PushInt16::INSTRUCTION, |
|
|
|
|
Self::PushInt32 => PushInt32::INSTRUCTION, |
|
|
|
|
Self::PushRational => PushRational::INSTRUCTION, |
|
|
|
|
Self::PushNaN => PushNaN::INSTRUCTION, |
|
|
|
|
Self::PushPositiveInfinity => PushPositiveInfinity::INSTRUCTION, |
|
|
|
|
Self::PushNegativeInfinity => PushNegativeInfinity::INSTRUCTION, |
|
|
|
|
Self::PushNull => PushNull::INSTRUCTION, |
|
|
|
|
Self::PushTrue => PushTrue::INSTRUCTION, |
|
|
|
|
Self::PushFalse => PushFalse::INSTRUCTION, |
|
|
|
|
Self::PushUndefined => PushUndefined::INSTRUCTION, |
|
|
|
|
Self::PushLiteral => PushLiteral::INSTRUCTION, |
|
|
|
|
Self::PushEmptyObject => PushEmptyObject::INSTRUCTION, |
|
|
|
|
Self::PushNewArray => PushNewArray::INSTRUCTION, |
|
|
|
|
Self::PushValueToArray => PushValueToArray::INSTRUCTION, |
|
|
|
|
Self::PushElisionToArray => PushElisionToArray::INSTRUCTION, |
|
|
|
|
Self::PushIteratorToArray => PushIteratorToArray::INSTRUCTION, |
|
|
|
|
Self::Add => Add::INSTRUCTION, |
|
|
|
|
Self::Sub => Sub::INSTRUCTION, |
|
|
|
|
Self::Div => Div::INSTRUCTION, |
|
|
|
|
Self::Mul => Mul::INSTRUCTION, |
|
|
|
|
Self::Mod => Mod::INSTRUCTION, |
|
|
|
|
Self::Pow => Pow::INSTRUCTION, |
|
|
|
|
Self::ShiftRight => ShiftRight::INSTRUCTION, |
|
|
|
|
Self::ShiftLeft => ShiftLeft::INSTRUCTION, |
|
|
|
|
Self::UnsignedShiftRight => UnsignedShiftRight::INSTRUCTION, |
|
|
|
|
Self::BitOr => BitOr::INSTRUCTION, |
|
|
|
|
Self::BitAnd => BitAnd::INSTRUCTION, |
|
|
|
|
Self::BitXor => BitXor::INSTRUCTION, |
|
|
|
|
Self::BitNot => BitNot::INSTRUCTION, |
|
|
|
|
Self::In => In::INSTRUCTION, |
|
|
|
|
Self::Eq => Eq::INSTRUCTION, |
|
|
|
|
Self::StrictEq => StrictEq::INSTRUCTION, |
|
|
|
|
Self::NotEq => NotEq::INSTRUCTION, |
|
|
|
|
Self::StrictNotEq => StrictNotEq::INSTRUCTION, |
|
|
|
|
Self::GreaterThan => GreaterThan::INSTRUCTION, |
|
|
|
|
Self::GreaterThanOrEq => GreaterThanOrEq::INSTRUCTION, |
|
|
|
|
Self::LessThan => LessThan::INSTRUCTION, |
|
|
|
|
Self::LessThanOrEq => LessThanOrEq::INSTRUCTION, |
|
|
|
|
Self::InstanceOf => InstanceOf::INSTRUCTION, |
|
|
|
|
Self::TypeOf => TypeOf::INSTRUCTION, |
|
|
|
|
Self::Void => Void::INSTRUCTION, |
|
|
|
|
Self::LogicalNot => LogicalNot::INSTRUCTION, |
|
|
|
|
Self::LogicalAnd => LogicalAnd::INSTRUCTION, |
|
|
|
|
Self::LogicalOr => LogicalOr::INSTRUCTION, |
|
|
|
|
Self::Coalesce => Coalesce::INSTRUCTION, |
|
|
|
|
Self::Pos => Pos::INSTRUCTION, |
|
|
|
|
Self::Neg => Neg::INSTRUCTION, |
|
|
|
|
Self::Inc => Inc::INSTRUCTION, |
|
|
|
|
Self::IncPost => IncPost::INSTRUCTION, |
|
|
|
|
Self::Dec => Dec::INSTRUCTION, |
|
|
|
|
Self::DecPost => DecPost::INSTRUCTION, |
|
|
|
|
Self::DefInitArg => DefInitArg::INSTRUCTION, |
|
|
|
|
Self::DefVar => DefVar::INSTRUCTION, |
|
|
|
|
Self::DefInitVar => DefInitVar::INSTRUCTION, |
|
|
|
|
Self::DefLet => DefLet::INSTRUCTION, |
|
|
|
|
Self::DefInitLet => DefInitLet::INSTRUCTION, |
|
|
|
|
Self::DefInitConst => DefInitConst::INSTRUCTION, |
|
|
|
|
Self::GetName => GetName::INSTRUCTION, |
|
|
|
|
Self::GetNameOrUndefined => GetNameOrUndefined::INSTRUCTION, |
|
|
|
|
Self::SetName => SetName::INSTRUCTION, |
|
|
|
|
Self::GetPropertyByName => GetPropertyByName::INSTRUCTION, |
|
|
|
|
Self::GetPropertyByValue => GetPropertyByValue::INSTRUCTION, |
|
|
|
|
Self::GetPropertyByValuePush => GetPropertyByValuePush::INSTRUCTION, |
|
|
|
|
Self::SetPropertyByName => SetPropertyByName::INSTRUCTION, |
|
|
|
|
Self::DefineOwnPropertyByName => DefineOwnPropertyByName::INSTRUCTION, |
|
|
|
|
Self::SetPropertyByValue => SetPropertyByValue::INSTRUCTION, |
|
|
|
|
Self::DefineOwnPropertyByValue => DefineOwnPropertyByValue::INSTRUCTION, |
|
|
|
|
Self::SetPropertyGetterByName => SetPropertyGetterByName::INSTRUCTION, |
|
|
|
|
Self::SetPropertyGetterByValue => SetPropertyGetterByValue::INSTRUCTION, |
|
|
|
|
Self::SetPropertySetterByName => SetPropertySetterByName::INSTRUCTION, |
|
|
|
|
Self::SetPropertySetterByValue => SetPropertySetterByValue::INSTRUCTION, |
|
|
|
|
Self::DeletePropertyByName => DeletePropertyByName::INSTRUCTION, |
|
|
|
|
Self::DeletePropertyByValue => DeletePropertyByValue::INSTRUCTION, |
|
|
|
|
Self::CopyDataProperties => CopyDataProperties::INSTRUCTION, |
|
|
|
|
Self::Jump => Jump::INSTRUCTION, |
|
|
|
|
Self::JumpIfFalse => JumpIfFalse::INSTRUCTION, |
|
|
|
|
Self::JumpIfNotUndefined => JumpIfNotUndefined::INSTRUCTION, |
|
|
|
|
Self::JumpIfNullOrUndefined => JumpIfNullOrUndefined::INSTRUCTION, |
|
|
|
|
Self::Throw => Throw::INSTRUCTION, |
|
|
|
|
Self::TryStart => TryStart::INSTRUCTION, |
|
|
|
|
Self::TryEnd => TryEnd::INSTRUCTION, |
|
|
|
|
Self::CatchStart => CatchStart::INSTRUCTION, |
|
|
|
|
Self::CatchEnd => CatchEnd::INSTRUCTION, |
|
|
|
|
Self::CatchEnd2 => CatchEnd2::INSTRUCTION, |
|
|
|
|
Self::FinallyStart => FinallyStart::INSTRUCTION, |
|
|
|
|
Self::FinallyEnd => FinallyEnd::INSTRUCTION, |
|
|
|
|
Self::FinallySetJump => FinallySetJump::INSTRUCTION, |
|
|
|
|
Self::ToBoolean => ToBoolean::INSTRUCTION, |
|
|
|
|
Self::This => This::INSTRUCTION, |
|
|
|
|
Self::Super => Super::INSTRUCTION, |
|
|
|
|
Self::SuperCall => SuperCall::INSTRUCTION, |
|
|
|
|
Self::SuperCallSpread => SuperCallSpread::INSTRUCTION, |
|
|
|
|
Self::SuperCallDerived => SuperCallDerived::INSTRUCTION, |
|
|
|
|
Self::Case => Case::INSTRUCTION, |
|
|
|
|
Self::Default => Default::INSTRUCTION, |
|
|
|
|
Self::GetArrowFunction => GetArrowFunction::INSTRUCTION, |
|
|
|
|
Self::GetFunction => GetFunction::INSTRUCTION, |
|
|
|
|
Self::GetFunctionAsync => GetFunctionAsync::INSTRUCTION, |
|
|
|
|
Self::GetGenerator => GetGenerator::INSTRUCTION, |
|
|
|
|
Self::GetGeneratorAsync => GetGeneratorAsync::INSTRUCTION, |
|
|
|
|
Self::CallEval => CallEval::INSTRUCTION, |
|
|
|
|
Self::CallEvalSpread => CallEvalSpread::INSTRUCTION, |
|
|
|
|
Self::Call => Call::INSTRUCTION, |
|
|
|
|
Self::CallSpread => CallSpread::INSTRUCTION, |
|
|
|
|
Self::New => New::INSTRUCTION, |
|
|
|
|
Self::NewSpread => NewSpread::INSTRUCTION, |
|
|
|
|
Self::Return => Return::INSTRUCTION, |
|
|
|
|
Self::PushDeclarativeEnvironment => PushDeclarativeEnvironment::INSTRUCTION, |
|
|
|
|
Self::PushFunctionEnvironment => PushFunctionEnvironment::INSTRUCTION, |
|
|
|
|
Self::PopEnvironment => PopEnvironment::INSTRUCTION, |
|
|
|
|
Self::LoopStart => LoopStart::INSTRUCTION, |
|
|
|
|
Self::LoopContinue => LoopContinue::INSTRUCTION, |
|
|
|
|
Self::LoopEnd => LoopEnd::INSTRUCTION, |
|
|
|
|
Self::ForInLoopInitIterator => ForInLoopInitIterator::INSTRUCTION, |
|
|
|
|
Self::InitIterator => InitIterator::INSTRUCTION, |
|
|
|
|
Self::InitIteratorAsync => InitIteratorAsync::INSTRUCTION, |
|
|
|
|
Self::IteratorNext => IteratorNext::INSTRUCTION, |
|
|
|
|
Self::IteratorClose => IteratorClose::INSTRUCTION, |
|
|
|
|
Self::IteratorToArray => IteratorToArray::INSTRUCTION, |
|
|
|
|
Self::ForInLoopNext => ForInLoopNext::INSTRUCTION, |
|
|
|
|
Self::ForAwaitOfLoopIterate => ForAwaitOfLoopIterate::INSTRUCTION, |
|
|
|
|
Self::ForAwaitOfLoopNext => ForAwaitOfLoopNext::INSTRUCTION, |
|
|
|
|
Self::ConcatToString => ConcatToString::INSTRUCTION, |
|
|
|
|
Self::RequireObjectCoercible => RequireObjectCoercible::INSTRUCTION, |
|
|
|
|
Self::ValueNotNullOrUndefined => ValueNotNullOrUndefined::INSTRUCTION, |
|
|
|
|
Self::RestParameterInit => RestParameterInit::INSTRUCTION, |
|
|
|
|
Self::RestParameterPop => RestParameterPop::INSTRUCTION, |
|
|
|
|
Self::PopOnReturnAdd => PopOnReturnAdd::INSTRUCTION, |
|
|
|
|
Self::PopOnReturnSub => PopOnReturnSub::INSTRUCTION, |
|
|
|
|
Self::Yield => Yield::INSTRUCTION, |
|
|
|
|
Self::GeneratorNext => GeneratorNext::INSTRUCTION, |
|
|
|
|
Self::AsyncGeneratorNext => AsyncGeneratorNext::INSTRUCTION, |
|
|
|
|
Self::PushNewTarget => PushNewTarget::INSTRUCTION, |
|
|
|
|
Self::Await => Await::INSTRUCTION, |
|
|
|
|
Self::GeneratorNextDelegate => GeneratorNextDelegate::INSTRUCTION, |
|
|
|
|
Self::Nop => Nop::INSTRUCTION, |
|
|
|
|
Self::PushClassPrototype => PushClassPrototype::INSTRUCTION, |
|
|
|
|
Self::SetClassPrototype => SetClassPrototype::INSTRUCTION, |
|
|
|
|
Self::SetHomeObject => SetHomeObject::INSTRUCTION, |
|
|
|
|
Self::DefineClassMethodByName => DefineClassMethodByName::INSTRUCTION, |
|
|
|
|
Self::DefineClassMethodByValue => DefineClassMethodByValue::INSTRUCTION, |
|
|
|
|
Self::DefineClassGetterByName => DefineClassGetterByName::INSTRUCTION, |
|
|
|
|
Self::DefineClassGetterByValue => DefineClassGetterByValue::INSTRUCTION, |
|
|
|
|
Self::DefineClassSetterByName => DefineClassSetterByName::INSTRUCTION, |
|
|
|
|
Self::DefineClassSetterByValue => DefineClassSetterByValue::INSTRUCTION, |
|
|
|
|
Self::AssignPrivateField => AssignPrivateField::INSTRUCTION, |
|
|
|
|
Self::SetPrivateField => SetPrivateField::INSTRUCTION, |
|
|
|
|
Self::SetPrivateMethod => SetPrivateMethod::INSTRUCTION, |
|
|
|
|
Self::SetPrivateSetter => SetPrivateSetter::INSTRUCTION, |
|
|
|
|
Self::SetPrivateGetter => SetPrivateGetter::INSTRUCTION, |
|
|
|
|
Self::GetPrivateField => GetPrivateField::INSTRUCTION, |
|
|
|
|
Self::PushClassField => PushClassField::INSTRUCTION, |
|
|
|
|
Self::PushClassFieldPrivate => PushClassFieldPrivate::INSTRUCTION, |
|
|
|
|
Self::PushClassPrivateGetter => PushClassPrivateGetter::INSTRUCTION, |
|
|
|
|
Self::PushClassPrivateSetter => PushClassPrivateSetter::INSTRUCTION, |
|
|
|
|
Self::PushClassPrivateMethod => PushClassPrivateMethod::INSTRUCTION, |
|
|
|
|
Self::ToPropertyKey => ToPropertyKey::INSTRUCTION, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)] |
|
|
|
|