mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
wasm: fix WasmLayout for LambdaSet
This commit is contained in:
parent
a63e55e023
commit
ab3a75b754
2 changed files with 6 additions and 5 deletions
|
@ -86,9 +86,10 @@ impl WasmLayout {
|
||||||
format: StackMemoryFormat::Decimal,
|
format: StackMemoryFormat::Decimal,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Layout::LambdaSet(lambda_set) => WasmLayout::new(&lambda_set.runtime_representation()),
|
||||||
|
|
||||||
Layout::Builtin(Str | Dict(_, _) | Set(_) | List(_))
|
Layout::Builtin(Str | Dict(_, _) | Set(_) | List(_))
|
||||||
| Layout::Struct { .. }
|
| Layout::Struct { .. }
|
||||||
| Layout::LambdaSet(_)
|
|
||||||
| Layout::Union(NonRecursive(_)) => Self::StackMemory {
|
| Layout::Union(NonRecursive(_)) => Self::StackMemory {
|
||||||
size,
|
size,
|
||||||
alignment_bytes,
|
alignment_bytes,
|
||||||
|
|
|
@ -2660,7 +2660,7 @@ fn pattern_match_unit_tag() {
|
||||||
// see for why this is disabled on wasm32 https://github.com/rtfeldman/roc/issues/1687
|
// see for why this is disabled on wasm32 https://github.com/rtfeldman/roc/issues/1687
|
||||||
#[cfg(not(feature = "wasm-cli-run"))]
|
#[cfg(not(feature = "wasm-cli-run"))]
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(any(feature = "gen-llvm"))]
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||||
fn mirror_llvm_alignment_padding() {
|
fn mirror_llvm_alignment_padding() {
|
||||||
// see https://github.com/rtfeldman/roc/issues/1569
|
// see https://github.com/rtfeldman/roc/issues/1569
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
|
@ -2683,7 +2683,7 @@ fn mirror_llvm_alignment_padding() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(any(feature = "gen-llvm"))]
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||||
fn lambda_set_bool() {
|
fn lambda_set_bool() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
indoc!(
|
indoc!(
|
||||||
|
@ -2708,7 +2708,7 @@ fn lambda_set_bool() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(any(feature = "gen-llvm"))]
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||||
fn lambda_set_byte() {
|
fn lambda_set_byte() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
indoc!(
|
indoc!(
|
||||||
|
@ -2762,7 +2762,7 @@ fn lambda_set_struct_byte() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(any(feature = "gen-llvm"))]
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||||
fn lambda_set_enum_byte_byte() {
|
fn lambda_set_enum_byte_byte() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
indoc!(
|
indoc!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue