mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
use RocCallResult and pass-by-reference in all examples
This commit is contained in:
parent
89e9549d85
commit
5897a07962
6 changed files with 61 additions and 8 deletions
|
@ -1960,9 +1960,15 @@ fn make_exception_catching_wrapper<'a, 'ctx, 'env>(
|
|||
let result_alloca = builder.build_alloca(wrapper_return_type, "result");
|
||||
|
||||
// invoke instead of call, so that we can catch any exeptions thrown in Roc code
|
||||
let arguments = wrapper_function.get_params();
|
||||
let call_result = {
|
||||
let call =
|
||||
builder.build_invoke(roc_function, &[], then_block, catch_block, "call_roc_main");
|
||||
let call = builder.build_invoke(
|
||||
roc_function,
|
||||
&arguments,
|
||||
then_block,
|
||||
catch_block,
|
||||
"call_roc_function",
|
||||
);
|
||||
call.set_call_convention(FAST_CALL_CONV);
|
||||
call.try_as_basic_value().left().unwrap()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue