mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
closure_env_layout
This commit is contained in:
parent
b54033a2f5
commit
cc98237a0a
6 changed files with 57 additions and 45 deletions
|
@ -830,9 +830,10 @@ pub fn build_exp_call<'a, 'ctx, 'env>(
|
|||
|
||||
CallType::HigherOrderLowLevel {
|
||||
op,
|
||||
closure_layout,
|
||||
function_owns_closure_data,
|
||||
specialization_id,
|
||||
arg_layouts,
|
||||
ret_layout,
|
||||
..
|
||||
} => {
|
||||
let bytes = specialization_id.to_bytes();
|
||||
|
@ -846,8 +847,9 @@ pub fn build_exp_call<'a, 'ctx, 'env>(
|
|||
scope,
|
||||
layout,
|
||||
*op,
|
||||
*closure_layout,
|
||||
func_spec,
|
||||
arg_layouts,
|
||||
ret_layout,
|
||||
*function_owns_closure_data,
|
||||
arguments,
|
||||
)
|
||||
|
@ -3815,8 +3817,9 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
|||
scope: &Scope<'a, 'ctx>,
|
||||
return_layout: &Layout<'a>,
|
||||
op: LowLevel,
|
||||
function_layout: Layout<'a>,
|
||||
func_spec: FuncSpec,
|
||||
argument_layouts: &[Layout<'a>],
|
||||
result_layout: &Layout<'a>,
|
||||
function_owns_closure_data: bool,
|
||||
args: &[Symbol],
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
|
@ -3828,6 +3831,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
|||
macro_rules! passed_function_at_index {
|
||||
($index:expr) => {{
|
||||
let function_symbol = args[$index];
|
||||
let function_layout = Layout::FunctionPointer(argument_layouts, return_layout);
|
||||
|
||||
function_value_by_func_spec(env, func_spec, function_symbol, function_layout)
|
||||
}};
|
||||
|
@ -4095,7 +4099,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
|||
env,
|
||||
layout_ids,
|
||||
roc_function_call,
|
||||
&function_layout,
|
||||
result_layout,
|
||||
list,
|
||||
before_layout,
|
||||
after_layout,
|
||||
|
@ -4139,7 +4143,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
|||
env,
|
||||
layout_ids,
|
||||
roc_function_call,
|
||||
&function_layout,
|
||||
result_layout,
|
||||
list,
|
||||
before_layout,
|
||||
after_layout,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue