mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
inc lowlevel return value
This commit is contained in:
parent
e28db15b7e
commit
c1ced3c5d2
15 changed files with 227 additions and 189 deletions
|
@ -3,7 +3,6 @@ use crate::llvm::build::{
|
|||
allocate_with_refcount_help, cast_basic_basic, Env, RocFunctionCall, Scope,
|
||||
};
|
||||
use crate::llvm::convert::basic_type_from_layout;
|
||||
use crate::llvm::refcounting::increment_refcount_layout;
|
||||
use inkwell::builder::Builder;
|
||||
use inkwell::types::{BasicType, PointerType};
|
||||
use inkwell::values::{BasicValueEnum, FunctionValue, IntValue, PointerValue, StructValue};
|
||||
|
@ -125,7 +124,6 @@ pub(crate) fn list_with_capacity<'a, 'ctx, 'env>(
|
|||
pub(crate) fn list_get_unsafe<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
layout_interner: &mut STLayoutInterner<'a>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
element_layout: InLayout<'a>,
|
||||
elem_index: IntValue<'ctx>,
|
||||
wrapper_struct: StructValue<'ctx>,
|
||||
|
@ -148,17 +146,13 @@ pub(crate) fn list_get_unsafe<'a, 'ctx, 'env>(
|
|||
)
|
||||
};
|
||||
|
||||
let result = load_roc_value(
|
||||
load_roc_value(
|
||||
env,
|
||||
layout_interner,
|
||||
element_layout,
|
||||
elem_ptr,
|
||||
"list_get_load_element",
|
||||
);
|
||||
|
||||
increment_refcount_layout(env, layout_interner, layout_ids, 1, result, element_layout);
|
||||
|
||||
result
|
||||
)
|
||||
}
|
||||
|
||||
/// List.reserve : List elem, Nat -> List elem
|
||||
|
|
|
@ -807,7 +807,6 @@ pub(crate) fn run_low_level<'a, 'ctx, 'env>(
|
|||
list_get_unsafe(
|
||||
env,
|
||||
layout_interner,
|
||||
layout_ids,
|
||||
list_element_layout!(layout_interner, list_layout),
|
||||
element_index.into_int_value(),
|
||||
wrapper_struct.into_struct_value(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue