Bug 838759 - Remove assertJit shell function. r=bhackett

This commit is contained in:
Jan de Mooij 2013-02-07 10:21:15 +01:00
Родитель 113cf7dc1c
Коммит 0e49be8e6d
10 изменённых файлов: 4 добавлений и 47 удалений

Просмотреть файл

@ -2,11 +2,9 @@
setDebug(true);
function callee() {
assertJit();
evalInFrame(1, "x = 'success'");
}
function caller() {
assertJit();
var x = ({ dana : "zuul" });
callee();
return x;

Просмотреть файл

@ -2,11 +2,9 @@
setDebug(true);
function callee() {
assertJit();
evalInFrame(1, "x = 'success'");
}
function caller() {
assertJit();
var x = "failure";
callee();
return x;

Просмотреть файл

@ -3,7 +3,6 @@ setDebug(true);
this.__defineGetter__("someProperty", function () { evalInFrame(1, "var x = 'success'"); });
function caller(obj) {
assertJit();
var x = ({ dana : 'zuul' });
obj.someProperty;
return x;

Просмотреть файл

@ -3,7 +3,6 @@ setDebug(true);
this.__defineGetter__("someProperty", function () { evalInFrame(1, "x = 'success'"); });
function caller(obj) {
assertJit();
var x = "failure";
obj.someProperty;
return x;

Просмотреть файл

@ -2,7 +2,6 @@
setDebug(true);
function callee() {
assertJit();
evalInFrame(1, "var x = 'success'");
}
callee();

Просмотреть файл

@ -3,11 +3,10 @@ setDebug(true);
function nop(){}
function caller(obj) {
assertJit();
var x = ({ dana : "zuul" });
return x;
}
// 0 is the pc of "assertJit()", we want the pc of "return x", 2 lines below.
var pc = line2pc(caller, pc2line(caller, 0) + 2);
// 0 is the pc of the first line, we want the pc of "return x", on the next line.
var pc = line2pc(caller, pc2line(caller, 0) + 1);
trap(caller, pc, "x = 'success'; nop()");
assertEq(caller(this), "success");

Просмотреть файл

@ -3,9 +3,8 @@ setDebug(true);
function nop(){}
function caller(obj) {
assertJit();
var x = "failure";
return x;
}
trap(caller, 20, "x = 'success'; nop()");
trap(caller, 9 /* GETLOCAL x */, "x = 'success'; nop()");
assertEq(caller(this), "success");

Просмотреть файл

@ -12,10 +12,7 @@ function assertObjectsEqual(obj1, obj2) {
assertEq(obj2.d, 12);
}
// :XXX: below calls to assertJit can throw us out of JIT code for some TI settings.
function forName(obj) {
// assertJit();
eval('');
var r = { };
for (x in obj)
@ -24,7 +21,6 @@ function forName(obj) {
}
function forGlobalName(obj) {
// assertJit();
var r = { };
for (x in obj)
r[x] = obj[x];
@ -32,7 +28,6 @@ function forGlobalName(obj) {
}
function forProp(obj) {
// assertJit();
var r = { };
var c = { };
for (c.x in obj)
@ -41,7 +36,6 @@ function forProp(obj) {
}
function forElem(obj, x) {
// assertJit();
var r = { };
var c = { };
for (c[x] in obj)
@ -50,7 +44,6 @@ function forElem(obj, x) {
}
function forLocal(obj) {
// assertJit();
var r = { };
for (var x in obj)
r[x] = obj[x];
@ -58,7 +51,6 @@ function forLocal(obj) {
}
function forArg(obj, x) {
// assertJit();
var r = { };
for (x in obj)
r[x] = obj[x];

Просмотреть файл

@ -21,5 +21,4 @@ MSG_DEF(JSSMSG_TOO_MANY_ARGS, 9, 1, JSEXN_NONE, "{0}: too many argume
MSG_DEF(JSSMSG_ASSERT_EQ_FAILED, 10, 2, JSEXN_NONE, "Assertion failed: got {0}, expected {1}")
MSG_DEF(JSSMSG_ASSERT_EQ_FAILED_MSG, 11, 3, JSEXN_NONE, "Assertion failed: got {0}, expected {1}: {2}")
MSG_DEF(JSSMSG_INVALID_ARGS, 12, 1, JSEXN_NONE, "{0}: invalid arguments")
MSG_DEF(JSSMSG_ASSERT_JIT_FAILED, 13, 0, JSEXN_NONE, "unexpected failure to JIT")
MSG_DEF(JSSMSG_BAD_ALIGNMENT, 14, 0, JSEXN_NONE, "serialized data must be 8-byte-aligned")
MSG_DEF(JSSMSG_BAD_ALIGNMENT, 13, 0, JSEXN_NONE, "serialized data must be 8-byte-aligned")

Просмотреть файл

@ -1425,27 +1425,6 @@ AssertEq(JSContext *cx, unsigned argc, jsval *vp)
return true;
}
static JSBool
AssertJit(JSContext *cx, unsigned argc, jsval *vp)
{
#ifdef JS_METHODJIT
if (JS_GetOptions(cx) & JSOPTION_METHODJIT) {
/*
* Ignore calls to this native when inference is enabled, with
* METHODJIT_ALWAYS recompilation can happen and discard the script's
* jitcode.
*/
if (!cx->typeInferenceEnabled() && cx->hasfp() && !cx->fp()->jit()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL, JSSMSG_ASSERT_JIT_FAILED);
return false;
}
}
#endif
JS_SET_RVAL(cx, vp, JSVAL_VOID);
return true;
}
static UnrootedScript
ValueToScript(JSContext *cx, jsval v, JSFunction **funp = NULL)
{
@ -3663,10 +3642,6 @@ static JSFunctionSpecWithHelp shell_functions[] = {
" Throw if the first two arguments are not the same (both +0 or both -0,\n"
" both NaN, or non-zero and ===)."),
JS_FN_HELP("assertJit", AssertJit, 0, 0,
"assertJit()",
" Throw if the calling function failed to JIT."),
JS_FN_HELP("setDebug", SetDebug, 1, 0,
"setDebug(debug)",
" Set debug mode."),