Fix GETELEM PIC not resetting atom jump (bug 592604, r=dmandelin).

This commit is contained in:
David Anderson 2010-09-01 11:23:19 -07:00
parent ae3fbf5c69
commit 5bead76fe7
2 changed files with 6 additions and 0 deletions

View File

@ -2234,6 +2234,10 @@ mjit::Compiler::jsop_getelem_pic(FrameEntry *obj, FrameEntry *id, RegisterID obj
inlineAtomOffsetLabel, ImmPtr(BOGUS_ATOM));
DBGLABEL(dbgInlineAtomJump);
/*
* The state between these two exits is identical, so this safe. The
* GETELEM PIC repatches both jumps to the slowPathStart on reset.
*/
stubcc.linkExit(idGuard, Uses(2));
pic.slowPathStart = stubcc.linkExit(jmpShapeGuard, Uses(2));

View File

@ -1130,6 +1130,8 @@ class GetElemCompiler : public PICStubCompiler
int32(JSObjectMap::INVALID_SHAPE));
repatcher.relink(pic.fastPathStart.jumpAtOffset(pic.shapeGuard + inlineShapeJump(pic)),
pic.slowPathStart);
repatcher.relink(pic.fastPathStart.jumpAtOffset(pic.shapeGuard + inlineAtomJump(pic)),
pic.slowPathStart);
RepatchBuffer repatcher2(pic.slowPathStart.executableAddress(), INLINE_PATH_LENGTH);
ReturnAddressPtr retPtr(pic.slowPathStart.callAtOffset(pic.callReturn).executableAddress());