JSOP_ANONFUNOBJ

This commit is contained in:
shaver@mozilla.org 2008-08-09 23:12:32 -04:00
parent cda7069cf9
commit 6562b9f74d

View File

@ -3998,10 +3998,30 @@ TraceRecorder::record_JSOP_DEFVAR()
return false;
}
/*
* XXX could hoist out to jsinterp.h and share with jsinterp.cpp, but
* XXX jsopcode.cpp has different definitions of same-named macros.
*/
#define GET_FULL_INDEX(PCOFF) \
(atoms - script->atomMap.vector + GET_INDEX(regs.pc + PCOFF))
#define LOAD_FUNCTION(PCOFF) \
JS_GET_SCRIPT_FUNCTION(script, GET_FULL_INDEX(PCOFF), fun)
bool
TraceRecorder::record_JSOP_ANONFUNOBJ()
{
return false;
JSFunction* fun;
JSFrameRegs& regs = *cx->fp->regs;
JSScript* script = cx->fp->script;
LOAD_FUNCTION(0); // needs script, regs, fun
JSObject* obj = FUN_OBJECT(fun);
if (OBJ_GET_PARENT(cx, obj) != cx->fp->scopeChain)
ABORT_TRACE("can't trace with activation object on scopeChain");
stack(0, lir->insImmPtr(obj));
return true;
}
bool
@ -4058,23 +4078,13 @@ TraceRecorder::record_JSOP_ARGCNT()
return false;
}
/*
* XXX could hoist out to jsinterp.h and share with jsinterp.cpp, but
* XXX jsopcode.cpp has different definitions of same-named macros.
*/
#define GET_FULL_INDEX(PCOFF) \
(atoms - script->atomMap.vector + GET_INDEX(regs.pc + PCOFF))
#define LOAD_FUNCTION(PCOFF) \
JS_GET_SCRIPT_FUNCTION(script, GET_FULL_INDEX(PCOFF), fun)
bool
TraceRecorder::record_JSOP_DEFLOCALFUN()
{
JSFunction* fun;
JSFrameRegs& regs = *cx->fp->regs;
JSScript* script = cx->fp->script;
LOAD_FUNCTION(SLOTNO_LEN);
LOAD_FUNCTION(SLOTNO_LEN); // needs script, regs, fun
JSObject* obj = FUN_OBJECT(fun);
if (OBJ_GET_PARENT(cx, obj) != cx->fp->scopeChain)