mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
This commit is contained in:
commit
adf4ad22a5
90 changed files with 3197 additions and 2191 deletions
|
@ -13,7 +13,7 @@ use crate::llvm::build_list::{
|
|||
self, allocate_list, empty_polymorphic_list, list_all, list_any, list_append, list_concat,
|
||||
list_contains, list_drop_at, list_find_unsafe, list_get_unsafe, list_join, list_keep_errs,
|
||||
list_keep_if, list_keep_oks, list_len, list_map, list_map2, list_map3, list_map4,
|
||||
list_map_with_index, list_prepend, list_range, list_repeat, list_reverse, list_set,
|
||||
list_map_with_index, list_prepend, list_range, list_repeat, list_replace_unsafe, list_reverse,
|
||||
list_single, list_sort_with, list_sublist, list_swap,
|
||||
};
|
||||
use crate::llvm::build_str::{
|
||||
|
@ -710,7 +710,7 @@ fn promote_to_main_function<'a, 'ctx, 'env>(
|
|||
top_level: ProcLayout<'a>,
|
||||
) -> (&'static str, FunctionValue<'ctx>) {
|
||||
let it = top_level.arguments.iter().copied();
|
||||
let bytes = roc_mono::alias_analysis::func_name_bytes_help(symbol, it, &top_level.result);
|
||||
let bytes = roc_alias_analysis::func_name_bytes_help(symbol, it, &top_level.result);
|
||||
let func_name = FuncName(&bytes);
|
||||
let func_solutions = mod_solutions.func_solutions(func_name).unwrap();
|
||||
|
||||
|
@ -4045,7 +4045,7 @@ pub fn build_proc_headers<'a, 'ctx, 'env>(
|
|||
// Populate Procs further and get the low-level Expr from the canonical Expr
|
||||
let mut headers = Vec::with_capacity_in(procedures.len(), env.arena);
|
||||
for ((symbol, layout), proc) in procedures {
|
||||
let name_bytes = roc_mono::alias_analysis::func_name_bytes(&proc);
|
||||
let name_bytes = roc_alias_analysis::func_name_bytes(&proc);
|
||||
let func_name = FuncName(&name_bytes);
|
||||
|
||||
let func_solutions = mod_solutions.func_solutions(func_name).unwrap();
|
||||
|
@ -4110,7 +4110,7 @@ fn build_procedures_help<'a, 'ctx, 'env>(
|
|||
|
||||
let it = procedures.iter().map(|x| x.1);
|
||||
|
||||
let solutions = match roc_mono::alias_analysis::spec_program(opt_level, entry_point, it) {
|
||||
let solutions = match roc_alias_analysis::spec_program(opt_level, entry_point, it) {
|
||||
Err(e) => panic!("Error in alias analysis: {}", e),
|
||||
Ok(solutions) => solutions,
|
||||
};
|
||||
|
@ -4118,7 +4118,7 @@ fn build_procedures_help<'a, 'ctx, 'env>(
|
|||
let solutions = env.arena.alloc(solutions);
|
||||
|
||||
let mod_solutions = solutions
|
||||
.mod_solutions(roc_mono::alias_analysis::MOD_APP)
|
||||
.mod_solutions(roc_alias_analysis::MOD_APP)
|
||||
.unwrap();
|
||||
|
||||
// Add all the Proc headers to the module.
|
||||
|
@ -4470,11 +4470,8 @@ pub fn build_proc<'a, 'ctx, 'env>(
|
|||
// * roc__mainForHost_1_Update_result_size() -> i64
|
||||
|
||||
let it = top_level.arguments.iter().copied();
|
||||
let bytes = roc_mono::alias_analysis::func_name_bytes_help(
|
||||
symbol,
|
||||
it,
|
||||
&top_level.result,
|
||||
);
|
||||
let bytes =
|
||||
roc_alias_analysis::func_name_bytes_help(symbol, it, &top_level.result);
|
||||
let func_name = FuncName(&bytes);
|
||||
let func_solutions = mod_solutions.func_solutions(func_name).unwrap();
|
||||
|
||||
|
@ -5666,12 +5663,12 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
wrapper_struct,
|
||||
)
|
||||
}
|
||||
ListSet => {
|
||||
ListReplaceUnsafe => {
|
||||
let list = load_symbol(scope, &args[0]);
|
||||
let index = load_symbol(scope, &args[1]);
|
||||
let (element, element_layout) = load_symbol_and_layout(scope, &args[2]);
|
||||
|
||||
list_set(
|
||||
list_replace_unsafe(
|
||||
env,
|
||||
layout_ids,
|
||||
list,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue