Bug 1184564 part 5 - Remove jsval typedef. r=jorendorff

This commit is contained in:
Jan de Mooij 2015-07-19 00:01:37 +02:00
parent f53ae1b46e
commit b7a55dbc9b
4 changed files with 13 additions and 20 deletions

View File

@ -1940,13 +1940,6 @@ static_assert(sizeof(LayoutAlignmentTester) == 16,
} // namespace JS
/*
* JS::Value and jsval are the same type; jsval is the old name, kept around
* for backwards compatibility along with all the JSVAL_* operations below.
* jsval_layout is an implementation detail and should not be used externally.
*/
typedef JS::Value jsval;
static_assert(sizeof(jsval_layout) == sizeof(JS::Value),
"jsval_layout and JS::Value must have identical layouts");

View File

@ -229,7 +229,7 @@ struct RequiredStringArg {
};
static bool
StartProfiling(JSContext* cx, unsigned argc, jsval* vp)
StartProfiling(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
@ -256,7 +256,7 @@ StartProfiling(JSContext* cx, unsigned argc, jsval* vp)
}
static bool
StopProfiling(JSContext* cx, unsigned argc, jsval* vp)
StopProfiling(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
@ -272,7 +272,7 @@ StopProfiling(JSContext* cx, unsigned argc, jsval* vp)
}
static bool
PauseProfilers(JSContext* cx, unsigned argc, jsval* vp)
PauseProfilers(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
@ -288,7 +288,7 @@ PauseProfilers(JSContext* cx, unsigned argc, jsval* vp)
}
static bool
ResumeProfilers(JSContext* cx, unsigned argc, jsval* vp)
ResumeProfilers(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
@ -305,7 +305,7 @@ ResumeProfilers(JSContext* cx, unsigned argc, jsval* vp)
/* Usage: DumpProfile([filename[, profileName]]) */
static bool
DumpProfile(JSContext* cx, unsigned argc, jsval* vp)
DumpProfile(JSContext* cx, unsigned argc, Value* vp)
{
bool ret;
CallArgs args = CallArgsFromVp(argc, vp);
@ -332,7 +332,7 @@ DumpProfile(JSContext* cx, unsigned argc, jsval* vp)
}
static bool
GetMaxGCPauseSinceClear(JSContext* cx, unsigned argc, jsval* vp)
GetMaxGCPauseSinceClear(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setNumber(uint32_t(cx->runtime()->gc.stats.getMaxGCPauseSinceClear()));
@ -340,7 +340,7 @@ GetMaxGCPauseSinceClear(JSContext* cx, unsigned argc, jsval* vp)
}
static bool
ClearMaxGCPauseAccumulator(JSContext* cx, unsigned argc, jsval* vp)
ClearMaxGCPauseAccumulator(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setNumber(uint32_t(cx->runtime()->gc.stats.clearMaxGCPauseAccumulator()));
@ -350,7 +350,7 @@ ClearMaxGCPauseAccumulator(JSContext* cx, unsigned argc, jsval* vp)
#if defined(MOZ_SHARK) || defined(MOZ_INSTRUMENTS)
static bool
IgnoreAndReturnTrue(JSContext* cx, unsigned argc, jsval* vp)
IgnoreAndReturnTrue(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setBoolean(true);
@ -361,7 +361,7 @@ IgnoreAndReturnTrue(JSContext* cx, unsigned argc, jsval* vp)
#ifdef MOZ_CALLGRIND
static bool
StartCallgrind(JSContext* cx, unsigned argc, jsval* vp)
StartCallgrind(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setBoolean(js_StartCallgrind());
@ -369,7 +369,7 @@ StartCallgrind(JSContext* cx, unsigned argc, jsval* vp)
}
static bool
StopCallgrind(JSContext* cx, unsigned argc, jsval* vp)
StopCallgrind(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setBoolean(js_StopCallgrind());
@ -377,7 +377,7 @@ StopCallgrind(JSContext* cx, unsigned argc, jsval* vp)
}
static bool
DumpCallgrind(JSContext* cx, unsigned argc, jsval* vp)
DumpCallgrind(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {

View File

@ -24,7 +24,7 @@ namespace jit {
static Register CallReg = ip;
static const int defaultShift = 3;
JS_STATIC_ASSERT(1 << defaultShift == sizeof(jsval));
JS_STATIC_ASSERT(1 << defaultShift == sizeof(JS::Value));
// MacroAssemblerARM is inheriting form Assembler defined in
// Assembler-arm.{h,cpp}

View File

@ -63,7 +63,7 @@ static const ValueOperand softfpReturnOperand = ValueOperand(v1, v0);
static Register CallReg = t9;
static const int defaultShift = 3;
static_assert(1 << defaultShift == sizeof(jsval), "The defaultShift is wrong");
static_assert(1 << defaultShift == sizeof(JS::Value), "The defaultShift is wrong");
class MacroAssemblerMIPS : public Assembler
{