[INFER] Remove on stack recompilation, allow removed on stack JIT frames to rejoin into the interpreter, bug 650163.
This commit is contained in:
@@ -1454,8 +1454,8 @@ date_getYear(JSContext *cx, uintN argc, Value *vp)
|
||||
vp->setInt32(year);
|
||||
} else {
|
||||
*vp = yearVal;
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1472,8 +1472,8 @@ date_getFullYear(JSContext *cx, uintN argc, Value *vp)
|
||||
return JS_FALSE;
|
||||
|
||||
*vp = obj->getSlot(JSObject::JSSLOT_DATE_LOCAL_YEAR);
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
@@ -1486,8 +1486,8 @@ date_getUTCFullYear(JSContext *cx, uintN argc, Value *vp)
|
||||
|
||||
if (JSDOUBLE_IS_FINITE(result))
|
||||
result = YearFromTime(result);
|
||||
else if (!cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
else
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return true;
|
||||
@@ -1504,8 +1504,8 @@ date_getMonth(JSContext *cx, uintN argc, Value *vp)
|
||||
return false;
|
||||
|
||||
*vp = obj->getSlot(JSObject::JSSLOT_DATE_LOCAL_MONTH);
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1518,8 +1518,8 @@ date_getUTCMonth(JSContext *cx, uintN argc, Value *vp)
|
||||
|
||||
if (JSDOUBLE_IS_FINITE(result))
|
||||
result = MonthFromTime(result);
|
||||
else if (!cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
else
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return true;
|
||||
@@ -1536,8 +1536,8 @@ date_getDate(JSContext *cx, uintN argc, Value *vp)
|
||||
return false;
|
||||
|
||||
*vp = obj->getSlot(JSObject::JSSLOT_DATE_LOCAL_DATE);
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1550,8 +1550,8 @@ date_getUTCDate(JSContext *cx, uintN argc, Value *vp)
|
||||
|
||||
if (JSDOUBLE_IS_FINITE(result))
|
||||
result = DateFromTime(result);
|
||||
else if (!cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
else
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return true;
|
||||
@@ -1568,8 +1568,8 @@ date_getDay(JSContext *cx, uintN argc, Value *vp)
|
||||
return false;
|
||||
|
||||
*vp = obj->getSlot(JSObject::JSSLOT_DATE_LOCAL_DAY);
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1582,8 +1582,8 @@ date_getUTCDay(JSContext *cx, uintN argc, Value *vp)
|
||||
|
||||
if (JSDOUBLE_IS_FINITE(result))
|
||||
result = WeekDay(result);
|
||||
else if (!cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
else
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return true;
|
||||
@@ -1600,8 +1600,8 @@ date_getHours(JSContext *cx, uintN argc, Value *vp)
|
||||
return false;
|
||||
|
||||
*vp = obj->getSlot(JSObject::JSSLOT_DATE_LOCAL_HOURS);
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1614,8 +1614,8 @@ date_getUTCHours(JSContext *cx, uintN argc, Value *vp)
|
||||
|
||||
if (JSDOUBLE_IS_FINITE(result))
|
||||
result = HourFromTime(result);
|
||||
else if (!cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
else
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return JS_TRUE;
|
||||
@@ -1632,8 +1632,8 @@ date_getMinutes(JSContext *cx, uintN argc, Value *vp)
|
||||
return false;
|
||||
|
||||
*vp = obj->getSlot(JSObject::JSSLOT_DATE_LOCAL_MINUTES);
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1646,8 +1646,8 @@ date_getUTCMinutes(JSContext *cx, uintN argc, Value *vp)
|
||||
|
||||
if (JSDOUBLE_IS_FINITE(result))
|
||||
result = MinFromTime(result);
|
||||
else if (!cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
else
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return true;
|
||||
@@ -1666,8 +1666,8 @@ date_getUTCSeconds(JSContext *cx, uintN argc, Value *vp)
|
||||
return false;
|
||||
|
||||
*vp = obj->getSlot(JSObject::JSSLOT_DATE_LOCAL_SECONDS);
|
||||
if (!vp->isInt32() && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!vp->isInt32())
|
||||
cx->markTypeCallerOverflow();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1682,8 +1682,8 @@ date_getUTCMilliseconds(JSContext *cx, uintN argc, Value *vp)
|
||||
|
||||
if (JSDOUBLE_IS_FINITE(result))
|
||||
result = msFromTime(result);
|
||||
else if (!cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
else
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return true;
|
||||
@@ -1710,8 +1710,8 @@ date_getTimezoneOffset(JSContext *cx, uintN argc, Value *vp)
|
||||
* daylight savings time.
|
||||
*/
|
||||
jsdouble result = (utctime - localtime) / msPerMinute;
|
||||
if (!JSDOUBLE_IS_FINITE(result) && !cx->markTypeCallerOverflow())
|
||||
return false;
|
||||
if (!JSDOUBLE_IS_FINITE(result))
|
||||
cx->markTypeCallerOverflow();
|
||||
|
||||
vp->setNumber(result);
|
||||
return true;
|
||||
@@ -2658,9 +2658,10 @@ js_InitDateClass(JSContext *cx, JSObject *obj)
|
||||
AutoValueRooter toUTCStringFun(cx);
|
||||
jsid toUTCStringId = ATOM_TO_JSID(cx->runtime->atomState.toUTCStringAtom);
|
||||
jsid toGMTStringId = ATOM_TO_JSID(cx->runtime->atomState.toGMTStringAtom);
|
||||
if (!js_GetProperty(cx, proto, toUTCStringId, toUTCStringFun.addr()) ||
|
||||
!cx->addTypePropertyId(proto->getType(), toGMTStringId, toUTCStringFun.value()) ||
|
||||
!js_DefineProperty(cx, proto, toGMTStringId, toUTCStringFun.addr(),
|
||||
if (!js_GetProperty(cx, proto, toUTCStringId, toUTCStringFun.addr()))
|
||||
return NULL;
|
||||
cx->addTypePropertyId(proto->getType(), toGMTStringId, toUTCStringFun.value());
|
||||
if (!js_DefineProperty(cx, proto, toGMTStringId, toUTCStringFun.addr(),
|
||||
PropertyStub, StrictPropertyStub, 0)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user