Bug 1168992 - Part 1: Fix up reflection of classes. (r=Waldo)
☠☠ backed out by f7515eddee8b ☠ ☠
authorEric Faust <efaustbmo@mozilla.com>
Wed, 02 Sep 2015 15:09:02 -0700
changeset 260640 a05bfd76c34c42dd351cd96d68bdfefb4115d597
parent 260639 5818bea794a6a771a6db1fbed45e9b1f6f02e663
child 260641 a14eb650f5be7810203729832da49a95a802306b
push id29318
push usercbook@mozilla.com
push dateThu, 03 Sep 2015 11:15:07 +0000
treeherdermozilla-central@74fbd245369c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1168992
milestone43.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 1168992 - Part 1: Fix up reflection of classes. (r=Waldo)
js/src/builtin/ReflectParse.cpp
js/src/jit-test/tests/modules/export-declaration.js
js/src/tests/js1_8_5/reflect-parse/PatternBuilders.js
--- a/js/src/builtin/ReflectParse.cpp
+++ b/js/src/builtin/ReflectParse.cpp
@@ -1814,18 +1814,18 @@ NodeBuilder::classDefinition(bool expr, 
                              TokenPos* pos, MutableHandleValue dst)
 {
     ASTType type = expr ? AST_CLASS_EXPR : AST_CLASS_STMT;
     RootedValue cb(cx, callbacks[type]);
     if (!cb.isNull())
         return callback(cb, name, heritage, block, pos, dst);
 
     return newNode(type, pos,
-                   "name", name,
-                   "heritage", heritage,
+                   "id", name,
+                   "superClass", heritage,
                    "body", block,
                    dst);
 }
 
 bool
 NodeBuilder::newTargetExpression(TokenPos* pos, MutableHandleValue dst)
 {
     RootedValue cb(cx, callbacks[AST_NEWTARGET_EXPR]);
--- a/js/src/jit-test/tests/modules/export-declaration.js
+++ b/js/src/jit-test/tests/modules/export-declaration.js
@@ -33,17 +33,17 @@ functionDeclaration = (id, params, body)
     params: params,
     defaults: [],
     body: body,
     rest: null,
     generator: false
 });
 classDeclaration = (name) => Pattern({
     type: "ClassStatement",
-    name: name
+    id: name
 });
 variableDeclaration = (decls) => Pattern({
     type: "VariableDeclaration",
     kind: "var",
     declarations: decls
 });
 constDeclaration = (decls) => Pattern({
     type: "VariableDeclaration",
--- a/js/src/tests/js1_8_5/reflect-parse/PatternBuilders.js
+++ b/js/src/tests/js1_8_5/reflect-parse/PatternBuilders.js
@@ -127,24 +127,24 @@ function superProp(id) {
     return dotExpr(ident("super"), id);
 }
 function superElem(id) {
     return memExpr(ident("super"), id);
 }
 
 function classStmt(id, heritage, body) {
     return Pattern({ type: "ClassStatement",
-                     name: id,
-                     heritage: heritage,
+                     id: id,
+                     superClass: heritage,
                      body: body});
 }
 function classExpr(id, heritage, body) {
     return Pattern({ type: "ClassExpression",
-                     name: id,
-                     heritage: heritage,
+                     id: id,
+                     superClass: heritage,
                      body: body});
 }
 function classMethod(id, body, kind, static) {
     return Pattern({ type: "ClassMethod",
                      name: id,
                      body: body,
                      kind: kind,
                      static: static });