diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 843f4adab5b..5f52551230c 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -765,7 +765,7 @@ JS_PUBLIC_API(void) JS_ShutDown(void) { #ifdef MOZ_TRACEVIS - JS_StopTraceVis(); + StopTraceVis(); #endif #ifdef JS_OPMETER diff --git a/js/src/jsdbgapi.cpp b/js/src/jsdbgapi.cpp index 3c53d2d7021..df7b044f50c 100644 --- a/js/src/jsdbgapi.cpp +++ b/js/src/jsdbgapi.cpp @@ -2302,7 +2302,7 @@ jstv_Lineno(JSContext *cx, JSStackFrame *fp) /* Collect states here and distribute to a matching buffer, if any */ JS_FRIEND_API(void) -js_StoreTraceVisState(JSContext *cx, TraceVisState s, TraceVisExitReason r) +js::StoreTraceVisState(JSContext *cx, TraceVisState s, TraceVisExitReason r) { JSStackFrame *fp = cx->fp; diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp index aaac5352a70..db776a83c13 100644 --- a/js/src/jsinterp.cpp +++ b/js/src/jsinterp.cpp @@ -2906,12 +2906,12 @@ js_Interpret(JSContext *cx) #define MONITOR_BRANCH_TRACEVIS \ JS_BEGIN_MACRO \ if (jumpTable != interruptJumpTable) \ - js_EnterTraceVisState(cx, S_RECORD, R_NONE); \ + EnterTraceVisState(cx, S_RECORD, R_NONE); \ JS_END_MACRO #else /* !JS_THREADED_INTERP */ #define MONITOR_BRANCH_TRACEVIS \ JS_BEGIN_MACRO \ - js_EnterTraceVisState(cx, S_RECORD, R_NONE); \ + EnterTraceVisState(cx, S_RECORD, R_NONE); \ JS_END_MACRO #endif #else diff --git a/js/src/jsops.cpp b/js/src/jsops.cpp index 595e03763c0..96d340929d0 100644 --- a/js/src/jsops.cpp +++ b/js/src/jsops.cpp @@ -102,7 +102,7 @@ #if JS_THREADED_INTERP #ifdef MOZ_TRACEVIS if (!moreInterrupts) - js_ExitTraceVisState(cx, R_ABORT); + ExitTraceVisState(cx, R_ABORT); #endif jumpTable = moreInterrupts ? interruptJumpTable : normalJumpTable; JS_EXTENSION_(goto *normalJumpTable[op]); diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index 51a919ca1a3..2ea37663bd0 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -15233,11 +15233,11 @@ FILE* traceVisLogFile = NULL; JSHashTable *traceVisScriptTable = NULL; JS_FRIEND_API(bool) -JS_StartTraceVis(const char* filename = "tracevis.dat") +StartTraceVis(const char* filename = "tracevis.dat") { if (traceVisLogFile) { // If we're currently recording, first we must stop. - JS_StopTraceVis(); + StopTraceVis(); } traceVisLogFile = fopen(filename, "wb"); @@ -15248,7 +15248,7 @@ JS_StartTraceVis(const char* filename = "tracevis.dat") } JS_FRIEND_API(JSBool) -StartTraceVis(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +StartTraceVisNative(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { JSBool ok; @@ -15257,10 +15257,10 @@ StartTraceVis(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval char *filename = js_DeflateString(cx, str->chars(), str->length()); if (!filename) goto error; - ok = JS_StartTraceVis(filename); + ok = StartTraceVis(filename); cx->free(filename); } else { - ok = JS_StartTraceVis(); + ok = StartTraceVis(); } if (ok) { @@ -15274,7 +15274,7 @@ StartTraceVis(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval } JS_FRIEND_API(bool) -JS_StopTraceVis() +StopTraceVis() { if (!traceVisLogFile) return false; @@ -15286,9 +15286,9 @@ JS_StopTraceVis() } JS_FRIEND_API(JSBool) -StopTraceVis(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +StopTraceVisNative(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - JSBool ok = JS_StopTraceVis(); + JSBool ok = StopTraceVis(); if (ok) fprintf(stderr, "stopped TraceVis recording\n"); diff --git a/js/src/jstracer.h b/js/src/jstracer.h index 65d965ea6e5..9378a443030 100644 --- a/js/src/jstracer.h +++ b/js/src/jstracer.h @@ -1517,19 +1517,22 @@ SetMaxCodeCacheBytes(JSContext* cx, uint32 bytes); extern bool NativeToValue(JSContext* cx, jsval& v, TraceType type, double* slot); +extern jsval * +ConcatPostImacroStackCleanup(uint32 argc, JSFrameRegs ®s, + TraceRecorder *recorder); #ifdef MOZ_TRACEVIS extern JS_FRIEND_API(bool) -JS_StartTraceVis(const char* filename); +StartTraceVis(const char* filename); extern JS_FRIEND_API(JSBool) -StartTraceVis(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); +StartTraceVisNative(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); extern JS_FRIEND_API(bool) -JS_StopTraceVis(); +StopTraceVis(); extern JS_FRIEND_API(JSBool) -StopTraceVis(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); +StopTraceVisNative(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); /* Must contain no more than 16 items. */ enum TraceVisState { @@ -1645,9 +1648,6 @@ struct TraceVisStateObj { #endif /* MOZ_TRACEVIS */ -extern jsval * -ConcatPostImacroStackCleanup(uint32 argc, JSFrameRegs ®s, - TraceRecorder *recorder); } /* namespace js */ #else /* !JS_TRACER */ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 9289ef69ef9..0c60923838f 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -97,6 +97,8 @@ #include #endif +using namespace js; + typedef enum JSShellExitCode { EXITCODE_RUNTIME_ERROR = 3, EXITCODE_FILE_NOT_FOUND = 4, @@ -846,7 +848,7 @@ ProcessArgs(JSContext *cx, JSObject *obj, char **argv, int argc) if (++i == argc) return usage(); - JS_StartTraceVis(argv[i]); + StartTraceVis(argv[i]); break; #endif default: @@ -3773,8 +3775,8 @@ static JSFunctionSpec shell_functions[] = { JS_FS("resumeVtune", js_ResumeVtune, 0,0,0), #endif #ifdef MOZ_TRACEVIS - JS_FS("startTraceVis", js_StartTraceVis, 1,0,0), - JS_FS("stopTraceVis", js_StopTraceVis, 0,0,0), + JS_FS("startTraceVis", StartTraceVisNative, 1,0,0), + JS_FS("stopTraceVis", StopTraceVisNative, 0,0,0), #endif #ifdef DEBUG_ARRAYS JS_FS("arrayInfo", js_ArrayInfo, 1,0,0),