backout bug 810525 for failing jit-tests
authorBenjamin Peterson <benjamin@python.org>
Fri, 28 Dec 2012 21:52:52 -0600
changeset 126311 7c35dd229717e8d10c6ce4eb2b231df902336b02
parent 126310 d128b15214cb806f604b9caab653485c28e07a8a
child 126312 b5ea211f23a931dad895bfdbe6e8637c907222ea
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs810525
milestone20.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
backout bug 810525 for failing jit-tests
js/src/jsopcode.cpp
js/src/tests/js1_5/Regress/regress-372364.js
js/src/tests/js1_8/extensions/regress-469625.js
js/src/tests/js1_8_5/regress/regress-469758.js
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -5969,17 +5969,17 @@ struct ExpressionDecompiler
     bool init();
     bool decompilePC(jsbytecode *pc);
     JSAtom *getVar(unsigned slot);
     JSAtom *getArg(unsigned slot);
     JSAtom *findLetVar(jsbytecode *pc, unsigned depth);
     JSAtom *loadAtom(jsbytecode *pc);
     bool quote(JSString *s, uint32_t quote);
     bool write(const char *s);
-    bool write(JSString *str);
+    bool write(JSString *s);
     bool getOutput(char **out);
 };
 
 bool
 ExpressionDecompiler::decompilePC(jsbytecode *pc)
 {
     JS_ASSERT(script->code <= pc && pc < script->code + script->length);
 
@@ -6052,23 +6052,24 @@ ExpressionDecompiler::decompilePC(jsbyte
         return write(atom);
       }
       case JSOP_LENGTH:
       case JSOP_GETPROP:
       case JSOP_CALLPROP: {
         JSAtom *prop = (op == JSOP_LENGTH) ? cx->names().length : loadAtom(pc);
         if (!decompilePC(pcstack[-1]))
             return false;
-        if (IsIdentifier(prop)) {
+        if (IsIdentifier(prop))
             return write(".") &&
                    quote(prop, '\0');
-        }
-        return write("[") &&
-               quote(prop, '\'') &&
-               write("]");
+        else
+            return write("[") &&
+                   quote(prop, '\'') &&
+                   write("]");
+        return true;
       }
       case JSOP_GETELEM:
       case JSOP_CALLELEM:
         return decompilePC(pcstack[-2]) &&
                write("[") &&
                decompilePC(pcstack[-1]) &&
                write("]");
       case JSOP_NULL:
@@ -6115,28 +6116,16 @@ ExpressionDecompiler::decompilePC(jsbyte
       case JSOP_THIS:
         // |this| could convert to a very long object initialiser, so cite it by
         // its keyword name.
         return write(js_this_str);
       case JSOP_CALL:
       case JSOP_FUNCALL:
         return decompilePC(pcstack[-int32_t(GET_ARGC(pc) + 2)]) &&
                write("(...)");
-      case JSOP_NEWARRAY:
-        return write("[]");
-      case JSOP_REGEXP:
-      case JSOP_OBJECT: {
-        JSObject *obj = (op == JSOP_REGEXP)
-                        ? script->getRegExp(GET_UINT32_INDEX(pc))
-                        : script->getObject(GET_UINT32_INDEX(pc));
-        JSString *str = js_ValueToSource(cx, ObjectValue(*obj));
-        if (!str)
-            return false;
-        return write(str);
-      }
       default:
         break;
     }
     return write("(intermediate value)");
 }
 
 ExpressionDecompiler::~ExpressionDecompiler()
 {
@@ -6161,19 +6150,19 @@ ExpressionDecompiler::init()
 
 bool
 ExpressionDecompiler::write(const char *s)
 {
     return sprinter.put(s) >= 0;
 }
 
 bool
-ExpressionDecompiler::write(JSString *str)
+ExpressionDecompiler::write(JSString *s)
 {
-    return sprinter.putString(str) >= 0;
+    return sprinter.putString(s) >= 0;
 }
 
 bool
 ExpressionDecompiler::quote(JSString *s, uint32_t quote)
 {
     return QuoteString(&sprinter, s, quote) >= 0;
 }
 
--- a/js/src/tests/js1_5/Regress/regress-372364.js
+++ b/js/src/tests/js1_5/Regress/regress-372364.js
@@ -27,17 +27,17 @@ function test()
     function a(){return null;} a(1)[0];
   }
   catch(ex)
   {
     actual = ex + '';
   }
   reportMatch(expect, actual, summary);
 
-  expect = /TypeError: \/a\/.exec\(.+\) (has no properties|is null)/;
+  expect = /TypeError: \(intermediate value\).exec\(.+\) (has no properties|is null)/;
   try
   {
     /a/.exec("b")[0];
   }
   catch(ex)
   {
     actual = ex + '';
   }
--- a/js/src/tests/js1_8/extensions/regress-469625.js
+++ b/js/src/tests/js1_8/extensions/regress-469625.js
@@ -17,17 +17,17 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  expect = 'TypeError: [].__proto__ is not a function';
+  expect = 'TypeError: (intermediate value).__proto__ is not a function';
 
   jit(true);
 
   Array.prototype.__proto__ = function () 3; 
 
   try
   {
     [].__proto__();
--- a/js/src/tests/js1_8_5/regress/regress-469758.js
+++ b/js/src/tests/js1_8_5/regress/regress-469758.js
@@ -4,11 +4,11 @@
 var err;
 try {
     {let i=1}
     {let j=1; [][j][2]}
 } catch (e) {
     err = e;
 }
 assertEq(err instanceof TypeError, true);
-assertEq(err.message, "[][j] is undefined");
+assertEq(err.message, "(intermediate value)[j] is undefined");
 
 reportCompare(0, 0, 'ok');