Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bump cranelift to 0.119 and add more instructions to JIT #5778

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

Merged
merged 1 commit into from
May 12, 2025
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
add instructions
  • Loading branch information
arihant2math committed May 10, 2025
commit e323352f592f6e49475afcc57b0662f9ad811297
76 changes: 43 additions & 33 deletions 76 Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions 6 jit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ num-traits = { workspace = true }
thiserror = { workspace = true }
libffi = { workspace = true, features = ["system"] }

cranelift = "0.118"
cranelift-jit = "0.118"
cranelift-module = "0.118"
cranelift = "0.119"
cranelift-jit = "0.119"
cranelift-module = "0.119"

[dev-dependencies]
rustpython-derive = { path = "../derive", version = "0.4.0" }
Expand Down
12 changes: 12 additions & 0 deletions 12 jit/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,18 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
_ => Err(JitCompileError::BadBytecode),
}
}
Instruction::Nop => Ok(()),
Instruction::Swap { index } => {
let len = self.stack.len();
let i = len - 1;
let j = len - 1 - index.get(arg) as usize;
self.stack.swap(i, j);
Ok(())
}
Instruction::Pop => {
self.stack.pop();
Ok(())
}
_ => Err(JitCompileError::NotSupported),
}
}
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.