Merge remote-tracking branch 'origin/main' into remove-nat

This commit is contained in:
Richard Feldman 2024-01-29 06:48:20 -05:00
commit 3e27e18566
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
73 changed files with 732 additions and 514 deletions

View file

@ -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;

View file

@ -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
}
}
}