diff --git a/src/accessor-names/default/cls-private-decl-inst.template b/src/accessor-names/default/cls-private-decl-inst.template deleted file mode 100644 index 26b3c5568c96bf7c248a2ce911027604ad1697d6..0000000000000000000000000000000000000000 --- a/src/accessor-names/default/cls-private-decl-inst.template +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2018 Katie Broida. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -path: language/statements/class/private-accessor-name-inst- -name: Class declaration, private instance method -esid: #prod-MethodDefinition -info: | - [...] - MethodDefinition[Yield, Await]: - PropertyNameClassElementName [?Yield, ?Await]( - UniqueFormalParameters [~Yield, ~Await] ) { - FunctionBody [~Yield, ~Await] } - AsyncMethod[?Yield, ?Await] - get PropertyName ClassElementName [?Yield, ?Await] (){ - FunctionBody [~Yield, ~Await] } - set PropertyNameClassElementName [?Yield, ?Await] ( - PropertySetParameterList ) { FunctionBody [~Yield, ~Await] } - AsyncMethod [Yield, Await]: - async [no LineTerminator here] PropertyName - ClassElementName[?Yield, ?Await]( - UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody } - ----*/ - -var stringSet; - -class C { - get #/*{ declareWith }*/() { return 'get string'; } - set #/*{ declareWith }*/(param) { stringSet = param; } - - getPrivateReference() { - return this[#/*{ referenceWith }*/]; - } - - setPrivateReference(value) { - this[#/*{ referenceWith }*/] = value; - } -}; - -var inst = new C(); - -assert.sameValue(inst.getPrivateReference(), 'get string'); - -inst.setPrivateReference('set string'); -assert.sameValue(stringSet, 'set string'); diff --git a/src/accessor-names/default/cls-private-decl-static.template b/src/accessor-names/default/cls-private-decl-static.template deleted file mode 100644 index f51c9b536573a8a89cbc9e869672d18d9e408f2e..0000000000000000000000000000000000000000 --- a/src/accessor-names/default/cls-private-decl-static.template +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2018 Katie Broida. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -path: language/statements/class/private-accessor-name-static- -name: Class declaration, static method -esid: #prod-MethodDefinition -info: | - [...] - MethodDefinition[Yield, Await]: - PropertyNameClassElementName [?Yield, ?Await]( - UniqueFormalParameters [~Yield, ~Await] ) { - FunctionBody [~Yield, ~Await] } - AsyncMethod[?Yield, ?Await] - get PropertyName ClassElementName [?Yield, ?Await] (){ - FunctionBody [~Yield, ~Await] } - set PropertyNameClassElementName [?Yield, ?Await] ( - PropertySetParameterList ) { FunctionBody [~Yield, ~Await] } - AsyncMethod [Yield, Await]: - async [no LineTerminator here] PropertyName - ClassElementName[?Yield, ?Await]( - UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody } - ----*/ - -var stringSet; - -class C { - static get #/*{ declareWith }*/() { return 'get string'; } - static set #/*{ declareWith }*/(param) { stringSet = param; } - - static getPrivateReference() { - return this[#/*{ referenceWith }*/]; - } - - static setPrivateReference(value) { - this[#/*{ referenceWith }*/] = value; - } -} - -assert.sameValue(C.getPrivateReference(), 'get string'); - -C.setPrivateReference('set string'); -assert.sameValue(stringSet, 'set string'); - diff --git a/src/accessor-names/default/cls-private-expr-inst.template b/src/accessor-names/default/cls-private-expr-inst.template deleted file mode 100644 index 41f98b91b5c1fc15e4a14f46674ef4fbaf85bdf2..0000000000000000000000000000000000000000 --- a/src/accessor-names/default/cls-private-expr-inst.template +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2018 Katie Broida. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -path: language/expressions/class/private-accessor-name-inst- -name: Class expression, instance private method -esid: #prod-MethodDefinition -info: | - [...] - MethodDefinition[Yield, Await]: - PropertyNameClassElementName [?Yield, ?Await]( - UniqueFormalParameters [~Yield, ~Await] ) { - FunctionBody [~Yield, ~Await] } - AsyncMethod[?Yield, ?Await] - get PropertyName ClassElementName [?Yield, ?Await] (){ - FunctionBody [~Yield, ~Await] } - set PropertyNameClassElementName [?Yield, ?Await] ( - PropertySetParameterList ) { FunctionBody [~Yield, ~Await] } - AsyncMethod [Yield, Await]: - async [no LineTerminator here] PropertyName - ClassElementName[?Yield, ?Await]( - UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody } - ----*/ - -var stringSet; - -var C = class { - get #/*{ declareWith }*/() { return 'get string'; } - set #/*{ declareWith }*/(param) { stringSet = param; } - - getPrivateReference() { - return this[#/*{ referenceWith }*/]; - } - - setPrivateReference(value) { - this[#/*{ referenceWith }*/] = value; - } -}; - -var inst = new C(); - -assert.sameValue(inst.getPrivateReference(), 'get string'); - -inst.setPrivateReference('set string'); -assert.sameValue(stringSet, 'set string'); diff --git a/src/accessor-names/default/cls-private-expr-static.template b/src/accessor-names/default/cls-private-expr-static.template deleted file mode 100644 index 5233cf13e83b753671dd611080b2264d4939beda..0000000000000000000000000000000000000000 --- a/src/accessor-names/default/cls-private-expr-static.template +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2018 Katie Broida. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -path: language/expressions/class/private-accessor-name-static- -name: Class expression, static private method -esid: #prod-MethodDefinition -info: | - [...] - MethodDefinition[Yield, Await]: - PropertyNameClassElementName [?Yield, ?Await]( - UniqueFormalParameters [~Yield, ~Await] ) { - FunctionBody [~Yield, ~Await] } - AsyncMethod[?Yield, ?Await] - get PropertyName ClassElementName [?Yield, ?Await] (){ - FunctionBody [~Yield, ~Await] } - set PropertyNameClassElementName [?Yield, ?Await] ( - PropertySetParameterList ) { FunctionBody [~Yield, ~Await] } - AsyncMethod [Yield, Await]: - async [no LineTerminator here] PropertyName - ClassElementName[?Yield, ?Await]( - UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody } - ----*/ - -var stringSet; - -var C = class { - static get #/*{ declareWith }*/() { return 'get string'; } - static set #/*{ declareWith }*/(param) { stringSet = param; } - - static getPrivateReference() { - return this.#/*{ referenceWith }*/; - } - - static setPrivateReference(value) { - this.#/*{ referenceWith }*/ = value; - } -}; - - -assert.sameValue(C.getPrivateReference(), 'get string'); - -C.setPrivateReference('set string'); -assert.sameValue(stringSet, 'set string'); diff --git a/src/accessor-names/private-escape-sequence-ZWJ.case b/src/accessor-names/private-escape-sequence-ZWJ.case new file mode 100644 index 0000000000000000000000000000000000000000..76627929d565d5b95e5120595c2a45f7476bc669 --- /dev/null +++ b/src/accessor-names/private-escape-sequence-ZWJ.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - ZWJ +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +ZW_\u200D_J +//- referenceWith +ZW_â€_J diff --git a/src/accessor-names/private-escape-sequence-ZWNJ.case b/src/accessor-names/private-escape-sequence-ZWNJ.case new file mode 100644 index 0000000000000000000000000000000000000000..eaca213f5e6160c7e39fe06b1d7ccaaebd7e6266 --- /dev/null +++ b/src/accessor-names/private-escape-sequence-ZWNJ.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - ZWNJ +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +ZW_\u200C_NJ +//- referenceWith +ZW_‌_NJ diff --git a/src/accessor-names/private-escape-sequence-u2118.case b/src/accessor-names/private-escape-sequence-u2118.case new file mode 100644 index 0000000000000000000000000000000000000000..0262fd47fc5eb459b1b7a3952b89b29b96832f02 --- /dev/null +++ b/src/accessor-names/private-escape-sequence-u2118.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - u2118 (℘) +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +\u2118 +//- referenceWith +℘ diff --git a/src/accessor-names/private-escape-sequence-u6F.case b/src/accessor-names/private-escape-sequence-u6F.case new file mode 100644 index 0000000000000000000000000000000000000000..bab28e3c613477f80bb9d24f0e0105cde9cca270 --- /dev/null +++ b/src/accessor-names/private-escape-sequence-u6F.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - u6F (o) +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +\u{6F} +//- referenceWith +o diff --git a/src/accessor-names/private-name-ZWJ.case b/src/accessor-names/private-name-ZWJ.case new file mode 100644 index 0000000000000000000000000000000000000000..9b465b39eebea782c6ff4b23799705b64231260a --- /dev/null +++ b/src/accessor-names/private-name-ZWJ.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - ZWJ +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +ZW_â€_J +//- referenceWith +ZW_â€_J diff --git a/src/accessor-names/private-name-ZWNJ.case b/src/accessor-names/private-name-ZWNJ.case new file mode 100644 index 0000000000000000000000000000000000000000..a9ba2aed041ddffa9128a5090db34d9ff1766f56 --- /dev/null +++ b/src/accessor-names/private-name-ZWNJ.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - ZWNJ +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +ZW_‌_NJ +//- referenceWith +ZW_‌_NJ diff --git a/src/accessor-names/private-name-common.case b/src/accessor-names/private-name-common.case new file mode 100644 index 0000000000000000000000000000000000000000..4ff2e577f2246cc2f31e56e31f3189b2a4b4b17b --- /dev/null +++ b/src/accessor-names/private-name-common.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - common +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +test262 +//- referenceWith +test262 diff --git a/src/accessor-names/private-name-dollar.case b/src/accessor-names/private-name-dollar.case new file mode 100644 index 0000000000000000000000000000000000000000..016306d2fd238263aeb05aa4e5e4ea45a7436ccc --- /dev/null +++ b/src/accessor-names/private-name-dollar.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - $ +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +$ +//- referenceWith +$ diff --git a/src/accessor-names/private-name-u2118.case b/src/accessor-names/private-name-u2118.case new file mode 100644 index 0000000000000000000000000000000000000000..2ac959453f7910bba4aed7af5e2ce6cbb88b125e --- /dev/null +++ b/src/accessor-names/private-name-u2118.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - ℘ +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +℘ +//- referenceWith +℘ diff --git a/src/accessor-names/private-name-underscore.case b/src/accessor-names/private-name-underscore.case new file mode 100644 index 0000000000000000000000000000000000000000..a25784c7ca70547016596c1d063bfa51dae766df --- /dev/null +++ b/src/accessor-names/private-name-underscore.case @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Private IdentifierName - _ +esid: sec-private-names-static-semantics-stringvalue +template: private +---*/ + +//- declareWith +_ +//- referenceWith +_ diff --git a/src/accessor-names/private/cls-private-decl-inst.template b/src/accessor-names/private/cls-private-decl-inst.template new file mode 100644 index 0000000000000000000000000000000000000000..25040ddd1118c616475aaeb7009f826439dffdbb --- /dev/null +++ b/src/accessor-names/private/cls-private-decl-inst.template @@ -0,0 +1,77 @@ +// Copyright (C) 2018 Katie Broida. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +path: language/statements/class/private-accessor-name/inst- +name: Class declaration, private instance method +esid: #prod-MethodDefinition +info: | + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + Initializer : + = AssignmentExpression + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". +features: [class-methods-private] +---*/ + +var stringSet; + +class C { + get #/*{ declareWith }*/() { return 'get string'; } + set #/*{ declareWith }*/(param) { stringSet = param; } + + getPrivateReference() { + return this.#/*{ referenceWith }*/; + } + + setPrivateReference(value) { + this.#/*{ referenceWith }*/ = value; + } +}; + +var inst = new C(); + +assert.sameValue(inst.getPrivateReference(), 'get string'); + +inst.setPrivateReference('set string'); +assert.sameValue(stringSet, 'set string'); diff --git a/src/accessor-names/private/cls-private-decl-static.template b/src/accessor-names/private/cls-private-decl-static.template new file mode 100644 index 0000000000000000000000000000000000000000..a1d0a381299f089addcef3181897a9f7e3a70493 --- /dev/null +++ b/src/accessor-names/private/cls-private-decl-static.template @@ -0,0 +1,76 @@ +// Copyright (C) 2018 Katie Broida. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +path: language/statements/class/private-accessor-name/static- +name: Class declaration, static method +esid: #prod-MethodDefinition +info: | + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + Initializer : + = AssignmentExpression + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". +features: [class-methods-private] +---*/ + +var stringSet; + +class C { + static get #/*{ declareWith }*/() { return 'get string'; } + static set #/*{ declareWith }*/(param) { stringSet = param; } + + static getPrivateReference() { + return this.#/*{ referenceWith }*/; + } + + static setPrivateReference(value) { + this.#/*{ referenceWith }*/ = value; + } +} + +assert.sameValue(C.getPrivateReference(), 'get string'); + +C.setPrivateReference('set string'); +assert.sameValue(stringSet, 'set string'); + diff --git a/src/accessor-names/private/cls-private-expr-inst.template b/src/accessor-names/private/cls-private-expr-inst.template new file mode 100644 index 0000000000000000000000000000000000000000..718ae187c704b463ac3c5b404eb57b08a35c4ebb --- /dev/null +++ b/src/accessor-names/private/cls-private-expr-inst.template @@ -0,0 +1,77 @@ +// Copyright (C) 2018 Katie Broida. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +path: language/expressions/class/private-accessor-name/inst- +name: Class expression, instance private method +esid: #prod-MethodDefinition +info: | + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + Initializer : + = AssignmentExpression + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". +features: [class-methods-private] +---*/ + +var stringSet; + +var C = class { + get #/*{ declareWith }*/() { return 'get string'; } + set #/*{ declareWith }*/(param) { stringSet = param; } + + getPrivateReference() { + return this.#/*{ referenceWith }*/; + } + + setPrivateReference(value) { + this.#/*{ referenceWith }*/ = value; + } +}; + +var inst = new C(); + +assert.sameValue(inst.getPrivateReference(), 'get string'); + +inst.setPrivateReference('set string'); +assert.sameValue(stringSet, 'set string'); diff --git a/src/accessor-names/private/cls-private-expr-static.template b/src/accessor-names/private/cls-private-expr-static.template new file mode 100644 index 0000000000000000000000000000000000000000..2a86f3b1846620d37ff6d3236a7eb407a034be46 --- /dev/null +++ b/src/accessor-names/private/cls-private-expr-static.template @@ -0,0 +1,77 @@ +// Copyright (C) 2018 Katie Broida. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +path: language/expressions/class/private-accessor-name/static- +name: Class expression, static private method +esid: #prod-MethodDefinition +info: | + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + ; + + MethodDefinition : + get ClassElementName () { FunctionBody } + set ClassElementName ( PropertySetParameterList ){ FunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + Initializer : + = AssignmentExpression + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". +features: [class-methods-private] +---*/ + +var stringSet; + +var C = class { + static get #/*{ declareWith }*/() { return 'get string'; } + static set #/*{ declareWith }*/(param) { stringSet = param; } + + static getPrivateReference() { + return this.#/*{ referenceWith }*/; + } + + static setPrivateReference(value) { + this.#/*{ referenceWith }*/ = value; + } +}; + + +assert.sameValue(C.getPrivateReference(), 'get string'); + +C.setPrivateReference('set string'); +assert.sameValue(stringSet, 'set string');