Skip to content
Open
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
why on earth do i always forget about formatting
  • Loading branch information
LuigiTheJokesterAlvarez committed Jul 2, 2026
commit a26972c4297f972de7f712f70f9911162bc95dfd
8 changes: 4 additions & 4 deletions crates/jit/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,10 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
let expected = self.sig.ret.as_ref().ok_or(JitCompileError::NotSupported)?;

let value = match (expected, val) {
(JitType::Int, JitValue::Int(v)) => v,
(JitType::Float, JitValue::Float(v)) => v,
(JitType::Bool, JitValue::Bool(v)) => v,
(JitType::Object, JitValue::Object(v, _)) => v,
(JitType::Int, JitValue::Int(v)) => v,
(JitType::Float, JitValue::Float(v)) => v,
(JitType::Bool, JitValue::Bool(v)) => v,
(JitType::Object, JitValue::Object(v, _)) => v,
_ => return Err(JitCompileError::NotSupported),
};

Expand Down
2 changes: 1 addition & 1 deletion crates/jit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,4 @@ impl Args<'_> {
let cif_args: Vec<_> = self.values.iter().map(AbiValue::to_libffi_arg).collect();
unsafe { self.code.invoke_raw(&cif_args) }
}
}
}
3 changes: 1 addition & 2 deletions crates/vm/src/builtins/function/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ fn get_jit_arg_type(dict: &Py<PyDict>, name: &str, vm: &VirtualMachine) -> PyRes
Ok(JitType::Bool)
} else if value.is(vm.ctx.types.tuple_type) {
Ok(JitType::Object)
}
else {
} else {
Err(new_jit_error(
"Jit requires argument to be either int, float, bool or a tuple".to_owned(),
vm,
Expand Down
Loading