mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects
This commit is contained in:
commit
e62ab00c65
275 changed files with 4038 additions and 2432 deletions
|
@ -718,7 +718,7 @@ pub fn construct_optimization_passes<'a>(
|
|||
OptLevel::Optimize => {
|
||||
pmb.set_optimization_level(OptimizationLevel::Aggressive);
|
||||
// this threshold seems to do what we want
|
||||
pmb.set_inliner_with_threshold(275);
|
||||
pmb.set_inliner_with_threshold(750);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6049,6 +6049,20 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
bitcode::STR_TRIM_RIGHT,
|
||||
)
|
||||
}
|
||||
StrWithCapacity => {
|
||||
// Str.withCapacity : Nat -> Str
|
||||
debug_assert_eq!(args.len(), 1);
|
||||
|
||||
let str_len = load_symbol(scope, &args[0]);
|
||||
|
||||
call_str_bitcode_fn(
|
||||
env,
|
||||
&[],
|
||||
&[str_len],
|
||||
BitcodeReturns::Str,
|
||||
bitcode::STR_WITH_CAPACITY,
|
||||
)
|
||||
}
|
||||
ListLen => {
|
||||
// List.len : List * -> Nat
|
||||
debug_assert_eq!(args.len(), 1);
|
||||
|
@ -6171,7 +6185,7 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
list_prepend(env, original_wrapper, elem, elem_layout)
|
||||
}
|
||||
StrGetUnsafe => {
|
||||
// List.getUnsafe : Str, Nat -> u8
|
||||
// Str.getUnsafe : Str, Nat -> u8
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
|
||||
let wrapper_struct = load_symbol(scope, &args[0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue