diff options
author | Thomas Lively <tlively@google.com> | 2023-12-20 14:17:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 14:17:35 -0800 |
commit | fb7d00b336c8d682cbaaf02c96dab64b39d941ba (patch) | |
tree | 8b01240df861436fd0b74d2175155fa334f724bc /test/lit/exec/negative-zero.wast | |
parent | 2b81d39e133ff443c09837c7b0bf77e661d15345 (diff) | |
download | binaryen-fb7d00b336c8d682cbaaf02c96dab64b39d941ba.tar.gz binaryen-fb7d00b336c8d682cbaaf02c96dab64b39d941ba.tar.bz2 binaryen-fb7d00b336c8d682cbaaf02c96dab64b39d941ba.zip |
Drop support for non-standard quoted function names (#6188)
We previously supported a non-standard `(func "name" ...` syntax for declaring
functions exported with the quoted name. Since that is not part of the standard
text format, drop support for it, replacing it with the standard `(func $name
(export "name") ...` syntax instead.
Also replace our other usage of the quoted form in our text output, which was
where we quoted names containing characters that are not allowed to appear in
standard names. To handle that case, adjust our output from `"$name"` to
`$"name"`, which is the standards-track way of supporting such names. Also fix
how we detect non-standard name characters to match the spec.
Update the lit test output generation script to account for these changes,
including by making the `$` prefix on names mandatory. This causes the script to
stop interpreting declarative element segments with the `(elem declare ...`
syntax as being named "declare", so prevent our generated output from regressing
by counting "declare" as a name in the script.
Diffstat (limited to 'test/lit/exec/negative-zero.wast')
-rw-r--r-- | test/lit/exec/negative-zero.wast | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/lit/exec/negative-zero.wast b/test/lit/exec/negative-zero.wast index 4a1e339ca..2c45dbdfb 100644 --- a/test/lit/exec/negative-zero.wast +++ b/test/lit/exec/negative-zero.wast @@ -5,7 +5,7 @@ (module ;; CHECK: [fuzz-exec] calling min1 ;; CHECK-NEXT: [fuzz-exec] note result: min1 => -0 - (func "min1" (result f64) + (func $min1 (export "min1") (result f64) ;; This should return -0. (f64.min (f64.const 0) @@ -15,7 +15,7 @@ ;; CHECK: [fuzz-exec] calling min2 ;; CHECK-NEXT: [fuzz-exec] note result: min2 => -0 - (func "min2" (result f64) + (func $min2 (export "min2") (result f64) ;; Flipped arms; still -0. (f64.min (f64.const -0) @@ -25,7 +25,7 @@ ;; CHECK: [fuzz-exec] calling min1-f32 ;; CHECK-NEXT: [fuzz-exec] note result: min1-f32 => -0 - (func "min1-f32" (result f32) + (func $min1-f32 (export "min1-f32") (result f32) ;; As above, but f32 and not f64 (f32.min (f32.const 0) @@ -35,7 +35,7 @@ ;; CHECK: [fuzz-exec] calling min2-f32 ;; CHECK-NEXT: [fuzz-exec] note result: min2-f32 => -0 - (func "min2-f32" (result f32) + (func $min2-f32 (export "min2-f32") (result f32) ;; Flipped arms; still -0. (f32.min (f32.const -0) @@ -45,7 +45,7 @@ ;; CHECK: [fuzz-exec] calling max1 ;; CHECK-NEXT: [fuzz-exec] note result: max1 => 0 - (func "max1" (result f64) + (func $max1 (export "max1") (result f64) ;; This should return 0. (f64.max (f64.const 0) @@ -55,7 +55,7 @@ ;; CHECK: [fuzz-exec] calling max2 ;; CHECK-NEXT: [fuzz-exec] note result: max2 => 0 - (func "max2" (result f64) + (func $max2 (export "max2") (result f64) ;; Flipped arms; still 0. (f64.max (f64.const -0) @@ -65,7 +65,7 @@ ;; CHECK: [fuzz-exec] calling max1-f32 ;; CHECK-NEXT: [fuzz-exec] note result: max1-f32 => 0 - (func "max1-f32" (result f32) + (func $max1-f32 (export "max1-f32") (result f32) ;; As above, but f32 and not f64 (f32.max (f32.const 0) @@ -76,7 +76,7 @@ ;; CHECK: [fuzz-exec] calling max2-f32 ;; CHECK-NEXT: [fuzz-exec] note result: max2-f32 => 0 ;; CHECK-NEXT: warning: no passes specified, not doing any work - (func "max2-f32" (result f32) + (func $max2-f32 (export "max2-f32") (result f32) ;; Flipped arms; still 0. (f32.max (f32.const -0) |