-
-
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.
refactor(es): Remove settings related to
privateInObject
(#6468)
- Loading branch information
Showing
13 changed files
with
29 additions
and
34 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"jsc": { | ||
"parser": { | ||
"syntax": "ecmascript" | ||
}, | ||
"target": "es5" | ||
}, | ||
"module": { | ||
"type": "es6" | ||
}, | ||
"isModule": true | ||
} |
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 @@ | ||
class x { static #y = #y in x ; } |
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,9 @@ | ||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; | ||
var x = function x() { | ||
"use strict"; | ||
_class_call_check(this, x); | ||
}; | ||
var _y = { | ||
writable: true, | ||
value: x === x | ||
}; |
5 changes: 2 additions & 3 deletions
5
crates/swc/tests/tsc-references/privateNameInInExpressionUnused.1.normal.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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
//// [privateNameInInExpressionUnused.ts] | ||
var _brand_check_brand = new WeakSet(); | ||
class Foo { | ||
#unused; | ||
#brand = void _brand_check_brand.add(this); | ||
#brand; | ||
isFoo(v) { | ||
// This should count as using/reading '#brand' | ||
return _brand_check_brand.has(v); | ||
return #brand in v; | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
crates/swc/tests/tsc-references/privateNameInInExpressionUnused.2.minified.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 |
---|---|---|
@@ -1,2 +1 @@ | ||
//// [privateNameInInExpressionUnused.ts] | ||
new WeakSet(); |
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
5 changes: 2 additions & 3 deletions
5
crates/swc_ecma_parser/tests/test262-error-references/fail/c3731145e0e65d1d.js.stderr
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
|
||
x Unexpected token `#`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, regexp, ` | ||
| for template literal, (, or an identifier | ||
x Expected ident | ||
,-[$DIR/tests/test262-parser/fail/c3731145e0e65d1d.js:1:1] | ||
1 | #= | ||
: ^ | ||
: ^ | ||
`---- |
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
c57307d
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
es/full/bugs-1
374285
ns/iter (± 24614
)343924
ns/iter (± 22485
)1.09
es/full/minify/libraries/antd
2009259990
ns/iter (± 40646178
)1843749333
ns/iter (± 35421072
)1.09
es/full/minify/libraries/d3
430972970
ns/iter (± 12555504
)387498447
ns/iter (± 5737899
)1.11
es/full/minify/libraries/echarts
1662554773
ns/iter (± 23161288
)1572904733
ns/iter (± 20004804
)1.06
es/full/minify/libraries/jquery
106754203
ns/iter (± 4099451
)98456298
ns/iter (± 1250161
)1.08
es/full/minify/libraries/lodash
137363179
ns/iter (± 8907230
)118166720
ns/iter (± 2299627
)1.16
es/full/minify/libraries/moment
67505846
ns/iter (± 2041159
)59148603
ns/iter (± 1227695
)1.14
es/full/minify/libraries/react
22600132
ns/iter (± 1324463
)19805763
ns/iter (± 491219
)1.14
es/full/minify/libraries/terser
353253471
ns/iter (± 7715785
)294796142
ns/iter (± 8290835
)1.20
es/full/minify/libraries/three
616425752
ns/iter (± 10261402
)565727456
ns/iter (± 7292018
)1.09
es/full/minify/libraries/typescript
3714122264
ns/iter (± 86495381
)3371443301
ns/iter (± 25883126
)1.10
es/full/minify/libraries/victory
875264815
ns/iter (± 25279076
)813563327
ns/iter (± 9071427
)1.08
es/full/minify/libraries/vue
168591942
ns/iter (± 4272102
)149708038
ns/iter (± 2072901
)1.13
es/full/codegen/es3
35041
ns/iter (± 2859
)32100
ns/iter (± 588
)1.09
es/full/codegen/es5
34826
ns/iter (± 1843
)32174
ns/iter (± 943
)1.08
es/full/codegen/es2015
34510
ns/iter (± 1941
)32209
ns/iter (± 599
)1.07
es/full/codegen/es2016
34866
ns/iter (± 3230
)32185
ns/iter (± 691
)1.08
es/full/codegen/es2017
35244
ns/iter (± 3399
)32113
ns/iter (± 1559
)1.10
es/full/codegen/es2018
34830
ns/iter (± 3021
)32131
ns/iter (± 932
)1.08
es/full/codegen/es2019
34946
ns/iter (± 6448
)32293
ns/iter (± 1393
)1.08
es/full/codegen/es2020
35269
ns/iter (± 1905
)32442
ns/iter (± 1290
)1.09
es/full/all/es3
206383691
ns/iter (± 12014761
)186157363
ns/iter (± 4084748
)1.11
es/full/all/es5
192097152
ns/iter (± 7633575
)176933693
ns/iter (± 3280462
)1.09
es/full/all/es2015
156620071
ns/iter (± 10149761
)141729882
ns/iter (± 9827151
)1.11
es/full/all/es2016
155846925
ns/iter (± 10365733
)140943158
ns/iter (± 2932572
)1.11
es/full/all/es2017
156069905
ns/iter (± 10071350
)140890007
ns/iter (± 7364971
)1.11
es/full/all/es2018
152076254
ns/iter (± 10577652
)140345275
ns/iter (± 8031443
)1.08
es/full/all/es2019
150651751
ns/iter (± 12613714
)138207241
ns/iter (± 4187062
)1.09
es/full/all/es2020
147469465
ns/iter (± 11532949
)132581196
ns/iter (± 2728081
)1.11
es/full/parser
754708
ns/iter (± 50669
)693874
ns/iter (± 30441
)1.09
es/full/base/fixer
28089
ns/iter (± 3589
)25086
ns/iter (± 896
)1.12
es/full/base/resolver_and_hygiene
95214
ns/iter (± 9003
)88295
ns/iter (± 6324
)1.08
serialization of ast node
232
ns/iter (± 37
)212
ns/iter (± 9
)1.09
serialization of serde
228
ns/iter (± 24
)217
ns/iter (± 7
)1.05
This comment was automatically generated by workflow using github-action-benchmark.