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

Fix clippy lints from rust 1.86 update #5665

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 3 commits into from
Apr 4, 2025
Merged
Changes from 1 commit
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
Next Next commit
handle rust 1.86 update
  • Loading branch information
arihant2math committed Apr 3, 2025
commit f33d716f5a05b0704e42ed5a4d128b540e7df792
2 changes: 1 addition & 1 deletion 2 jit/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@

self.builder
.ins()
.brif(val, else_block, &[], then_block, &[]);

Check warning on line 285 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (brif)
self.builder.switch_to_block(else_block);

Ok(())
Expand All @@ -295,7 +295,7 @@

self.builder
.ins()
.brif(val, then_block, &[], else_block, &[]);

Check warning on line 298 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (brif)
self.builder.switch_to_block(else_block);

Ok(())
Expand Down Expand Up @@ -446,7 +446,7 @@
let val = match (op, a, b) {
(BinaryOperator::Add, JitValue::Int(a), JitValue::Int(b)) => {
let (out, carry) = self.builder.ins().sadd_overflow(a, b);
self.builder.ins().trapnz(carry, TrapCode::INTEGER_OVERFLOW);

Check warning on line 449 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (trapnz)
JitValue::Int(out)
}
(BinaryOperator::Subtract, JitValue::Int(a), JitValue::Int(b)) => {
Expand All @@ -459,7 +459,7 @@
// Check if b == 0, If so trap with a division by zero error
self.builder
.ins()
.trapz(b, TrapCode::INTEGER_DIVISION_BY_ZERO);

Check warning on line 462 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (trapz)
// Else convert to float and divide
let a_float = self.builder.ins().fcvt_from_sint(types::F64, a);
let b_float = self.builder.ins().fcvt_from_sint(types::F64, b);
Expand All @@ -481,16 +481,16 @@
) => {
// Shifts throw an exception if we have a negative shift count
// Remove all bits except the sign bit, and trap if its 1 (i.e. negative).
let sign = self.builder.ins().ushr_imm(b, 63);

Check warning on line 484 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (ushr)
self.builder.ins().trapnz(

Check warning on line 485 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (trapnz)
sign,
TrapCode::user(CustomTrapCode::NegativeShiftCount as u8).unwrap(),
);

let out = if op == BinaryOperator::Lshift {
self.builder.ins().ishl(a, b)

Check warning on line 491 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (ishl)
} else {
self.builder.ins().sshr(a, b)

Check warning on line 493 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (sshr)
};
JitValue::Int(out)
}
Expand All @@ -512,7 +512,7 @@
JitValue::Float(self.builder.ins().fsub(a, b))
}
(BinaryOperator::Multiply, JitValue::Float(a), JitValue::Float(b)) => {
JitValue::Float(self.builder.ins().fmul(a, b))

Check warning on line 515 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (fmul)
}
(BinaryOperator::Divide, JitValue::Float(a), JitValue::Float(b)) => {
JitValue::Float(self.builder.ins().fdiv(a, b))
Expand Down Expand Up @@ -542,7 +542,7 @@
JitValue::Float(self.builder.ins().fsub(operand_one, operand_two))
}
BinaryOperator::Multiply => {
JitValue::Float(self.builder.ins().fmul(operand_one, operand_two))

Check warning on line 545 in jit/src/instructions.rs

View workflow job for this annotation

GitHub Actions / Check Rust code with rustfmt and clippy

Unknown word (fmul)
}
BinaryOperator::Divide => {
JitValue::Float(self.builder.ins().fdiv(operand_one, operand_two))
Expand All @@ -559,7 +559,7 @@

Ok(())
}
Instruction::SetupLoop { .. } => {
Instruction::SetupLoop => {
let loop_head = self.builder.create_block();
self.builder.ins().jump(loop_head, &[]);
self.builder.switch_to_block(loop_head);
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.