зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 705dcdc597d4 (bug 1651512) for parse related bustage CLOSED TREE
This commit is contained in:
Родитель
486f6c9f43
Коммит
79b01517bf
|
@ -3045,7 +3045,6 @@ bool ASTSerializer::expression(ParseNode* pn, MutableHandleValue dst) {
|
|||
return builder.objectExpression(elts, &obj->pn_pos, dst);
|
||||
}
|
||||
|
||||
case ParseNodeKind::PrivateName:
|
||||
case ParseNodeKind::Name:
|
||||
return identifier(&pn->as<NameNode>(), dst);
|
||||
|
||||
|
@ -3172,8 +3171,7 @@ bool ASTSerializer::propertyName(ParseNode* key, MutableHandleValue dst) {
|
|||
if (key->isKind(ParseNodeKind::ComputedName)) {
|
||||
return expression(key, dst);
|
||||
}
|
||||
if (key->isKind(ParseNodeKind::ObjectPropertyName) ||
|
||||
key->isKind(ParseNodeKind::PrivateName)) {
|
||||
if (key->isKind(ParseNodeKind::ObjectPropertyName)) {
|
||||
return identifier(&key->as<NameNode>(), dst);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
// |jit-test| --enable-private-fields;
|
||||
|
||||
function rp(x) {
|
||||
return Reflect.parse(x);
|
||||
};
|
||||
|
||||
rp(`(
|
||||
class {
|
||||
static #m = 'test262';
|
||||
}
|
||||
)`);
|
||||
|
||||
rp(`(
|
||||
class {
|
||||
#m = 'test262';
|
||||
}
|
||||
)`);
|
||||
|
||||
rp(`(
|
||||
class {
|
||||
#m = 'test262';
|
||||
gm() {
|
||||
this.#m++;
|
||||
this.#m--;
|
||||
this.#m?.x;
|
||||
o[this.#m];
|
||||
return this.#m;
|
||||
}
|
||||
sm() {
|
||||
this.#m = 12;
|
||||
}
|
||||
}
|
||||
)`);
|
||||
|
||||
rp(`(
|
||||
class {
|
||||
static #m = 'test262';
|
||||
static gm() {
|
||||
this.#m++;
|
||||
this.#m--;
|
||||
this.#m?.x;
|
||||
o[this.#m];
|
||||
return this.#m;
|
||||
}
|
||||
static sm() {
|
||||
this.#m = 12;
|
||||
}
|
||||
}
|
||||
)`);
|
|
@ -15,10 +15,6 @@ function testClassFields() {
|
|||
assertExpr("(class C { x; })", classExpr(ident("C"), null, [classField(ident("x"), null), genConstructor]))
|
||||
assertExpr("(class C { x; y = 2; })", classExpr(ident("C"), null, [classField(ident("x"), null), classField(ident("y"), lit(2)), genConstructor]))
|
||||
assertExpr("(class C { x = 2; constructor(){} })", classExpr(ident("C"), null, [classField(ident("x"), lit(2)), genConstructor]))
|
||||
|
||||
assertExpr("(class C { #x = 2; })", classExpr(ident("C"), null, [classField(ident("#x"), lit(2)), genConstructor]));
|
||||
assertExpr("(class C { #x; })", classExpr(ident("C"), null, [classField(ident("#x"), null), genConstructor]))
|
||||
assertExpr("(class C { #x; #y = 2; })", classExpr(ident("C"), null, [classField(ident("#x"), null), classField(ident("#y"), lit(2)), genConstructor]))
|
||||
}
|
||||
|
||||
runtest(testClassFields);
|
||||
|
|
Загрузка…
Ссылка в новой задаче