Repository navigation
Conversation
e973c0b to
2426298
Compare
|
It looks like garbage collection tests are finally working. It took me 4 months, but the initial version of garbage collection support is completed. I think I understand the concept of references in WebAssembly, and know why it works that way. The code probably needs a lot of changes. |
645b133 to
1917fb3
Compare
from: WebAssembly/wabt#2622 https://github.com/zherczeg/wabt/tree/gc_tests Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
from: https://github.com/zherczeg/wabt/tree/gc_tests (1917fb3) WebAssembly/wabt#2622 Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
from: https://github.com/zherczeg/wabt/tree/gc_tests (1917fb3) WebAssembly/wabt#2622 Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
from: https://github.com/zherczeg/wabt/tree/gc_tests (1917fb3) WebAssembly/wabt#2622 Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
from: https://github.com/zherczeg/wabt/tree/gc_tests (1917fb3) WebAssembly/wabt#2622 Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
from: https://github.com/zherczeg/wabt/tree/gc_tests (1917fb3) WebAssembly/wabt#2622 Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
note: this requires a version of wabt which doesn't exist yet, see WebAssembly/wabt#2622
46dac3d to
692da15
Compare
|
So exciting to see this moving along! |
|
Thank you! I try to update this patchset reguraly. The longer term aim is full wasm 3.0 support, but I also do some work on WebAssembly Components. Do you need this code for something? |
|
I work with the |
|
If you want a sample file: https://bouncing.web.app/main.dart.wasm |
743218b to
595a459
Compare
9e1178d to
afe6c80
Compare
29627a7 to
4247008
Compare
|
Sweet! |
|
I am updating these patches but I don't know when they land. The first one in the set has a birthday soon! |
7aa8c6e to
2eddd7f
Compare
89a2eae to
55f7c9c
Compare
8c7f8d3 to
1ffa928
Compare
47290eb to
61e8e04
Compare
|
I have some good news. Due to the recent improvements of wabt, with this patchset the webassembly 3.0 spec tests can be run with wabt. |
kripken
left a comment
There was a problem hiding this comment.
Hi! While I'm not normally a wabt reviewer, I do know a bit about WasmGC, and I think it would be great for the community to get this patchset landed, so I took a bit of a look now.
| case Opcode::I32X4RelaxedTruncF64X2UZero: | ||
| case Opcode::RefEq: | ||
| // 0 immediates, 1 operand. | ||
| instr.kind = InstrKind::Imm_0_Op_1; |
There was a problem hiding this comment.
Doesn't RefEq takes two operands, the two references to compare for equality?
Do we not have a test for RefEq? (If we do, how did it pass?)
There was a problem hiding this comment.
Nice catch! Probably just pure luck, since only the number of immediates matter (the values are on the stack, they don't need to be read from the byte stream). There are 3 PR-s for the patchset, I will fix this in the relevant one.
There was a problem hiding this comment.
Oh, is the order of the 3 PRs listed somewhere?
| *out_value = Type(is_nullable ? Type::RefNull : Type::Ref, | ||
| static_cast<Index>(heap_type)); | ||
| } | ||
| return Result::Ok; |
There was a problem hiding this comment.
I was expecting to see a check that the type index is in bounds (less than the number of types) - should that not be here?
There was a problem hiding this comment.
No. Webassenbly has rules for malformed and invalid forms. Malformed data should cause a fail during parsing. However, an invalid webassembly should be accepted, and validation should reject it later. Hence an invalid webassembly file could be read and written back without issues.
This patch supports parsing the new GC types - Abstract types - Recursive types - Composite types The patch also improves type comparison.
This patch adds support for all tests in
testsuite/proposals/gc. Two tests are still missing.