Merge remote-tracking branch 'remote/main' into remove-json

This commit is contained in:
Luke Boswell 2023-06-07 15:38:01 +10:00
commit 092676c4b7
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
92 changed files with 2039 additions and 417 deletions

View file

@ -14,6 +14,8 @@ use roc_mono::layout::{LayoutRepr, STLayoutInterner};
#[cfg(test)]
use roc_std::{RocList, RocStr, U128};
use crate::helpers::with_larger_debug_stack;
#[test]
fn width_and_alignment_u8_u8() {
use roc_mono::layout::Layout;
@ -2167,27 +2169,29 @@ fn refcount_nullable_unwrapped_needing_no_refcount_issue_5027() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn issue_5162_recast_nested_nullable_unwrapped_layout() {
assert_evals_to!(
indoc!(
r###"
app "test" provides [main] to "./platform"
with_larger_debug_stack(|| {
assert_evals_to!(
indoc!(
r###"
app "test" provides [main] to "./platform"
Concept : [
AtomicConcept,
ExistentialRestriction { role : Str, concept : Concept }
]
Concept : [
AtomicConcept,
ExistentialRestriction { role : Str, concept : Concept }
]
bottom : Concept
bottom = AtomicConcept
bottom : Concept
bottom = AtomicConcept
main =
when Dict.single bottom 0 is
_ -> Bool.true
"###
),
true,
bool
);
main =
when Dict.single bottom 0 is
_ -> Bool.true
"###
),
true,
bool
);
});
}
#[test]

View file

@ -7,13 +7,6 @@ pub unsafe fn roc_alloc(size: usize, _alignment: u32) -> *mut c_void {
libc::malloc(size)
}
/// # Safety
/// The Roc application needs this.
#[no_mangle]
pub unsafe fn roc_memcpy(dest: *mut c_void, src: *const c_void, bytes: usize) -> *mut c_void {
libc::memcpy(dest, src, bytes)
}
/// # Safety
/// The Roc application needs this.
#[no_mangle]

View file

@ -134,13 +134,6 @@ void roc_panic(void* msg, unsigned int tag_id)
//--------------------------
void roc_memcpy(void *dest, const void *src, size_t n)
{
memcpy(dest, src, n);
}
//--------------------------
void *roc_memset(void *str, int c, size_t n)
{
return memset(str, c, n);