mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Merge branch 'main' into Frame-Limited
This commit is contained in:
commit
7759ce6fc4
31 changed files with 476 additions and 418 deletions
|
@ -1082,6 +1082,12 @@ pub fn build_exp_expr<'a, 'ctx, 'env>(
|
|||
|
||||
match expr {
|
||||
Literal(literal) => build_exp_literal(env, layout_interner, parent, layout, literal),
|
||||
NullPointer => {
|
||||
let basic_type = basic_type_from_layout(env, layout_interner, layout);
|
||||
|
||||
debug_assert!(basic_type.is_pointer_type());
|
||||
basic_type.into_pointer_type().const_zero().into()
|
||||
}
|
||||
|
||||
Call(call) => build_exp_call(
|
||||
env,
|
||||
|
|
|
@ -41,6 +41,8 @@ pub fn add_default_roc_externs(env: &Env<'_, '_, '_>) {
|
|||
// The type of this function (but not the implementation) should have
|
||||
// already been defined by the builtins, which rely on it.
|
||||
let fn_val = module.get_function("roc_alloc").unwrap();
|
||||
fn_val.set_linkage(Linkage::Internal);
|
||||
|
||||
let mut params = fn_val.get_param_iter();
|
||||
let size_arg = params.next().unwrap();
|
||||
let _alignment_arg = params.next().unwrap();
|
||||
|
@ -135,6 +137,8 @@ pub fn add_default_roc_externs(env: &Env<'_, '_, '_>) {
|
|||
// The type of this function (but not the implementation) should have
|
||||
// already been defined by the builtins, which rely on it.
|
||||
let fn_val = module.get_function("roc_dealloc").unwrap();
|
||||
fn_val.set_linkage(Linkage::Internal);
|
||||
|
||||
let mut params = fn_val.get_param_iter();
|
||||
let ptr_arg = params.next().unwrap();
|
||||
let _alignment_arg = params.next().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue