[INFER] Fix fallout from bug 642307 commit.

This commit is contained in:
Brian Hackett 2011-03-29 22:26:21 -07:00
parent b9d34d8bb2
commit cb84851874
2 changed files with 16 additions and 0 deletions

View File

@ -2937,6 +2937,18 @@ AnalyzeBytecode(JSContext *cx, AnalyzeState &state, JSScript *script, uint32 off
else
id = GetAtomId(cx, script, pc, 0);
/*
* Normally we rely on lazy standard class initialization to fill in
* the types of global properties the script can access. In a few cases
* the method JIT will bypass this, and we need to add the types direclty.
*/
if (id == ATOM_TO_JSID(cx->runtime->atomState.typeAtoms[JSTYPE_VOID]))
cx->addTypePropertyId(script->getGlobalType(), id, TYPE_UNDEFINED);
if (id == ATOM_TO_JSID(cx->runtime->atomState.NaNAtom))
cx->addTypePropertyId(script->getGlobalType(), id, TYPE_DOUBLE);
if (id == ATOM_TO_JSID(cx->runtime->atomState.InfinityAtom))
cx->addTypePropertyId(script->getGlobalType(), id, TYPE_DOUBLE);
/* Handle as a property access. */
PropertyAccess(cx, script, pc, script->getGlobalType(),
false, &pushed[0], id);

View File

@ -5552,6 +5552,10 @@ mjit::Compiler::jsop_getgname(uint32 index, JSValueType type)
JSObject *obj = pushedSingleton(0);
if (obj && testSingletonProperty(globalObj, ATOM_TO_JSID(atom))) {
frame.push(ObjectValue(*obj));
if (recompiling) {
OOL_STUBCALL(ic::GetGlobalName);
stubcc.rejoin(Changes(1));
}
return;
}