-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/compat): Fix
classes
pass (#3107)
swc_ecma_ast: - Add `Ident::verify_symbol`. swc_ecma_transforms_compat: - Don't generate invalid identifiers. (Closes #3106)
- Loading branch information
Showing
5 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
10 changes: 10 additions & 0 deletions
10
crates/swc_ecma_transforms_compat/tests/fixture/classes/issue-3106/1/exec.js
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,10 @@ | ||
class ValidationStrategy { | ||
static "object?"(value) { | ||
return 1; | ||
} | ||
|
||
static "string!"(value) { | ||
return 2; | ||
} | ||
} | ||
console.log(ValidationStrategy.prototype['string!']); |
d923f89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
full_es2015
218630662
ns/iter (± 11820818
)184696207
ns/iter (± 5919248
)1.18
full_es2016
179267692
ns/iter (± 9260659
)153820814
ns/iter (± 6148785
)1.17
full_es2017
184929757
ns/iter (± 13905304
)157317635
ns/iter (± 6161648
)1.18
full_es2018
183525219
ns/iter (± 12228732
)157241633
ns/iter (± 6307768
)1.17
full_es2019
184361774
ns/iter (± 15389514
)154599971
ns/iter (± 8131076
)1.19
full_es2020
181203203
ns/iter (± 15660779
)153648859
ns/iter (± 5903251
)1.18
full_es3
249169648
ns/iter (± 12966730
)211121587
ns/iter (± 13167561
)1.18
full_es5
232757995
ns/iter (± 15255831
)196094844
ns/iter (± 7641572
)1.19
parser
795682
ns/iter (± 31309
)685831
ns/iter (± 22848
)1.16
This comment was automatically generated by workflow using github-action-benchmark.