Merge branch 'main' into div-0-should-crash

This commit is contained in:
Ayaz 2023-12-02 20:10:32 -06:00 committed by GitHub
commit 20bcd70ad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
195 changed files with 7098 additions and 1165 deletions

View file

@ -289,6 +289,11 @@ mod dummy_platform_functions {
unimplemented!("It is not valid to call roc panic from within the compiler. Please use the \"platform\" feature if this is a platform.")
}
#[no_mangle]
pub unsafe extern "C" fn roc_dbg(_loc: *mut c_void, _msg: *mut c_void) {
unimplemented!("It is not valid to call roc dbg from within the compiler. Please use the \"platform\" feature if this is a platform.")
}
#[no_mangle]
pub fn roc_memset(_dst: *mut c_void, _c: i32, _n: usize) -> *mut c_void {
unimplemented!("It is not valid to call roc memset from within the compiler. Please use the \"platform\" feature if this is a platform.")

View file

@ -2252,7 +2252,7 @@ impl<'a> LowLevelCall<'a> {
fn num_to_str(&self, backend: &mut WasmBackend<'a, '_>) {
let arg_layout = backend.storage.symbol_layouts[&self.arguments[0]];
match backend.layout_interner.get_repr(arg_layout) {
match backend.layout_interner.runtime_representation(arg_layout) {
LayoutRepr::Builtin(Builtin::Int(width)) => {
self.load_args_and_call_zig(backend, &bitcode::STR_FROM_INT[width])
}