Skip to content

Commit f673d03

Browse files
committed
Fix typo
1 parent b653639 commit f673d03

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

boa_engine/src/bytecompiler/jump_control.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use boa_interner::Sym;
2121
pub(crate) enum JumpRecordAction {
2222
/// Places a [`Opcode::Jump`], transfers to a specified [`JumpControlInfo`] to be handled when it gets poped.
2323
Transfer {
24-
/// [`JumpControlInfo`] index to be transfered.
24+
/// [`JumpControlInfo`] index to be transferred.
2525
index: u32,
2626
},
2727

@@ -31,7 +31,7 @@ pub(crate) enum JumpRecordAction {
3131
/// Closes the an iterator.
3232
CloseIterator { r#async: bool },
3333

34-
/// Handles finally which needs to be done if we are in the try or catch section of a try statement that
34+
/// Handles finally, this needs to be done if we are in the try or catch section of a try statement that
3535
/// has a finally block.
3636
///
3737
/// It places push integer value [`Opcode`] as well as [`Opcode::PushFalse`], which means don't [`ReThrow`](Opcode::ReThrow).
@@ -53,7 +53,7 @@ pub(crate) enum JumpRecordAction {
5353
/// ```
5454
///
5555
/// Both `continue` and `break` must go through the finally, but the `continue` goes to the beginning of the loop,
56-
/// but the `break` goes to the end of the loop, this is solved by having a jump table (See [`Opcode::JumpTable`])
56+
/// and the `break` goes to the end of the loop, this is solved by having a jump table (See [`Opcode::JumpTable`])
5757
/// at the end of finally (It is constructed in [`ByteCompiler::pop_try_with_finally_control_info()`]).
5858
HandleFinally {
5959
/// Jump table index.

boa_engine/src/module/source.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,6 @@ impl SourceTextModule {
17431743
// 6. Set the VariableEnvironment of moduleContext to module.[[Environment]].
17441744
// 7. Set the LexicalEnvironment of moduleContext to module.[[Environment]].
17451745
std::mem::swap(&mut context.vm.environments, &mut environments);
1746-
let stack = std::mem::take(&mut context.vm.stack);
17471746
// 2. Set the Function of moduleContext to null.
17481747
let function = context.vm.active_function.take();
17491748
// 3. Set the Realm of moduleContext to module.[[Realm]].
@@ -1763,7 +1762,6 @@ impl SourceTextModule {
17631762
let result = context.run();
17641763

17651764
std::mem::swap(&mut context.vm.environments, &mut environments);
1766-
context.vm.stack = stack;
17671765
context.vm.active_function = function;
17681766
context.vm.active_runnable = active_runnable;
17691767
context.swap_realm(&mut realm);

boa_engine/src/script.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ impl Script {
138138

139139
let old_realm = context.enter_realm(self.inner.realm.clone());
140140
let active_function = context.vm.active_function.take();
141-
let stack = std::mem::take(&mut context.vm.stack);
142141
let old_active = context
143142
.vm
144143
.active_runnable
@@ -154,7 +153,6 @@ impl Script {
154153
let record = context.run();
155154
context.vm.pop_frame();
156155

157-
context.vm.stack = stack;
158156
context.vm.active_function = active_function;
159157
context.vm.active_runnable = old_active;
160158
context.enter_realm(old_realm);

0 commit comments

Comments
 (0)