mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
explicitly store and pass layout of a function passed to lowlevel
This commit is contained in:
parent
357f93a2ee
commit
3739f41cac
3 changed files with 103 additions and 87 deletions
|
@ -446,11 +446,13 @@ pub enum ListWalk {
|
|||
}
|
||||
|
||||
pub fn list_walk_help<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
env: &'ctx Env<'a, 'ctx, 'env>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
scope: &crate::llvm::build::Scope<'a, 'ctx>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
args: &[roc_module::symbol::Symbol],
|
||||
function: FunctionValue<'a>,
|
||||
function_layout: Layout<'a>,
|
||||
variant: ListWalk,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
use crate::llvm::build::load_symbol_and_layout;
|
||||
|
@ -461,8 +463,6 @@ pub fn list_walk_help<'a, 'ctx, 'env>(
|
|||
|
||||
let (default, default_layout) = load_symbol_and_layout(scope, &args[1]);
|
||||
|
||||
let (function_layout, function) = scope.function_pointers[&args[2]];
|
||||
|
||||
let (closure, closure_layout) = load_symbol_and_layout(scope, &args[3]);
|
||||
|
||||
match list_layout {
|
||||
|
@ -485,7 +485,7 @@ pub fn list_walk_help<'a, 'ctx, 'env>(
|
|||
}
|
||||
}
|
||||
|
||||
fn list_walk_generic<'a, 'ctx, 'env>(
|
||||
pub fn list_walk_generic<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
_parent: FunctionValue<'ctx>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue