author | Jason Orendorff <jorendorff@mozilla.com> |
Fri, 21 Jan 2011 13:20:45 -0600 | |
changeset 61209 | 34359bdfcde48e5765b8806c20343174aa909da6 |
parent 61208 | 74190651d91a9744f73b6ebf0360bf3f8580f0c0 |
child 61210 | 33f07113de5fcf6bbe59ce554402b22c91cfebcb |
push id | 18277 |
push user | cleary@mozilla.com |
push date | Tue, 25 Jan 2011 03:52:51 +0000 |
treeherder | mozilla-central@7ee91bd90e7a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | Waldo |
bugs | 626345 |
milestone | 2.0b10pre |
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/testInitPropWithIntName.js | file | annotate | diff | comparison | revisions | |
js/src/jstracer.cpp | file | annotate | diff | comparison | revisions |
new file mode 100644 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitPropWithIntName.js @@ -0,0 +1,2 @@ +for (var j=0; j<HOTLOOP; ++j) + ({'0': 0});
--- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -12453,17 +12453,17 @@ TraceRecorder::recordInitPropertyOp(jsby JSObject* obj = &l.toObject(); LIns* obj_ins = get(&l); JS_ASSERT(obj->getClass() == &js_ObjectClass); Value& v = stackval(-1); LIns* v_ins = get(&v); JSAtom* atom = atoms[GET_INDEX(cx->regs->pc)]; - jsid id = ATOM_TO_JSID(atom); + jsid id = js_CheckForStringIndex(ATOM_TO_JSID(atom)); // If obj already has this property (because JSOP_NEWOBJECT already set its // shape or because the id appears more than once in the initializer), just // set it. The existing property can't be an accessor property: we wouldn't // get here, as JSOP_SETTER can't be recorded. if (const Shape* shape = obj->nativeLookup(id)) { // Don't assign a bare (non-cloned) function to an ordinary or method // property. The opposite case, assigning some other value to a method,