Browse Source

Skip reversing arguments in SuperCallDerived (#3062)

`code_block::construct_internal` already reverses the arguments into `argument_n ... argument_1` on to the stack, since normal constructor parameters are resolved in order.
pull/3063/head
Dirk de Visser 1 year ago committed by GitHub
parent
commit
4f89303f43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      boa_engine/src/vm/opcode/environment/mod.rs
  2. 2
      boa_engine/src/vm/opcode/mod.rs

1
boa_engine/src/vm/opcode/environment/mod.rs

@ -225,7 +225,6 @@ impl Operation for SuperCallDerived {
for _ in 0..argument_count {
arguments.push(context.vm.pop());
}
arguments.reverse();
let this_env = context
.vm

2
boa_engine/src/vm/opcode/mod.rs

@ -1254,7 +1254,7 @@ generate_impl! {
///
/// Operands:
///
/// Stack: argument_1, ... argument_n **=>**
/// Stack: argument_n, ... argument_1 **=>**
SuperCallDerived,
/// Dynamically import a module.

Loading…
Cancel
Save