Record Android generation cleanup patterns
ober
8cfb5c2054cb2def65de0d81e9f22f9d13e6c15a
--- a/data/anti-patterns.sexp +++ b/data/anti-patterns.sexp @@ -4531,4 +4531,4 @@ "jerboa_anti_pattern_lookup" "jerboa_request_advisor" "rg vendor/ChezScheme/c/thread.c" - "make check-docs"))) + "make check-docs")) --- a/data/error-fixes.sexp +++ b/data/error-fixes.sexp @@ -2764,4 +2764,18 @@ ("pattern" . "i31\\.get_[su].*expected type i31ref, found .* type eqref") + ("type" . "wasm-gc-validation")) + (("code_example" + . + ";; Keep semantic types structurally distinct when ref.test must separate them.\n(wasm-module-add-type! mod\n (make-wasm-struct-type\n (list (make-wasm-field-type name-string-ref #f))))\n(wasm-module-add-type! mod\n (make-wasm-struct-type\n (list (make-wasm-field-type name-string-ref #f)\n (make-wasm-field-type wasm-type-i32 #f))))") + ("explanation" + . + "Current engines may validate `ref.test` against structurally equivalent Wasm-GC types in ways that make two semantic tags indistinguishable. In Jerboa's Wasm-GC backend, symbols and keywords initially used identical one-field structs, so both `symbol?` and `keyword?` matched both values. A follow-up layout edit also caused `struct.new` arity failures when the type gained a field but its global initializer still pushed the old field count.") + ("fix" + . + "When two semantic value classes must be distinct under `ref.test`, give their Wasm-GC structs distinct shapes, such as an immutable tag field. After changing struct fields, update every `struct.new`, global initializer, field index, and result wrapper that constructs or reads that type.") + ("id" . "wasm-gc-distinct-semantic-struct-layouts") + ("pattern" + . + "not enough arguments on the stack for struct\\.new \\(need [0-9]+, got [0-9]+\\)|ref\\.test.*semantic.*struct") ("type" . "wasm-gc-validation")))