Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Instruction and InstructionIterator #3201

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading
Loading