Skip to content

Commit

Permalink
Add Instruction and InstructionIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Aug 24, 2023
1 parent dda713d commit cfe700b
Show file tree
Hide file tree
Showing 7 changed files with 2,534 additions and 2,367 deletions.
4 changes: 2 additions & 2 deletions boa_engine/src/bytecompiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,9 @@ impl<'ctx, 'host> ByteCompiler<'ctx, 'host> {
let index = self.next_opcode_location();
self.emit(
Opcode::JumpTable,
&[Operand::U32(count), Operand::U32(Self::DUMMY_ADDRESS)],
&[Operand::U32(Self::DUMMY_ADDRESS), Operand::U32(count)],
);
let default = Label { index: index + 4 };
let default = Label { index };
let mut labels = Vec::with_capacity(count as usize);
for i in 0..count {
labels.push(Label {
Expand Down
5 changes: 3 additions & 2 deletions boa_engine/src/vm/call_frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ impl CallFrame {
}

/// Indicates how a generator function that has been called/resumed should return.
#[derive(Copy, Clone, Debug, PartialEq, Default)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Default)]
#[repr(u8)]
pub(crate) enum GeneratorResumeKind {
#[allow(missing_docs)]
pub enum GeneratorResumeKind {
#[default]
Normal = 0,
Throw,
Expand Down

0 comments on commit cfe700b

Please sign in to comment.