Bug 1547035 - Handle AssignmentNode->BinaryNode change from bug 1535471 in Reflect.parse. r=jorendorff
authorAshley Hauck <khyperia@mozilla.com>
Thu, 25 Apr 2019 19:32:34 +0000
changeset 530163 d6c676a1ef3e239e66e71b31e1d6570efa52df2d
parent 530162 04e6c1201e2ac5f7c3ddc42dace8d8963e609fff
child 530164 3096a547bb84ea6bdf0f543b36591e920c90ae51
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1547035, 1535471
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547035 - Handle AssignmentNode->BinaryNode change from bug 1535471 in Reflect.parse. r=jorendorff Differential Revision: https://phabricator.services.mozilla.com/D28890
js/src/builtin/ReflectParse.cpp
js/src/tests/jstests.list
js/src/tests/non262/reflect-parse/class-fields.js
--- a/js/src/builtin/ReflectParse.cpp
+++ b/js/src/builtin/ReflectParse.cpp
@@ -2533,17 +2533,17 @@ bool ASTSerializer::classField(ClassFiel
                            ->body()
                            ->head()
                            ->as<LexicalScopeNode>()
                            .scopeBody()
                            ->as<ListNode>()
                            .head()
                            ->as<UnaryNode>()
                            .kid()
-                           ->as<AssignmentNode>()
+                           ->as<BinaryNode>()
                            .right();
     // RawUndefinedExpr is the node we use for "there is no initializer". If one
     // writes, literally, `x = undefined;`, it will not be a RawUndefinedExpr
     // node, but rather a variable reference.
     // Behavior for "there is no initializer" should be { ..., "init": null }
     if (value->getKind() != ParseNodeKind::RawUndefinedExpr) {
       if (!expression(value, &val)) {
         return false;
--- a/js/src/tests/jstests.list
+++ b/js/src/tests/jstests.list
@@ -5,20 +5,16 @@
 skip include test/jstests.list
 
 skip script non262/String/normalize-generateddata-input.js # input data for other test
 
 # Timeouts on arm and cgc builds.
 slow script test262/built-ins/decodeURI/S15.1.3.1_A2.5_T1.js
 slow script test262/built-ins/decodeURIComponent/S15.1.3.2_A2.5_T1.js
 
-# Fields are not fully implemented yet
-# https://bugzilla.mozilla.org/show_bug.cgi?id=1499448
-skip script non262/reflect-parse/class-fields.js
-
 # Windows10-aarch64 fails certain tests.
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1526003
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1526012
 skip-if((xulRuntime.XPCOMABI.match(/aarch64/))&&(xulRuntime.OS=="WINNT")) script non262/Math/fround.js
 skip-if((xulRuntime.XPCOMABI.match(/aarch64/))&&(xulRuntime.OS=="WINNT")) script non262/Math/log2-approx.js
 
 ###########################################################################
 # Generated jstests.list for test262 when inline |reftest| isn't possible #
--- a/js/src/tests/non262/reflect-parse/class-fields.js
+++ b/js/src/tests/non262/reflect-parse/class-fields.js
@@ -1,9 +1,9 @@
-// |reftest| skip-if(!xulRuntime.shell)
+// |reftest| skip-if(!xulRuntime.shell||(function(){try{eval('c=class{x;}');return(false);}catch{return(true);}})())
 // Classes
 function testClassFields() {
     function constructor_(name) {
         let body = blockStmt([]);
         let method = funExpr(ident(name), [], body);
         return classMethod(ident("constructor"), method, "method", false);
     }