-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only create FuncInfo in typed classes for fields with value initializers
Summary: The `ElementsInitFunction` means something different for typed vs legacy classes. In typed classes, we know the shape of the object so we preemptively emit an `AllocObjectLiteral` with the properties already there, with default values. Therefore, when we encounter a field that has no initializer, we don't need to create the `ElementsInitFunction`. However, for legacy classes, we always need to be able to emit a `DefineOwnPropertyInst` for any fields we encounter, including those that do not have value initializers. Reviewed By: avp Differential Revision: D67115398 fbshipit-source-id: fc69db77b858480004e7530fc8e8105826cdcf3e
- Loading branch information
1 parent
d1f7bb8
commit ea2face
Showing
21 changed files
with
153 additions
and
230 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
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
Oops, something went wrong.