diff options
author | Alon Zakai <azakai@google.com> | 2023-04-11 10:47:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 17:47:30 +0000 |
commit | 18898347e7c4ceb86988bdb8594160883f7886f0 (patch) | |
tree | ad934605a71cc8a3638b5388ae72c57cce08165f /test/ctor-eval/results.wast.out | |
parent | 160dda0aa5ecc8252c5862cd937157296d9015cb (diff) | |
download | binaryen-18898347e7c4ceb86988bdb8594160883f7886f0.tar.gz binaryen-18898347e7c4ceb86988bdb8594160883f7886f0.tar.bz2 binaryen-18898347e7c4ceb86988bdb8594160883f7886f0.zip |
Add a name hint to getValidName() (#5653)
Without the hint, we always look for a valid name using name$0, $1, $2, etc.,
starting from 0, and in some cases that can lead to quadratic behavior.
Noticed on a testcase in the fuzzer that runs for over 24 seconds (I gave up at
that point) but takes only 2 seconds with this.
Diffstat (limited to 'test/ctor-eval/results.wast.out')
-rw-r--r-- | test/ctor-eval/results.wast.out | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ctor-eval/results.wast.out b/test/ctor-eval/results.wast.out index 0194cabb6..4259369b5 100644 --- a/test/ctor-eval/results.wast.out +++ b/test/ctor-eval/results.wast.out @@ -7,9 +7,9 @@ (global $global3 (mut i32) (i32.const 13)) (global $global4 (mut i32) (i32.const 14)) (global $global5 (mut i32) (i32.const 15)) - (export "test1" (func $test1_0)) - (export "test3" (func $test3_0)) - (export "test5" (func $test5_0)) + (export "test1" (func $test1_7)) + (export "test3" (func $test3_8)) + (export "test5" (func $test5_9)) (export "keepalive" (func $5)) (func $test1 (type $none_=>_none) (global.set $global1 @@ -66,13 +66,13 @@ ) ) ) - (func $test1_0 (type $none_=>_none) + (func $test1_7 (type $none_=>_none) (nop) ) - (func $test3_0 (type $none_=>_i32) (result i32) + (func $test3_8 (type $none_=>_i32) (result i32) (i32.const 42) ) - (func $test5_0 (type $none_=>_i32) (result i32) + (func $test5_9 (type $none_=>_i32) (result i32) (call $import) (i32.const 100) ) |