mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 14:30:47 +00:00
Followup fix and cleanup for 523452.
This commit is contained in:
parent
256065fb13
commit
7873a7927a
@ -11039,7 +11039,7 @@ TraceRecorder::record_JSOP_DELNAME()
|
||||
}
|
||||
|
||||
JSBool JS_FASTCALL
|
||||
js_DelIntKey(JSContext* cx, JSObject* obj, int32 i)
|
||||
DeleteIntKey(JSContext* cx, JSObject* obj, int32 i)
|
||||
{
|
||||
jsval v = JSVAL_FALSE;
|
||||
jsid id = INT_TO_JSID(i);
|
||||
@ -11047,10 +11047,10 @@ js_DelIntKey(JSContext* cx, JSObject* obj, int32 i)
|
||||
SetBuiltinError(cx);
|
||||
return JSVAL_TO_BOOLEAN(v);
|
||||
}
|
||||
JS_DEFINE_CALLINFO_3(extern, BOOL_FAIL, js_DelIntKey, CONTEXT, OBJECT, INT32, 0, ACC_STORE_ANY)
|
||||
JS_DEFINE_CALLINFO_3(extern, BOOL_FAIL, DeleteIntKey, CONTEXT, OBJECT, INT32, 0, ACC_STORE_ANY)
|
||||
|
||||
JSBool JS_FASTCALL
|
||||
js_DelStrKey(JSContext* cx, JSObject* obj, JSString* str)
|
||||
DeleteStrKey(JSContext* cx, JSObject* obj, JSString* str)
|
||||
{
|
||||
jsval v = JSVAL_FALSE;
|
||||
jsid id;
|
||||
@ -11064,7 +11064,7 @@ js_DelStrKey(JSContext* cx, JSObject* obj, JSString* str)
|
||||
SetBuiltinError(cx);
|
||||
return JSVAL_TO_BOOLEAN(v);
|
||||
}
|
||||
JS_DEFINE_CALLINFO_3(extern, BOOL_FAIL, js_DelStrKey, CONTEXT, OBJECT, STRING, 0, ACC_STORE_ANY)
|
||||
JS_DEFINE_CALLINFO_3(extern, BOOL_FAIL, DeleteStrKey, CONTEXT, OBJECT, STRING, 0, ACC_STORE_ANY)
|
||||
|
||||
JS_REQUIRES_STACK AbortableRecordingStatus
|
||||
TraceRecorder::record_JSOP_DELPROP()
|
||||
@ -11079,7 +11079,7 @@ TraceRecorder::record_JSOP_DELPROP()
|
||||
JS_ASSERT(ATOM_IS_STRING(atom));
|
||||
|
||||
LIns* args[] = { INS_ATOM(atom), get(&lval), cx_ins };
|
||||
LIns* rval_ins = lir->insCall(&js_DelStrKey_ci, args);
|
||||
LIns* rval_ins = lir->insCall(&DeleteStrKey_ci, args);
|
||||
|
||||
set(&lval, rval_ins);
|
||||
return ARECORD_CONTINUE;
|
||||
@ -11088,26 +11088,26 @@ TraceRecorder::record_JSOP_DELPROP()
|
||||
JS_REQUIRES_STACK AbortableRecordingStatus
|
||||
TraceRecorder::record_JSOP_DELELEM()
|
||||
{
|
||||
jsval& idx = stackval(-1);
|
||||
if (!JSVAL_IS_INT(idx) && !JSVAL_IS_STRING(idx)) {
|
||||
AbortRecording(cx, "JSOP_DELELEM on non-int, non-string index");
|
||||
return ARECORD_STOP;
|
||||
}
|
||||
|
||||
jsval& lval = stackval(-2);
|
||||
if (JSVAL_IS_PRIMITIVE(lval)) {
|
||||
AbortRecording(cx, "JSOP_DELELEM on primitive base expression");
|
||||
return ARECORD_STOP;
|
||||
}
|
||||
|
||||
jsval& idx = stackval(-1);
|
||||
LIns* rval_ins;
|
||||
|
||||
if (isInt32(idx)) {
|
||||
LIns* args[] = { makeNumberInt32(get(&idx)), get(&lval), cx_ins };
|
||||
rval_ins = lir->insCall(&js_DelIntKey_ci, args);
|
||||
} else {
|
||||
rval_ins = lir->insCall(&DeleteIntKey_ci, args);
|
||||
} else if (JSVAL_IS_STRING(idx)) {
|
||||
LIns* args[] = { get(&idx), get(&lval), cx_ins };
|
||||
rval_ins = lir->insCall(&js_DelStrKey_ci, args);
|
||||
rval_ins = lir->insCall(&DeleteStrKey_ci, args);
|
||||
} else {
|
||||
AbortRecording(cx, "JSOP_DELELEM on non-int, non-string index");
|
||||
return ARECORD_STOP;
|
||||
}
|
||||
|
||||
set(&lval, rval_ins);
|
||||
return ARECORD_CONTINUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user