-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Names::getValidNameGivenExisting in binary reading (#6793)
We had a TODO to use it once Names was optimized, which it has been. The Names version is also far faster. When building https://github.com/JetBrains/kotlinconf-app it saves 70 seconds(!).
- Loading branch information
Showing
9 changed files
with
48 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | ||
;; RUN: wasm-opt %s.wasm -S -o - | filecheck %s | ||
|
||
;; Test handling of duplicated names where the name in the binary format | ||
;; overlaps with the suffix we add to deduplicate. The binary here uses a '.' | ||
;; in one of the names, which will overlap if we use '.2' etc. to differentiate. | ||
|
||
|
||
;; CHECK: (type $0 (func (result i32))) | ||
|
||
;; CHECK: (func $foo (result i32) | ||
;; CHECK-NEXT: (i32.const 0) | ||
;; CHECK-NEXT: ) | ||
|
||
;; CHECK: (func $foo_1 (result i32) | ||
;; CHECK-NEXT: (i32.const 1) | ||
;; CHECK-NEXT: ) | ||
|
||
;; CHECK: (func $foo.1 (result i32) | ||
;; CHECK-NEXT: (i32.const 2) | ||
;; CHECK-NEXT: ) |
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
test/lit/binary/duplicated_names_collision_underscore.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | ||
;; RUN: wasm-opt %s.wasm -S -o - | filecheck %s | ||
|
||
;; Test handling of duplicated names where the name in the binary format | ||
;; overlaps with the suffix we add to deduplicate. This is similar to | ||
;; the non-underscore version of this test, but has an '_' in the name. | ||
|
||
|
||
;; CHECK: (type $0 (func (result i32))) | ||
|
||
;; CHECK: (func $foo (result i32) | ||
;; CHECK-NEXT: (i32.const 0) | ||
;; CHECK-NEXT: ) | ||
|
||
;; CHECK: (func $foo_1 (result i32) | ||
;; CHECK-NEXT: (i32.const 1) | ||
;; CHECK-NEXT: ) | ||
|
||
;; CHECK: (func $foo_1_2 (result i32) | ||
;; CHECK-NEXT: (i32.const 2) | ||
;; CHECK-NEXT: ) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters