From e610305144cf8c31fbd24184acdd4868917ffcf7 Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Mon, 31 Oct 2022 10:28:55 -0600 Subject: [PATCH] Remove unnecessary derives for opcodes --- boa_engine/src/bytecompiler/mod.rs | 6 +++++- boa_engine/src/vm/opcode/await_stm/mod.rs | 2 +- boa_engine/src/vm/opcode/binary_ops/logical.rs | 6 +++--- boa_engine/src/vm/opcode/binary_ops/macro_defined.rs | 2 +- boa_engine/src/vm/opcode/binary_ops/mod.rs | 10 +++++----- boa_engine/src/vm/opcode/call/mod.rs | 8 ++++---- boa_engine/src/vm/opcode/concat/mod.rs | 2 +- boa_engine/src/vm/opcode/copy/mod.rs | 2 +- boa_engine/src/vm/opcode/define/class/getter.rs | 4 ++-- boa_engine/src/vm/opcode/define/class/method.rs | 4 ++-- boa_engine/src/vm/opcode/define/class/setter.rs | 4 ++-- boa_engine/src/vm/opcode/define/mod.rs | 8 ++++---- boa_engine/src/vm/opcode/define/own_property.rs | 4 ++-- boa_engine/src/vm/opcode/delete/mod.rs | 8 ++++---- boa_engine/src/vm/opcode/dup/mod.rs | 2 +- boa_engine/src/vm/opcode/environment/mod.rs | 10 +++++----- boa_engine/src/vm/opcode/generator/mod.rs | 6 +++--- boa_engine/src/vm/opcode/generator/yield_stm.rs | 2 +- boa_engine/src/vm/opcode/get/function.rs | 6 +++--- boa_engine/src/vm/opcode/get/generator.rs | 4 ++-- boa_engine/src/vm/opcode/get/name.rs | 4 ++-- boa_engine/src/vm/opcode/get/private.rs | 2 +- boa_engine/src/vm/opcode/get/property.rs | 6 +++--- boa_engine/src/vm/opcode/iteration/for_await.rs | 4 ++-- boa_engine/src/vm/opcode/iteration/for_in.rs | 4 ++-- boa_engine/src/vm/opcode/iteration/init.rs | 4 ++-- boa_engine/src/vm/opcode/iteration/iterator.rs | 6 +++--- boa_engine/src/vm/opcode/iteration/loop_ops.rs | 6 +++--- boa_engine/src/vm/opcode/jump/mod.rs | 8 ++++---- boa_engine/src/vm/opcode/mod.rs | 2 +- boa_engine/src/vm/opcode/new/mod.rs | 4 ++-- boa_engine/src/vm/opcode/nop/mod.rs | 2 +- boa_engine/src/vm/opcode/pop/mod.rs | 10 +++++----- boa_engine/src/vm/opcode/promise/mod.rs | 6 +++--- boa_engine/src/vm/opcode/push/array.rs | 8 ++++---- boa_engine/src/vm/opcode/push/class/field.rs | 4 ++-- boa_engine/src/vm/opcode/push/class/mod.rs | 2 +- boa_engine/src/vm/opcode/push/class/private.rs | 6 +++--- boa_engine/src/vm/opcode/push/environment.rs | 4 ++-- boa_engine/src/vm/opcode/push/literal.rs | 2 +- boa_engine/src/vm/opcode/push/mod.rs | 2 +- boa_engine/src/vm/opcode/push/new_target.rs | 2 +- boa_engine/src/vm/opcode/push/numbers.rs | 4 ++-- boa_engine/src/vm/opcode/push/object.rs | 2 +- boa_engine/src/vm/opcode/require/mod.rs | 2 +- boa_engine/src/vm/opcode/rest_parameter/mod.rs | 4 ++-- boa_engine/src/vm/opcode/return_stm/mod.rs | 2 +- boa_engine/src/vm/opcode/set/class_prototype.rs | 2 +- boa_engine/src/vm/opcode/set/home_object.rs | 2 +- boa_engine/src/vm/opcode/set/name.rs | 2 +- boa_engine/src/vm/opcode/set/private.rs | 10 +++++----- boa_engine/src/vm/opcode/set/property.rs | 12 ++++++------ boa_engine/src/vm/opcode/swap/mod.rs | 6 +++--- boa_engine/src/vm/opcode/switch/mod.rs | 4 ++-- boa_engine/src/vm/opcode/throw/mod.rs | 2 +- boa_engine/src/vm/opcode/to/mod.rs | 4 ++-- boa_engine/src/vm/opcode/try_catch/mod.rs | 10 +++++----- boa_engine/src/vm/opcode/unary_ops/decrement.rs | 4 ++-- boa_engine/src/vm/opcode/unary_ops/increment.rs | 4 ++-- boa_engine/src/vm/opcode/unary_ops/logical.rs | 2 +- boa_engine/src/vm/opcode/unary_ops/mod.rs | 8 ++++---- boa_engine/src/vm/opcode/unary_ops/void.rs | 2 +- boa_engine/src/vm/opcode/value/mod.rs | 2 +- 63 files changed, 146 insertions(+), 142 deletions(-) diff --git a/boa_engine/src/bytecompiler/mod.rs b/boa_engine/src/bytecompiler/mod.rs index a2ddba85e8f..8fdec12531c 100644 --- a/boa_engine/src/bytecompiler/mod.rs +++ b/boa_engine/src/bytecompiler/mod.rs @@ -2254,7 +2254,11 @@ impl<'b> ByteCompiler<'b> { Statement::Labelled(labelled) => match labelled.item() { LabelledItem::Statement(stmt) => match stmt { Statement::ForLoop(for_loop) => { - self.compile_for_loop(for_loop, Some(labelled.label()), configurable_globals)?; + self.compile_for_loop( + for_loop, + Some(labelled.label()), + configurable_globals, + )?; } Statement::ForInLoop(for_in_loop) => { self.compile_for_in_loop( diff --git a/boa_engine/src/vm/opcode/await_stm/mod.rs b/boa_engine/src/vm/opcode/await_stm/mod.rs index fa5b2fd215a..c9e6abb1bd0 100644 --- a/boa_engine/src/vm/opcode/await_stm/mod.rs +++ b/boa_engine/src/vm/opcode/await_stm/mod.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Stops the current Async function and schedules it to resume later. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Await; impl Operation for Await { diff --git a/boa_engine/src/vm/opcode/binary_ops/logical.rs b/boa_engine/src/vm/opcode/binary_ops/logical.rs index e498821dfed..2db530831ca 100644 --- a/boa_engine/src/vm/opcode/binary_ops/logical.rs +++ b/boa_engine/src/vm/opcode/binary_ops/logical.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Binary logical `&&` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct LogicalAnd; impl Operation for LogicalAnd { @@ -29,7 +29,7 @@ impl Operation for LogicalAnd { /// /// Operation: /// - Binary logical `||` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct LogicalOr; impl Operation for LogicalOr { @@ -51,7 +51,7 @@ impl Operation for LogicalOr { /// /// Operation: /// - Binary logical `||` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Coalesce; impl Operation for Coalesce { diff --git a/boa_engine/src/vm/opcode/binary_ops/macro_defined.rs b/boa_engine/src/vm/opcode/binary_ops/macro_defined.rs index 20fd7baf195..fa133b51075 100644 --- a/boa_engine/src/vm/opcode/binary_ops/macro_defined.rs +++ b/boa_engine/src/vm/opcode/binary_ops/macro_defined.rs @@ -9,7 +9,7 @@ macro_rules! implement_bin_ops { #[doc= "\n"] #[doc="Operation:\n"] #[doc= concat!(" - ", $doc_string)] - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] + #[derive(Debug, Clone, Copy)] pub(crate) struct $name; impl Operation for $name { diff --git a/boa_engine/src/vm/opcode/binary_ops/mod.rs b/boa_engine/src/vm/opcode/binary_ops/mod.rs index fa8d9644d95..ef2854ef65a 100644 --- a/boa_engine/src/vm/opcode/binary_ops/mod.rs +++ b/boa_engine/src/vm/opcode/binary_ops/mod.rs @@ -14,7 +14,7 @@ pub(crate) use macro_defined::*; /// /// Operation: /// - Binary `!=` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct NotEq; impl Operation for NotEq { @@ -34,7 +34,7 @@ impl Operation for NotEq { /// /// Operation: /// - Binary `===` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct StrictEq; impl Operation for StrictEq { @@ -53,7 +53,7 @@ impl Operation for StrictEq { /// /// Operation: /// - Binary `!==` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct StrictNotEq; impl Operation for StrictNotEq { @@ -72,7 +72,7 @@ impl Operation for StrictNotEq { /// /// Operation: /// - Binary `in` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct In; impl Operation for In { @@ -102,7 +102,7 @@ impl Operation for In { /// /// Operation: /// - Binary `instanceof` operation -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct InstanceOf; impl Operation for InstanceOf { diff --git a/boa_engine/src/vm/opcode/call/mod.rs b/boa_engine/src/vm/opcode/call/mod.rs index 3f808ba666f..be9bb419f24 100644 --- a/boa_engine/src/vm/opcode/call/mod.rs +++ b/boa_engine/src/vm/opcode/call/mod.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Call a function named "eval". -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct CallEval; impl Operation for CallEval { @@ -65,7 +65,7 @@ impl Operation for CallEval { /// /// Operation: /// - Call a function named "eval" where the arguments contain spreads. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct CallEvalSpread; impl Operation for CallEvalSpread { @@ -127,7 +127,7 @@ impl Operation for CallEvalSpread { /// /// Operation: /// - Call a function -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Call; impl Operation for Call { @@ -166,7 +166,7 @@ impl Operation for Call { } } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct CallSpread; impl Operation for CallSpread { diff --git a/boa_engine/src/vm/opcode/concat/mod.rs b/boa_engine/src/vm/opcode/concat/mod.rs index b2d3f1265c7..ea800c904a9 100644 --- a/boa_engine/src/vm/opcode/concat/mod.rs +++ b/boa_engine/src/vm/opcode/concat/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Concat multiple stack objects into a string. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ConcatToString; impl Operation for ConcatToString { diff --git a/boa_engine/src/vm/opcode/copy/mod.rs b/boa_engine/src/vm/opcode/copy/mod.rs index 9c27a207de6..a4a443be847 100644 --- a/boa_engine/src/vm/opcode/copy/mod.rs +++ b/boa_engine/src/vm/opcode/copy/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Copy all properties of one object to another object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct CopyDataProperties; impl Operation for CopyDataProperties { diff --git a/boa_engine/src/vm/opcode/define/class/getter.rs b/boa_engine/src/vm/opcode/define/class/getter.rs index 1b7a8c0b249..c2cd8864755 100644 --- a/boa_engine/src/vm/opcode/define/class/getter.rs +++ b/boa_engine/src/vm/opcode/define/class/getter.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Defines a class getter by name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineClassGetterByName; impl Operation for DefineClassGetterByName { @@ -56,7 +56,7 @@ impl Operation for DefineClassGetterByName { /// /// Operation: /// - Defines a class getter by value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineClassGetterByValue; impl Operation for DefineClassGetterByValue { diff --git a/boa_engine/src/vm/opcode/define/class/method.rs b/boa_engine/src/vm/opcode/define/class/method.rs index f6a8c4fda01..cac21485621 100644 --- a/boa_engine/src/vm/opcode/define/class/method.rs +++ b/boa_engine/src/vm/opcode/define/class/method.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Defines a class method by name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineClassMethodByName; impl Operation for DefineClassMethodByName { @@ -51,7 +51,7 @@ impl Operation for DefineClassMethodByName { /// /// Operation: /// - Defines a class method by value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineClassMethodByValue; impl Operation for DefineClassMethodByValue { diff --git a/boa_engine/src/vm/opcode/define/class/setter.rs b/boa_engine/src/vm/opcode/define/class/setter.rs index 43873a3c133..94c73aed5d8 100644 --- a/boa_engine/src/vm/opcode/define/class/setter.rs +++ b/boa_engine/src/vm/opcode/define/class/setter.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Defines a class setter by name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineClassSetterByName; impl Operation for DefineClassSetterByName { @@ -56,7 +56,7 @@ impl Operation for DefineClassSetterByName { /// /// Operation: /// - Defines a class setter by value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineClassSetterByValue; impl Operation for DefineClassSetterByValue { diff --git a/boa_engine/src/vm/opcode/define/mod.rs b/boa_engine/src/vm/opcode/define/mod.rs index 65fc6182a83..785dea144ac 100644 --- a/boa_engine/src/vm/opcode/define/mod.rs +++ b/boa_engine/src/vm/opcode/define/mod.rs @@ -14,7 +14,7 @@ pub(crate) use own_property::*; /// /// Operation: /// - Declare `var` type variable. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefVar; impl Operation for DefVar { @@ -53,7 +53,7 @@ impl Operation for DefVar { /// /// Operation: /// - Declare and initialize a function argument. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefInitVar; impl Operation for DefInitVar { @@ -88,7 +88,7 @@ impl Operation for DefInitVar { /// /// Operation: /// - Declare `let` type variable. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefLet; impl Operation for DefLet { @@ -113,7 +113,7 @@ macro_rules! implement_declaritives { #[doc= "\n"] #[doc="Operation:\n"] #[doc= concat!(" - ", $doc_string)] - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] + #[derive(Debug, Clone, Copy)] pub(crate) struct $name; impl Operation for $name { diff --git a/boa_engine/src/vm/opcode/define/own_property.rs b/boa_engine/src/vm/opcode/define/own_property.rs index cea5ea8349f..584ec977ff4 100644 --- a/boa_engine/src/vm/opcode/define/own_property.rs +++ b/boa_engine/src/vm/opcode/define/own_property.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Defines a own property of an object by name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineOwnPropertyByName; impl Operation for DefineOwnPropertyByName { @@ -47,7 +47,7 @@ impl Operation for DefineOwnPropertyByName { /// /// Operation: /// - Defines a own property of an object by value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DefineOwnPropertyByValue; impl Operation for DefineOwnPropertyByValue { diff --git a/boa_engine/src/vm/opcode/delete/mod.rs b/boa_engine/src/vm/opcode/delete/mod.rs index 8bec6adc43c..7546d8f57e3 100644 --- a/boa_engine/src/vm/opcode/delete/mod.rs +++ b/boa_engine/src/vm/opcode/delete/mod.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Deletes a property by name of an object -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DeletePropertyByName; impl Operation for DeletePropertyByName { @@ -39,7 +39,7 @@ impl Operation for DeletePropertyByName { /// /// Operation: /// - Deletes a property by value of an object -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DeletePropertyByValue; impl Operation for DeletePropertyByValue { @@ -66,7 +66,7 @@ impl Operation for DeletePropertyByValue { /// /// Operation: /// - Deletes a property by value of an object -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DeleteName; impl Operation for DeleteName { @@ -123,7 +123,7 @@ impl Operation for DeleteName { /// /// Operation: /// - Throws an error when trying to delete a property of `super`. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DeleteSuperThrow; impl Operation for DeleteSuperThrow { diff --git a/boa_engine/src/vm/opcode/dup/mod.rs b/boa_engine/src/vm/opcode/dup/mod.rs index c2f5f641a97..bd2b2e35e7d 100644 --- a/boa_engine/src/vm/opcode/dup/mod.rs +++ b/boa_engine/src/vm/opcode/dup/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Push a copy of the top value on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Dup; impl Operation for Dup { diff --git a/boa_engine/src/vm/opcode/environment/mod.rs b/boa_engine/src/vm/opcode/environment/mod.rs index de7ef7b209d..df6b80c3bba 100644 --- a/boa_engine/src/vm/opcode/environment/mod.rs +++ b/boa_engine/src/vm/opcode/environment/mod.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Pushes `this` value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct This; impl Operation for This { @@ -33,7 +33,7 @@ impl Operation for This { /// /// Operation: /// - Pushes the current `super` value to the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Super; impl Operation for Super { @@ -75,7 +75,7 @@ impl Operation for Super { /// /// Operation: /// - Execute the `super()` method. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SuperCall; impl Operation for SuperCall { @@ -141,7 +141,7 @@ impl Operation for SuperCall { /// /// Operation: /// - Execute the `super()` method where the arguments contain spreads. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SuperCallSpread; impl Operation for SuperCallSpread { @@ -212,7 +212,7 @@ impl Operation for SuperCallSpread { /// /// Operation: /// - Execute the `super()` method when no constructor of the class is defined. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SuperCallDerived; impl Operation for SuperCallDerived { diff --git a/boa_engine/src/vm/opcode/generator/mod.rs b/boa_engine/src/vm/opcode/generator/mod.rs index 91ffb206eb7..0ec573287c0 100644 --- a/boa_engine/src/vm/opcode/generator/mod.rs +++ b/boa_engine/src/vm/opcode/generator/mod.rs @@ -20,7 +20,7 @@ pub(crate) use yield_stm::*; /// /// Operation: /// - Resumes the current generator function. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GeneratorNext; impl Operation for GeneratorNext { @@ -62,7 +62,7 @@ impl Operation for GeneratorNext { /// /// Operation: /// - Resumes the current generator function. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct AsyncGeneratorNext; impl Operation for AsyncGeneratorNext { @@ -126,7 +126,7 @@ impl Operation for AsyncGeneratorNext { /// /// Operation: /// - Delegates the current generator function another generator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GeneratorNextDelegate; impl Operation for GeneratorNextDelegate { diff --git a/boa_engine/src/vm/opcode/generator/yield_stm.rs b/boa_engine/src/vm/opcode/generator/yield_stm.rs index 1f8fd0543ab..7cff99160a2 100644 --- a/boa_engine/src/vm/opcode/generator/yield_stm.rs +++ b/boa_engine/src/vm/opcode/generator/yield_stm.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Yield from the current execution. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Yield; impl Operation for Yield { diff --git a/boa_engine/src/vm/opcode/get/function.rs b/boa_engine/src/vm/opcode/get/function.rs index 4b3bef80007..428aebe8fcd 100644 --- a/boa_engine/src/vm/opcode/get/function.rs +++ b/boa_engine/src/vm/opcode/get/function.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Get arrow function from the pre-compiled inner functions. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetArrowFunction; impl Operation for GetArrowFunction { @@ -27,7 +27,7 @@ impl Operation for GetArrowFunction { /// /// Operation: /// - Get function from the pre-compiled inner functions. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetFunction; impl Operation for GetFunction { @@ -47,7 +47,7 @@ impl Operation for GetFunction { /// /// Operation: /// - Get async function from the pre-compiled inner functions. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetFunctionAsync; impl Operation for GetFunctionAsync { diff --git a/boa_engine/src/vm/opcode/get/generator.rs b/boa_engine/src/vm/opcode/get/generator.rs index c63662e4223..7f3cf7a4b31 100644 --- a/boa_engine/src/vm/opcode/get/generator.rs +++ b/boa_engine/src/vm/opcode/get/generator.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Get generator function from the pre-compiled inner functions. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetGenerator; impl Operation for GetGenerator { @@ -27,7 +27,7 @@ impl Operation for GetGenerator { /// /// Operation: /// - Get async generator function from the pre-compiled inner functions. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetGeneratorAsync; impl Operation for GetGeneratorAsync { diff --git a/boa_engine/src/vm/opcode/get/name.rs b/boa_engine/src/vm/opcode/get/name.rs index 8022f7e882f..1e0ae7ee4cb 100644 --- a/boa_engine/src/vm/opcode/get/name.rs +++ b/boa_engine/src/vm/opcode/get/name.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Find a binding on the environment chain and push its value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetName; impl Operation for GetName { @@ -83,7 +83,7 @@ impl Operation for GetName { /// /// Operation: /// - Find a binding on the environment chain and push its value. If the binding does not exist push undefined. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetNameOrUndefined; impl Operation for GetNameOrUndefined { diff --git a/boa_engine/src/vm/opcode/get/private.rs b/boa_engine/src/vm/opcode/get/private.rs index ea611079162..eb0e75cf828 100644 --- a/boa_engine/src/vm/opcode/get/private.rs +++ b/boa_engine/src/vm/opcode/get/private.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Get a private property by name from an object an push it on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetPrivateField; impl Operation for GetPrivateField { diff --git a/boa_engine/src/vm/opcode/get/property.rs b/boa_engine/src/vm/opcode/get/property.rs index f467f4597ec..0a9af08ed0e 100644 --- a/boa_engine/src/vm/opcode/get/property.rs +++ b/boa_engine/src/vm/opcode/get/property.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Get a property by name from an object an push it on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetPropertyByName; impl Operation for GetPropertyByName { @@ -42,7 +42,7 @@ impl Operation for GetPropertyByName { /// /// Operation: /// - Get a property by value from an object an push it on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetPropertyByValue; impl Operation for GetPropertyByValue { @@ -70,7 +70,7 @@ impl Operation for GetPropertyByValue { /// /// Operation: /// - Get a property by value from an object an push the key and value on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct GetPropertyByValuePush; impl Operation for GetPropertyByValuePush { diff --git a/boa_engine/src/vm/opcode/iteration/for_await.rs b/boa_engine/src/vm/opcode/iteration/for_await.rs index afa1253de56..0470cea3a8c 100644 --- a/boa_engine/src/vm/opcode/iteration/for_await.rs +++ b/boa_engine/src/vm/opcode/iteration/for_await.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Move to the next value in a for await..of loop. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ForAwaitOfLoopIterate; impl Operation for ForAwaitOfLoopIterate { @@ -43,7 +43,7 @@ impl Operation for ForAwaitOfLoopIterate { /// /// Operation: /// - Get the value from a for await..of loop next result. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ForAwaitOfLoopNext; impl Operation for ForAwaitOfLoopNext { diff --git a/boa_engine/src/vm/opcode/iteration/for_in.rs b/boa_engine/src/vm/opcode/iteration/for_in.rs index b7c9582918b..15f1ad3df56 100644 --- a/boa_engine/src/vm/opcode/iteration/for_in.rs +++ b/boa_engine/src/vm/opcode/iteration/for_in.rs @@ -10,7 +10,7 @@ use crate::{ /// /// Operation: /// - Initialize the iterator for a for..in loop or jump to after the loop if object is null or undefined. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ForInLoopInitIterator; impl Operation for ForInLoopInitIterator { @@ -46,7 +46,7 @@ impl Operation for ForInLoopInitIterator { /// /// Operation: /// - Move to the next value in a for..in loop or jump to exit of the loop if done. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ForInLoopNext; impl Operation for ForInLoopNext { diff --git a/boa_engine/src/vm/opcode/iteration/init.rs b/boa_engine/src/vm/opcode/iteration/init.rs index 955ce793769..f5955e4a867 100644 --- a/boa_engine/src/vm/opcode/iteration/init.rs +++ b/boa_engine/src/vm/opcode/iteration/init.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Initialize an iterator -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct InitIterator; impl Operation for InitIterator { @@ -29,7 +29,7 @@ impl Operation for InitIterator { /// /// Operation: /// - Initialize an async iterator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct InitIteratorAsync; impl Operation for InitIteratorAsync { diff --git a/boa_engine/src/vm/opcode/iteration/iterator.rs b/boa_engine/src/vm/opcode/iteration/iterator.rs index 38bf5e4d991..9debe514ba5 100644 --- a/boa_engine/src/vm/opcode/iteration/iterator.rs +++ b/boa_engine/src/vm/opcode/iteration/iterator.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Advance the iterator by one and put the value on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct IteratorNext; impl Operation for IteratorNext { @@ -46,7 +46,7 @@ impl Operation for IteratorNext { /// /// Operation: /// - Close an iterator -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct IteratorClose; impl Operation for IteratorClose { @@ -74,7 +74,7 @@ impl Operation for IteratorClose { /// /// Operation: /// - Consume the iterator and construct and array with all the values. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct IteratorToArray; impl Operation for IteratorToArray { diff --git a/boa_engine/src/vm/opcode/iteration/loop_ops.rs b/boa_engine/src/vm/opcode/iteration/loop_ops.rs index e28a19c18e6..36ab220b40b 100644 --- a/boa_engine/src/vm/opcode/iteration/loop_ops.rs +++ b/boa_engine/src/vm/opcode/iteration/loop_ops.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Push loop start marker. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct LoopStart; impl Operation for LoopStart { @@ -25,7 +25,7 @@ impl Operation for LoopStart { /// /// Operation: /// - Clean up environments when a loop continues. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct LoopContinue; impl Operation for LoopContinue { @@ -52,7 +52,7 @@ impl Operation for LoopContinue { /// /// Operation: /// - Clean up enviroments at the end of a lopp. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct LoopEnd; impl Operation for LoopEnd { diff --git a/boa_engine/src/vm/opcode/jump/mod.rs b/boa_engine/src/vm/opcode/jump/mod.rs index 19a1e5db5ff..a22b81eb3a6 100644 --- a/boa_engine/src/vm/opcode/jump/mod.rs +++ b/boa_engine/src/vm/opcode/jump/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Unconditional jump to address. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Jump; impl Operation for Jump { @@ -25,7 +25,7 @@ impl Operation for Jump { /// /// Operation: /// - Conditional jump to address. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct JumpIfFalse; impl Operation for JumpIfFalse { @@ -45,7 +45,7 @@ impl Operation for JumpIfFalse { /// /// Operation: /// - Conditional jump to address. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct JumpIfNotUndefined; impl Operation for JumpIfNotUndefined { @@ -67,7 +67,7 @@ impl Operation for JumpIfNotUndefined { /// /// Operation: /// - Conditional jump to address. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct JumpIfNullOrUndefined; impl Operation for JumpIfNullOrUndefined { diff --git a/boa_engine/src/vm/opcode/mod.rs b/boa_engine/src/vm/opcode/mod.rs index 3ceee3bc53c..e39ac141391 100644 --- a/boa_engine/src/vm/opcode/mod.rs +++ b/boa_engine/src/vm/opcode/mod.rs @@ -164,7 +164,7 @@ pub(crate) trait Operation { } generate_impl! { - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] + #[derive(Debug, Clone, Copy)] #[repr(u8)] pub enum Opcode { /// Pop the top value from the stack. diff --git a/boa_engine/src/vm/opcode/new/mod.rs b/boa_engine/src/vm/opcode/new/mod.rs index 65aa75ae6cb..87515a390e8 100644 --- a/boa_engine/src/vm/opcode/new/mod.rs +++ b/boa_engine/src/vm/opcode/new/mod.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Call construct on a function. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct New; impl Operation for New { @@ -47,7 +47,7 @@ impl Operation for New { /// /// Operation: /// - Call construct on a function where the arguments contain spreads. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct NewSpread; impl Operation for NewSpread { diff --git a/boa_engine/src/vm/opcode/nop/mod.rs b/boa_engine/src/vm/opcode/nop/mod.rs index 0ed775f2c51..d6ede801e42 100644 --- a/boa_engine/src/vm/opcode/nop/mod.rs +++ b/boa_engine/src/vm/opcode/nop/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - No-operation instruction, does nothing -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Nop; impl Operation for Nop { diff --git a/boa_engine/src/vm/opcode/pop/mod.rs b/boa_engine/src/vm/opcode/pop/mod.rs index ce276188982..23b96f10ef6 100644 --- a/boa_engine/src/vm/opcode/pop/mod.rs +++ b/boa_engine/src/vm/opcode/pop/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Pop the top value from the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Pop; impl Operation for Pop { @@ -24,7 +24,7 @@ impl Operation for Pop { /// /// Operation: /// - Pop the top value from the stack if the last try block has thrown a value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PopIfThrown; impl Operation for PopIfThrown { @@ -45,7 +45,7 @@ impl Operation for PopIfThrown { /// /// Operation: /// - Pop the current environment. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PopEnvironment; impl Operation for PopEnvironment { @@ -64,7 +64,7 @@ impl Operation for PopEnvironment { /// /// Operation: /// - Add one to the pop on return count. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PopOnReturnAdd; impl Operation for PopOnReturnAdd { @@ -81,7 +81,7 @@ impl Operation for PopOnReturnAdd { /// /// Operation: /// - Subtract one from the pop on return count. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PopOnReturnSub; impl Operation for PopOnReturnSub { diff --git a/boa_engine/src/vm/opcode/promise/mod.rs b/boa_engine/src/vm/opcode/promise/mod.rs index 1f3f1342667..7c6ee4c25dc 100644 --- a/boa_engine/src/vm/opcode/promise/mod.rs +++ b/boa_engine/src/vm/opcode/promise/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Start of a finally block. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct FinallyStart; impl Operation for FinallyStart { @@ -29,7 +29,7 @@ impl Operation for FinallyStart { /// /// Operation: /// - End of a finally block. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct FinallyEnd; impl Operation for FinallyEnd { @@ -60,7 +60,7 @@ impl Operation for FinallyEnd { /// /// Operation: /// - Set the address for a finally jump. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct FinallySetJump; impl Operation for FinallySetJump { diff --git a/boa_engine/src/vm/opcode/push/array.rs b/boa_engine/src/vm/opcode/push/array.rs index 56e5065ff24..2240edede8c 100644 --- a/boa_engine/src/vm/opcode/push/array.rs +++ b/boa_engine/src/vm/opcode/push/array.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Push an empty array value on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushNewArray; impl Operation for PushNewArray { @@ -27,7 +27,7 @@ impl Operation for PushNewArray { /// /// Operation: /// - Push a value to an array. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushValueToArray; impl Operation for PushValueToArray { @@ -52,7 +52,7 @@ impl Operation for PushValueToArray { /// /// Operation: /// - Push an empty element/hole to an array. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushElisionToArray; impl Operation for PushElisionToArray { @@ -77,7 +77,7 @@ impl Operation for PushElisionToArray { /// /// Operation: /// - Push all iterator values to an array. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushIteratorToArray; impl Operation for PushIteratorToArray { diff --git a/boa_engine/src/vm/opcode/push/class/field.rs b/boa_engine/src/vm/opcode/push/class/field.rs index 210244dd9e0..2b484512f0b 100644 --- a/boa_engine/src/vm/opcode/push/class/field.rs +++ b/boa_engine/src/vm/opcode/push/class/field.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Push a field to a class. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushClassField; impl Operation for PushClassField { @@ -48,7 +48,7 @@ impl Operation for PushClassField { /// /// Operation: /// - Push a private field to the class. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushClassFieldPrivate; impl Operation for PushClassFieldPrivate { diff --git a/boa_engine/src/vm/opcode/push/class/mod.rs b/boa_engine/src/vm/opcode/push/class/mod.rs index e76cbef32cb..d6499e2c988 100644 --- a/boa_engine/src/vm/opcode/push/class/mod.rs +++ b/boa_engine/src/vm/opcode/push/class/mod.rs @@ -15,7 +15,7 @@ pub(crate) use private::*; /// /// Operation: /// - Get the prototype of a superclass and push it on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushClassPrototype; impl Operation for PushClassPrototype { diff --git a/boa_engine/src/vm/opcode/push/class/private.rs b/boa_engine/src/vm/opcode/push/class/private.rs index 4d77b4e1789..21bf82a4e7a 100644 --- a/boa_engine/src/vm/opcode/push/class/private.rs +++ b/boa_engine/src/vm/opcode/push/class/private.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Push a private method to the class. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushClassPrivateMethod; impl Operation for PushClassPrivateMethod { @@ -36,7 +36,7 @@ impl Operation for PushClassPrivateMethod { /// /// Operation: /// - Push a private getter to the class. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushClassPrivateGetter; impl Operation for PushClassPrivateGetter { @@ -70,7 +70,7 @@ impl Operation for PushClassPrivateGetter { /// /// Operation: /// - Push a private setter to the class. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushClassPrivateSetter; impl Operation for PushClassPrivateSetter { diff --git a/boa_engine/src/vm/opcode/push/environment.rs b/boa_engine/src/vm/opcode/push/environment.rs index bc0c7840941..c461c7ad100 100644 --- a/boa_engine/src/vm/opcode/push/environment.rs +++ b/boa_engine/src/vm/opcode/push/environment.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Push a declarative environment -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushDeclarativeEnvironment; impl Operation for PushDeclarativeEnvironment { @@ -34,7 +34,7 @@ impl Operation for PushDeclarativeEnvironment { /// /// Operation: /// - Push a function environment. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushFunctionEnvironment; impl Operation for PushFunctionEnvironment { diff --git a/boa_engine/src/vm/opcode/push/literal.rs b/boa_engine/src/vm/opcode/push/literal.rs index d0cc937564f..3b4b983d22a 100644 --- a/boa_engine/src/vm/opcode/push/literal.rs +++ b/boa_engine/src/vm/opcode/push/literal.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Push literal value on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushLiteral; impl Operation for PushLiteral { diff --git a/boa_engine/src/vm/opcode/push/mod.rs b/boa_engine/src/vm/opcode/push/mod.rs index e029837735d..4f0921bb591 100644 --- a/boa_engine/src/vm/opcode/push/mod.rs +++ b/boa_engine/src/vm/opcode/push/mod.rs @@ -25,7 +25,7 @@ macro_rules! implement_push_generics { #[doc= "\n"] #[doc="Operation:\n"] #[doc= concat!(" - ", $doc_string)] - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] + #[derive(Debug, Clone, Copy)] pub(crate) struct $name; impl Operation for $name { diff --git a/boa_engine/src/vm/opcode/push/new_target.rs b/boa_engine/src/vm/opcode/push/new_target.rs index 85ef0f8eaf2..a974f6bf9ec 100644 --- a/boa_engine/src/vm/opcode/push/new_target.rs +++ b/boa_engine/src/vm/opcode/push/new_target.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Push the current new target to the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushNewTarget; impl Operation for PushNewTarget { diff --git a/boa_engine/src/vm/opcode/push/numbers.rs b/boa_engine/src/vm/opcode/push/numbers.rs index 3f0b3a6a599..72b77b99243 100644 --- a/boa_engine/src/vm/opcode/push/numbers.rs +++ b/boa_engine/src/vm/opcode/push/numbers.rs @@ -9,7 +9,7 @@ macro_rules! implement_push_numbers_with_conversion { #[doc= "\n"] #[doc="Operation:\n"] #[doc= concat!(" - ", $doc_string)] - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] + #[derive(Debug, Clone, Copy)] pub(crate) struct $name; impl Operation for $name { @@ -31,7 +31,7 @@ macro_rules! implement_push_numbers_no_conversion { #[doc= "\n"] #[doc="Operation:\n"] #[doc= concat!(" - ", $doc_string)] - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] + #[derive(Debug, Clone, Copy)] pub(crate) struct $name; impl Operation for $name { diff --git a/boa_engine/src/vm/opcode/push/object.rs b/boa_engine/src/vm/opcode/push/object.rs index 7819e97511b..f2f5eca16c3 100644 --- a/boa_engine/src/vm/opcode/push/object.rs +++ b/boa_engine/src/vm/opcode/push/object.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Push empty object `{}` value on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct PushEmptyObject; impl Operation for PushEmptyObject { diff --git a/boa_engine/src/vm/opcode/require/mod.rs b/boa_engine/src/vm/opcode/require/mod.rs index 308591ea906..4ebdaa258d1 100644 --- a/boa_engine/src/vm/opcode/require/mod.rs +++ b/boa_engine/src/vm/opcode/require/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Call `RequireObjectCoercible` on the stack value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct RequireObjectCoercible; impl Operation for RequireObjectCoercible { diff --git a/boa_engine/src/vm/opcode/rest_parameter/mod.rs b/boa_engine/src/vm/opcode/rest_parameter/mod.rs index 18d950a224e..9a03ee693fa 100644 --- a/boa_engine/src/vm/opcode/rest_parameter/mod.rs +++ b/boa_engine/src/vm/opcode/rest_parameter/mod.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Initialize the rest parameter value of a function from the remaining arguments. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct RestParameterInit; impl Operation for RestParameterInit { @@ -42,7 +42,7 @@ impl Operation for RestParameterInit { /// /// Operation: /// - Pop the remaining arguments of a function. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct RestParameterPop; impl Operation for RestParameterPop { diff --git a/boa_engine/src/vm/opcode/return_stm/mod.rs b/boa_engine/src/vm/opcode/return_stm/mod.rs index ee08121de66..1a5bc6b6be2 100644 --- a/boa_engine/src/vm/opcode/return_stm/mod.rs +++ b/boa_engine/src/vm/opcode/return_stm/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Return from a function. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Return; impl Operation for Return { diff --git a/boa_engine/src/vm/opcode/set/class_prototype.rs b/boa_engine/src/vm/opcode/set/class_prototype.rs index b47c58ec7a4..8e747c1bd92 100644 --- a/boa_engine/src/vm/opcode/set/class_prototype.rs +++ b/boa_engine/src/vm/opcode/set/class_prototype.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Set the prototype of a class object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetClassPrototype; impl Operation for SetClassPrototype { diff --git a/boa_engine/src/vm/opcode/set/home_object.rs b/boa_engine/src/vm/opcode/set/home_object.rs index a587f90ec0c..96c5c659e9d 100644 --- a/boa_engine/src/vm/opcode/set/home_object.rs +++ b/boa_engine/src/vm/opcode/set/home_object.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Set home object internal slot of a function object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetHomeObject; impl Operation for SetHomeObject { diff --git a/boa_engine/src/vm/opcode/set/name.rs b/boa_engine/src/vm/opcode/set/name.rs index 4284b1f0020..6dfdf57a0b3 100644 --- a/boa_engine/src/vm/opcode/set/name.rs +++ b/boa_engine/src/vm/opcode/set/name.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Find a binding on the environment chain and assign its value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetName; impl Operation for SetName { diff --git a/boa_engine/src/vm/opcode/set/private.rs b/boa_engine/src/vm/opcode/set/private.rs index 2f5a3a978e5..7632ebb163b 100644 --- a/boa_engine/src/vm/opcode/set/private.rs +++ b/boa_engine/src/vm/opcode/set/private.rs @@ -9,7 +9,7 @@ use crate::{ /// /// Operation: /// - Assign the value of a private property of an object by it's name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct AssignPrivateField; impl Operation for AssignPrivateField { @@ -66,7 +66,7 @@ impl Operation for AssignPrivateField { /// /// Operation: /// - Set a private property of a class constructor by it's name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPrivateField; impl Operation for SetPrivateField { @@ -104,7 +104,7 @@ impl Operation for SetPrivateField { /// /// Operation: /// - Set a private method of a class constructor by it's name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPrivateMethod; impl Operation for SetPrivateMethod { @@ -134,7 +134,7 @@ impl Operation for SetPrivateMethod { /// /// Operation: /// - Set a private setter property of a class constructor by it's name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPrivateSetter; impl Operation for SetPrivateSetter { @@ -163,7 +163,7 @@ impl Operation for SetPrivateSetter { /// /// Operation: /// - Set a private getter property of a class constructor by it's name. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPrivateGetter; impl Operation for SetPrivateGetter { diff --git a/boa_engine/src/vm/opcode/set/property.rs b/boa_engine/src/vm/opcode/set/property.rs index e76685eabea..403f08f6fdc 100644 --- a/boa_engine/src/vm/opcode/set/property.rs +++ b/boa_engine/src/vm/opcode/set/property.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Sets a property by name of an object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPropertyByName; impl Operation for SetPropertyByName { @@ -43,7 +43,7 @@ impl Operation for SetPropertyByName { /// /// Operation: /// - Sets a property by value of an object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPropertyByValue; impl Operation for SetPropertyByValue { @@ -71,7 +71,7 @@ impl Operation for SetPropertyByValue { /// /// Operation: /// - Sets a getter property by name of an object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPropertyGetterByName; impl Operation for SetPropertyGetterByName { @@ -112,7 +112,7 @@ impl Operation for SetPropertyGetterByName { /// /// Operation: /// - Sets a getter property by value of an object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPropertyGetterByValue; impl Operation for SetPropertyGetterByValue { @@ -148,7 +148,7 @@ impl Operation for SetPropertyGetterByValue { /// /// Operation: /// - Sets a setter property by name of an object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPropertySetterByName; impl Operation for SetPropertySetterByName { @@ -189,7 +189,7 @@ impl Operation for SetPropertySetterByName { /// /// Operation: /// - Sets a setter property by value of an object. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct SetPropertySetterByValue; impl Operation for SetPropertySetterByValue { diff --git a/boa_engine/src/vm/opcode/swap/mod.rs b/boa_engine/src/vm/opcode/swap/mod.rs index 941812af607..c0c913a2793 100644 --- a/boa_engine/src/vm/opcode/swap/mod.rs +++ b/boa_engine/src/vm/opcode/swap/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Swap the top two values on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Swap; impl Operation for Swap { @@ -28,7 +28,7 @@ impl Operation for Swap { /// /// Operation: /// - Rotates the n top values to the left. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct RotateLeft; impl Operation for RotateLeft { @@ -47,7 +47,7 @@ impl Operation for RotateLeft { /// /// Operation: /// - Rotates the n top values to the right. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct RotateRight; impl Operation for RotateRight { diff --git a/boa_engine/src/vm/opcode/switch/mod.rs b/boa_engine/src/vm/opcode/switch/mod.rs index 385cd9c58ce..bd0db55e154 100644 --- a/boa_engine/src/vm/opcode/switch/mod.rs +++ b/boa_engine/src/vm/opcode/switch/mod.rs @@ -8,7 +8,7 @@ use crate::{ /// Operation: /// - Pop the two values of the stack, strict equal compares the two values, /// if true jumps to address, otherwise push the second pop'ed value. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Case; impl Operation for Case { @@ -33,7 +33,7 @@ impl Operation for Case { /// /// Operation: /// - Pops the top of stack and jump to address. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Default; impl Operation for Default { diff --git a/boa_engine/src/vm/opcode/throw/mod.rs b/boa_engine/src/vm/opcode/throw/mod.rs index efa05ea3751..02973dad8a7 100644 --- a/boa_engine/src/vm/opcode/throw/mod.rs +++ b/boa_engine/src/vm/opcode/throw/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Throw exception. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Throw; impl Operation for Throw { diff --git a/boa_engine/src/vm/opcode/to/mod.rs b/boa_engine/src/vm/opcode/to/mod.rs index 20b7d6883d9..afd0fb9d1b5 100644 --- a/boa_engine/src/vm/opcode/to/mod.rs +++ b/boa_engine/src/vm/opcode/to/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Pops value converts it to boolean and pushes it back. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ToBoolean; impl Operation for ToBoolean { @@ -25,7 +25,7 @@ impl Operation for ToBoolean { /// /// Operation: /// - Call `ToPropertyKey` on the value on the stack. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ToPropertyKey; impl Operation for ToPropertyKey { diff --git a/boa_engine/src/vm/opcode/try_catch/mod.rs b/boa_engine/src/vm/opcode/try_catch/mod.rs index c19fd2b75d1..e41e363a952 100644 --- a/boa_engine/src/vm/opcode/try_catch/mod.rs +++ b/boa_engine/src/vm/opcode/try_catch/mod.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Start of a try block. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct TryStart; impl Operation for TryStart { @@ -37,7 +37,7 @@ impl Operation for TryStart { /// /// Operation: /// - End of a try block -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct TryEnd; impl Operation for TryEnd { @@ -79,7 +79,7 @@ impl Operation for TryEnd { /// /// Operation: /// - Start of a catch block. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct CatchStart; impl Operation for CatchStart { @@ -105,7 +105,7 @@ impl Operation for CatchStart { /// /// Operation: /// - End of a catch block. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct CatchEnd; impl Operation for CatchEnd { @@ -147,7 +147,7 @@ impl Operation for CatchEnd { /// /// Operation: /// - End of a catch block -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct CatchEnd2; impl Operation for CatchEnd2 { diff --git a/boa_engine/src/vm/opcode/unary_ops/decrement.rs b/boa_engine/src/vm/opcode/unary_ops/decrement.rs index 82fd5c5ba8a..e24f9995d6e 100644 --- a/boa_engine/src/vm/opcode/unary_ops/decrement.rs +++ b/boa_engine/src/vm/opcode/unary_ops/decrement.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Unary `--` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Dec; impl Operation for Dec { @@ -31,7 +31,7 @@ impl Operation for Dec { /// /// Operation: /// - Unary postfix `--` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct DecPost; impl Operation for DecPost { diff --git a/boa_engine/src/vm/opcode/unary_ops/increment.rs b/boa_engine/src/vm/opcode/unary_ops/increment.rs index 0fedbf099b5..f9148411895 100644 --- a/boa_engine/src/vm/opcode/unary_ops/increment.rs +++ b/boa_engine/src/vm/opcode/unary_ops/increment.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Unary `++` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Inc; impl Operation for Inc { @@ -31,7 +31,7 @@ impl Operation for Inc { /// /// Operation: /// - Unary postfix `++` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct IncPost; impl Operation for IncPost { diff --git a/boa_engine/src/vm/opcode/unary_ops/logical.rs b/boa_engine/src/vm/opcode/unary_ops/logical.rs index 363a8dd444a..041aab0f6ec 100644 --- a/boa_engine/src/vm/opcode/unary_ops/logical.rs +++ b/boa_engine/src/vm/opcode/unary_ops/logical.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Unary logical `!` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct LogicalNot; impl Operation for LogicalNot { diff --git a/boa_engine/src/vm/opcode/unary_ops/mod.rs b/boa_engine/src/vm/opcode/unary_ops/mod.rs index daea12d340b..4d447a5f257 100644 --- a/boa_engine/src/vm/opcode/unary_ops/mod.rs +++ b/boa_engine/src/vm/opcode/unary_ops/mod.rs @@ -20,7 +20,7 @@ pub(crate) use void::*; /// /// Operation: /// - Unary `typeof` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct TypeOf; impl Operation for TypeOf { @@ -38,7 +38,7 @@ impl Operation for TypeOf { /// /// Operation: /// - Unary `+` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Pos; impl Operation for Pos { @@ -57,7 +57,7 @@ impl Operation for Pos { /// /// Operation: /// - Unary `-` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Neg; impl Operation for Neg { @@ -78,7 +78,7 @@ impl Operation for Neg { /// /// Operation: /// - Unary bitwise `~` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct BitNot; impl Operation for BitNot { diff --git a/boa_engine/src/vm/opcode/unary_ops/void.rs b/boa_engine/src/vm/opcode/unary_ops/void.rs index 19da829fddd..19e6dc24a5c 100644 --- a/boa_engine/src/vm/opcode/unary_ops/void.rs +++ b/boa_engine/src/vm/opcode/unary_ops/void.rs @@ -7,7 +7,7 @@ use crate::{ /// /// Operation: /// - Unary `void` operator. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct Void; impl Operation for Void { diff --git a/boa_engine/src/vm/opcode/value/mod.rs b/boa_engine/src/vm/opcode/value/mod.rs index e9813f645d9..b1b81d05b1f 100644 --- a/boa_engine/src/vm/opcode/value/mod.rs +++ b/boa_engine/src/vm/opcode/value/mod.rs @@ -8,7 +8,7 @@ use crate::{ /// /// Operation: /// - Require the stack value to be neither null nor undefined. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy)] pub(crate) struct ValueNotNullOrUndefined; impl Operation for ValueNotNullOrUndefined {