author | Brian Hackett <bhackett1024@gmail.com> |
Mon, 25 Jul 2011 09:33:41 -0700 | |
changeset 77379 | bdf006d7b67dad1430b7cabd384d6c956c8a3b87 |
parent 77378 | 359730f0730c1fded8e3fd657e14d41c63652525 |
child 77380 | 7e5a5d2e28f86a93c36b8473591411c212be870f |
push id | 78 |
push user | clegnitto@mozilla.com |
push date | Fri, 16 Dec 2011 17:32:24 +0000 |
treeherder | mozilla-release@79d24e644fdd [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 673767 |
milestone | 8.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
|
js/src/jit-test/tests/basic/bug673767.js | file | annotate | diff | comparison | revisions | |
js/src/jsemit.cpp | file | annotate | diff | comparison | revisions |
new file mode 100644 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673767.js @@ -0,0 +1,2 @@ +var stack = {}; +stack.length += 3;
--- a/js/src/jsemit.cpp +++ b/js/src/jsemit.cpp @@ -4669,26 +4669,24 @@ EmitAssignment(JSContext *cx, JSCodeGene ? JSOP_GETARG : JSOP_GETLOCAL, atomIndex); } break; case TOK_DOT: if (js_Emit1(cx, cg, JSOP_DUP) < 0) return false; - if (lhs->pn_atom == cx->runtime->atomState.lengthAtom) { - if (js_Emit1(cx, cg, JSOP_LENGTH) < 0) - return false; - } else if (lhs->pn_atom == cx->runtime->atomState.protoAtom) { + if (lhs->pn_atom == cx->runtime->atomState.protoAtom) { if (!EmitIndexOp(cx, JSOP_QNAMEPART, atomIndex, cg)) return false; if (!EmitElemOpBase(cx, cg, JSOP_GETELEM)) return false; } else { - EMIT_INDEX_OP(JSOP_GETPROP, atomIndex); + bool isLength = (lhs->pn_atom == cx->runtime->atomState.lengthAtom); + EMIT_INDEX_OP(isLength ? JSOP_LENGTH : JSOP_GETPROP, atomIndex); } break; case TOK_LB: case TOK_LP: #if JS_HAS_XML_SUPPORT case TOK_UNARYOP: #endif if (js_Emit1(cx, cg, JSOP_DUP2) < 0)