-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ECMA-402 v1 legacy constructor semantics compromise
This patch addresses #57 by allowing certain legacy constructor patterns to coexist with the new guarantees in ECMA-402 v2, which allows for a pattern where all internal slots exist from the beginning of the object's lifetime. The compromise is based on storing a "real" object inside of a symbol-named property to allow for object initialization in cases of the Intl.<constructor>.call(Object.create(Intl.<constructor>) pattern. Legacy methods have to forward their calls to this "real" object. This patch specifies the change for Intl.NumberFormat, but an analogous change would also be needed for Intl.DateTimeFormat and Intl.Collator. This version is being sent out for review for feedback from users and implementors. A sample implementation in V8 can be found at https://codereview.chromium.org/1828543007
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 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