mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
feat(wasm): start StrToNum
This commit is contained in:
parent
715c441b25
commit
cd42f034b5
2 changed files with 220 additions and 1 deletions
|
@ -46,7 +46,14 @@ pub fn dispatch_low_level<'a>(
|
|||
return NotImplemented;
|
||||
}
|
||||
StrCountGraphemes => return BuiltinCall(bitcode::STR_COUNT_GRAPEHEME_CLUSTERS),
|
||||
StrToNum => return NotImplemented, // choose builtin based on storage size
|
||||
StrToNum => match ret_layout {
|
||||
WasmLayout::Primitive(_, _) => return NotImplemented,
|
||||
WasmLayout::StackMemory { size, .. } => {
|
||||
// how do I decided Float vs. Int vs. Dec
|
||||
// how do I find out if it's signed or unsigned
|
||||
return BuiltinCall(bitcode::STR_TO_INT);
|
||||
}
|
||||
}, // choose builtin based on storage size
|
||||
StrFromInt => {
|
||||
// This does not get exposed in user space. We switched to NumToStr instead.
|
||||
// We can probably just leave this as NotImplemented. We may want remove this LowLevel.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue