Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Jul 25, 2023
1 parent b4bfd6a commit 04b7b21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions boa_engine/src/bytecompiler/jump_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use boa_interner::Sym;
/// An actions to be performed for the local control flow.
#[derive(Debug, Clone, Copy)]
pub(crate) enum JumpRecordAction {
/// Places a [`Opcode::Jump`], transfters to a specified [`JumpControlInfo`] to be handled when it gets poped.
Transfter {
/// Places a [`Opcode::Jump`], transfers to a specified [`JumpControlInfo`] to be handled when it gets poped.
Transfer {
/// [`JumpControlInfo`] index to be transfered.
index: u32,
},
Expand Down Expand Up @@ -94,7 +94,7 @@ impl JumpRecord {
) {
while let Some(action) = self.actions.pop() {
match action {
JumpRecordAction::Transfter { index } => {
JumpRecordAction::Transfer { index } => {
self.label = compiler.jump();
compiler.jump_info[index as usize].jumps.push(self);

Expand Down
6 changes: 3 additions & 3 deletions boa_engine/src/bytecompiler/statement/break.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ impl ByteCompiler<'_, '_> {
actions.push(JumpRecordAction::HandleFinally {
index: info.jumps.len() as u32,
});
actions.push(JumpRecordAction::Transfter { index: i as u32 });
actions.push(JumpRecordAction::Transfer { index: i as u32 });
}

if let Some(label) = node.label() {
if info.label() == Some(label) {
actions.push(JumpRecordAction::Transfter { index: i as u32 });
actions.push(JumpRecordAction::Transfer { index: i as u32 });
break;
}
} else if info.is_loop() || info.is_switch() {
actions.push(JumpRecordAction::Transfter { index: i as u32 });
actions.push(JumpRecordAction::Transfer { index: i as u32 });
break;
}
}
Expand Down
6 changes: 3 additions & 3 deletions boa_engine/src/bytecompiler/statement/continue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ impl ByteCompiler<'_, '_> {
actions.push(JumpRecordAction::HandleFinally {
index: info.jumps.len() as u32,
});
actions.push(JumpRecordAction::Transfter { index: i as u32 });
actions.push(JumpRecordAction::Transfer { index: i as u32 });
}

if let Some(label) = node.label() {
if info.label() == Some(label) {
actions.push(JumpRecordAction::Transfter { index: i as u32 });
actions.push(JumpRecordAction::Transfer { index: i as u32 });
break;
}
} else if info.is_loop() {
actions.push(JumpRecordAction::Transfter { index: i as u32 });
actions.push(JumpRecordAction::Transfer { index: i as u32 });
break;
}

Expand Down
2 changes: 1 addition & 1 deletion boa_engine/src/bytecompiler/statement/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl ByteCompiler<'_, '_> {
actions.push(JumpRecordAction::HandleFinally {
index: info.jumps.len() as u32,
});
actions.push(JumpRecordAction::Transfter { index: i as u32 });
actions.push(JumpRecordAction::Transfer { index: i as u32 });
}

if info.iterator_loop() {
Expand Down

0 comments on commit 04b7b21

Please sign in to comment.