add Str.releaseExcessCapacity

This commit is contained in:
Brendan Hansknecht 2023-03-14 21:57:19 -07:00
parent a80b25d044
commit 48f17a8e2c
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
11 changed files with 115 additions and 0 deletions

View file

@ -559,6 +559,18 @@ pub(crate) fn run_low_level<'a, 'ctx, 'env>(
bitcode::STR_RESERVE,
)
}
StrReleaseExcessCapacity => {
// Str.releaseExcessCapacity: Str -> Str
arguments!(string);
call_str_bitcode_fn(
env,
&[string],
&[],
BitcodeReturns::Str,
bitcode::STR_RELEASE_EXCESS_CAPACITY,
)
}
StrAppendScalar => {
// Str.appendScalar : Str, U32 -> Str
arguments!(string, capacity);