Description[language] Private fields
A WIP implementation of a stage-1 proposal to add private fields to JS classes.
The proposal is at https://github.com/tc39/proposal-private-fields
Not all errors are implemented, but the remaining semantics are.
See design doc for details:
https://docs.google.com/document/d/1WRtNm3ZLNJT1WVr8aq4RJuByYgfuAFAhj20LwTW6JVE/edit?ts=57db03c2#
The feature is staged behind --harmony-private-class-fields
The implementation is purely in the parser plus a single runtime function.
Code like `this.#x` is desugared into approximately `this[#x]`,
where `#x` is the name of a variable in the class's scope which holds a private symbol. Initialization is performed via the same mechanism as public fields.
BUG=v8:5368
Patch Set 1 #
Total comments: 21
Patch Set 2 : comments #
Total comments: 2
Patch Set 3 : proxy support and test #
Total comments: 9
Patch Set 4 : rebase #Patch Set 5 : use ConcatString #Patch Set 6 : some comments #
Depends on Patchset: Messages
Total messages: 17 (11 generated)
|