forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce element decorator temp variables (babel#16280)
* optimize: allocate temp variable for every decorated element * update test fixtures * refactor: sort decorator info once * refactor: simplify maybeExtractDecorators interface Also improve decoratorThis storage. It turns out we don't have to maintain the map from decorator to its this value. * refactor: rename maybeExtractDecorators to handleDecoratorExpressions * unify haveThis and hasThis
- Loading branch information
1 parent
02c601b
commit b165d9a
Showing
43 changed files
with
308 additions
and
331 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
6 changes: 3 additions & 3 deletions
6
...bel-plugin-proposal-decorators/test/fixtures/2021-12-exported/member-decorator/output.mjs
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,8 +1,8 @@ | ||
var _dec, _init_x; | ||
_dec = dec; | ||
var _xDecs, _init_x; | ||
_xDecs = dec; | ||
export class A { | ||
static { | ||
[_init_x] = babelHelpers.applyDecs(this, [[_dec, 0, "x"]], []); | ||
[_init_x] = babelHelpers.applyDecs(this, [[_xDecs, 0, "x"]], []); | ||
} | ||
x = _init_x(this); | ||
} |
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
Oops, something went wrong.