Bug 701244 - add back JSOP_LENGTH case to DecompileDestructuring (r=waldo)
authorLuke Wagner <luke@mozilla.com>
Thu, 10 Nov 2011 21:52:57 -0800
changeset 80165 b7d2f71b4c87b287014e7ae39e1fd9ec6da7e03a
parent 80164 c3a965a12bc891e0b898f9e6c7c8cc000e2ffe43
child 80166 76c2eea70c45df3f7d3c5b8d99e0c01b98e93395
push id21467
push usermak77@bonardo.net
push dateFri, 11 Nov 2011 10:10:59 +0000
treeherdermozilla-central@50c1bcb49c76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs701244
milestone11.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 701244 - add back JSOP_LENGTH case to DecompileDestructuring (r=waldo)
js/src/jit-test/tests/basic/testBug701244.js
js/src/jsopcode.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testBug701244.js
@@ -0,0 +1,1 @@
+(function f({length}) {}).toString();
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -1828,16 +1828,17 @@ DecompileDestructuring(SprintStack *ss, 
                 while (++lasti < i) {
                     if (SprintPut(&ss->sprinter, ", ", 2) < 0)
                         return NULL;
                 }
             }
             break;
 
           case JSOP_GETPROP:
+          case JSOP_LENGTH:
           {
             LOAD_ATOM(0);
             *OFF2STR(&ss->sprinter, head) = '{';
 #if JS_HAS_DESTRUCTURING_SHORTHAND
             nameoff = ss->sprinter.offset;
 #endif
             if (!QuoteString(&ss->sprinter, atom, IsIdentifier(atom) ? 0 : (jschar)'\''))
                 return NULL;