mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge.
This commit is contained in:
commit
7837aae392
@ -395,9 +395,11 @@ public:
|
||||
} \
|
||||
JS_END_MACRO
|
||||
|
||||
/* This macro can be used to iterate over all slots in currently pending
|
||||
frames that make up the native frame, consisting of rval, args, vars,
|
||||
and stack (except for the top-level frame which does not have args or vars. */
|
||||
/*
|
||||
* This macro can be used to iterate over all slots in currently pending
|
||||
* frames that make up the native frame, consisting of args, vars, and stack
|
||||
* (except for the top-level frame which does not have args or vars
|
||||
*/
|
||||
#define FORALL_SLOTS_IN_PENDING_FRAMES(cx, callDepth, code) \
|
||||
JS_BEGIN_MACRO \
|
||||
DEF_VPNAME; \
|
||||
@ -417,8 +419,6 @@ public:
|
||||
for (fsp = fstack; fsp < fspstop; ++fsp) { \
|
||||
JSStackFrame* f = *fsp; \
|
||||
jsval* vpstop; \
|
||||
SET_VPNAME("rval"); \
|
||||
vp = &f->rval; code; \
|
||||
if (f->callee) { \
|
||||
SET_VPNAME("this"); \
|
||||
vp = &f->argv[-1]; \
|
||||
@ -589,7 +589,7 @@ static unsigned nativeStackSlots(unsigned callDepth,
|
||||
{
|
||||
unsigned slots = 0;
|
||||
for (;;) {
|
||||
slots += 1/*rval*/ + (regs.sp - StackBase(fp));
|
||||
slots += (regs.sp - StackBase(fp));
|
||||
if (fp->callee)
|
||||
slots += 1/*this*/ + fp->fun->nargs + fp->script->nfixed;
|
||||
if (callDepth-- == 0)
|
||||
@ -645,9 +645,6 @@ done:
|
||||
for (;; fp = fp->down) { *fsp-- = fp; if (fp == entryFrame) break; }
|
||||
for (fsp = fstack; fsp < fspstop; ++fsp) {
|
||||
JSStackFrame* f = *fsp;
|
||||
if (p == &f->rval)
|
||||
RETURN(offset);
|
||||
offset += sizeof(double);
|
||||
if (f->callee) {
|
||||
if (size_t(p - &f->argv[-1]) < (unsigned)f->fun->nargs+1)
|
||||
RETURN(offset + size_t(p - &f->argv[-1]) * sizeof(double));
|
||||
@ -1945,7 +1942,6 @@ TraceRecorder::clearFrameSlotsFromCache()
|
||||
number of arguments (i.e.) of the next call, so we have to make sure we map
|
||||
those in to the cache with the right offsets. */
|
||||
JSStackFrame* fp = cx->fp;
|
||||
nativeFrameTracker.set(&fp->rval, (LIns*)0);
|
||||
jsval* vp;
|
||||
jsval* vpstop;
|
||||
for (vp = &fp->argv[-1], vpstop = &fp->argv[fp->fun->nargs]; vp < vpstop; ++vp)
|
||||
@ -1960,7 +1956,6 @@ TraceRecorder::record_EnterFrame()
|
||||
++callDepth;
|
||||
JSStackFrame* fp = cx->fp;
|
||||
LIns* void_ins = lir->insImm(JSVAL_TO_BOOLEAN(JSVAL_VOID));
|
||||
set(&fp->rval, void_ins, true);
|
||||
unsigned n;
|
||||
for (n = 0; n < fp->script->nfixed; ++n)
|
||||
set(&fp->slots[n], void_ins, true);
|
||||
@ -1973,7 +1968,7 @@ TraceRecorder::record_LeaveFrame()
|
||||
if (callDepth-- <= 0)
|
||||
return false;
|
||||
atoms = cx->fp->script->atomMap.vector;
|
||||
stack(-1, rval_ins); // LeaveFrame gets called after the interpreter stored rval so -1, not 0
|
||||
stack(-1, rval_ins); // LeaveFrame gets called after the interpreter stored rval, so -1 not 0
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1988,9 +1983,8 @@ bool TraceRecorder::record_JSOP_PUSH()
|
||||
}
|
||||
bool TraceRecorder::record_JSOP_POPV()
|
||||
{
|
||||
jsval& v = stackval(-1);
|
||||
set(&cx->fp->rval, get(&v));
|
||||
return true;
|
||||
// If we implement this, we need to update JSOP_STOP.
|
||||
return false;
|
||||
}
|
||||
bool TraceRecorder::record_JSOP_ENTERWITH()
|
||||
{
|
||||
@ -3009,6 +3003,7 @@ bool TraceRecorder::record_JSOP_THROWING()
|
||||
}
|
||||
bool TraceRecorder::record_JSOP_SETRVAL()
|
||||
{
|
||||
// If we implement this, we need to update JSOP_STOP.
|
||||
return false;
|
||||
}
|
||||
bool TraceRecorder::record_JSOP_RETRVAL()
|
||||
@ -3249,7 +3244,8 @@ bool TraceRecorder::record_JSOP_CALLELEM()
|
||||
|
||||
bool TraceRecorder::record_JSOP_STOP()
|
||||
{
|
||||
rval_ins = get(&cx->fp->rval);
|
||||
// Update this when we implement POPV.
|
||||
rval_ins = lir->insImm(JSVAL_TO_BOOLEAN(JSVAL_VOID));
|
||||
clearFrameSlotsFromCache();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user