mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Merge remote-tracking branch 'origin/main' into remove-nat
This commit is contained in:
commit
3e27e18566
73 changed files with 732 additions and 514 deletions
|
@ -4903,10 +4903,8 @@ fn expose_function_to_host_help_c_abi_v2<'a, 'ctx>(
|
|||
Attribute::get_named_enum_kind_id("byval"),
|
||||
c_abi_type.as_any_type_enum(),
|
||||
);
|
||||
let nonnull = context.create_type_attribute(
|
||||
Attribute::get_named_enum_kind_id("nonnull"),
|
||||
c_abi_type.as_any_type_enum(),
|
||||
);
|
||||
let nonnull = context
|
||||
.create_enum_attribute(Attribute::get_named_enum_kind_id("nonnull"), 0);
|
||||
// C return pointer goes at the beginning of params, and we must skip it if it exists.
|
||||
let returns_pointer = matches!(cc_return, CCReturn::ByPointer);
|
||||
let param_index = i as u32 + returns_pointer as u32;
|
||||
|
|
|
@ -128,7 +128,7 @@ macro_rules! run_jit_function {
|
|||
Err((error_msg, _)) => {
|
||||
eprintln!("This Roc code crashed with: \"{error_msg}\"");
|
||||
|
||||
Expr::MalformedClosure
|
||||
Expr::REPL_RUNTIME_CRASH
|
||||
}
|
||||
}
|
||||
}};
|
||||
|
@ -165,10 +165,10 @@ macro_rules! run_jit_function_dynamic_type {
|
|||
let result = Result::from(call_result);
|
||||
|
||||
match result {
|
||||
Ok(()) => $transform(output.add(CALL_RESULT_WIDTH) as usize),
|
||||
Err((msg, _crash_tag)) => {
|
||||
eprintln!("{}", msg);
|
||||
panic!("Roc hit an error");
|
||||
Ok(()) => Some($transform(output.add(CALL_RESULT_WIDTH) as usize)),
|
||||
Err((error_msg, _)) => {
|
||||
eprintln!("This Roc code crashed with: \"{error_msg}\"");
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue