Bug 867426 - Remove RawFunction typedef; r=jonco
authorTerrence Cole <terrence@mozilla.com>
Tue, 30 Apr 2013 15:40:29 -0700
changeset 141448 b1d2c16bee474b3f969398c03808cbad4376e623
parent 141447 a559bb362a2bcd31168b1272515f1534062d8804
child 141449 8c8e389fd3c34f41d1d5adbdde629bfa30e4b70a
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs867426
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 867426 - Remove RawFunction typedef; r=jonco
js/public/RootingAPI.h
js/src/ion/AsmJSModule.h
js/src/ion/CodeGenerator.cpp
js/src/ion/ExecutionModeInlines.h
js/src/ion/IonCaches.cpp
js/src/ion/IonFrames.h
js/src/jsapi.cpp
js/src/jscntxt.cpp
js/src/jscntxt.h
js/src/jsfun.cpp
js/src/jsinfer.cpp
js/src/jsprobes.cpp
js/src/jsprobes.h
js/src/jsscript.cpp
js/src/vm/ArgumentsObject.cpp
js/src/vm/SPSProfiler.cpp
js/src/vm/SPSProfiler.h
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -820,12 +820,11 @@ class CompilerRootNode
 
   protected:
     js::gc::Cell *ptr_;
 };
 
 }  /* namespace js */
 
 ForwardDeclareJS(Script);
-ForwardDeclareJS(Function);
 ForwardDeclareJS(Object);
 
 #endif  /* jsgc_root_h___ */
--- a/js/src/ion/AsmJSModule.h
+++ b/js/src/ion/AsmJSModule.h
@@ -429,17 +429,17 @@ class AsmJSModule
     bool addExit(unsigned ffiIndex, unsigned *exitIndex) {
         *exitIndex = unsigned(exits_.length());
         return exits_.append(Exit(ffiIndex));
     }
     bool addFunctionCounts(ion::IonScriptCounts *counts) {
         return functionCounts_.append(counts);
     }
 
-    bool addExportedFunction(RawFunction fun, PropertyName *maybeFieldName,
+    bool addExportedFunction(JSFunction *fun, PropertyName *maybeFieldName,
                              MoveRef<ArgCoercionVector> argCoercions, ReturnType returnType)
     {
         ExportedFunction func(fun, maybeFieldName, argCoercions, returnType);
         return exports_.append(Move(func));
     }
     unsigned numExportedFunctions() const {
         return exports_.length();
     }
--- a/js/src/ion/CodeGenerator.cpp
+++ b/js/src/ion/CodeGenerator.cpp
@@ -1526,17 +1526,17 @@ CodeGenerator::emitParCallToUncompiledSc
 }
 
 bool
 CodeGenerator::visitCallKnown(LCallKnown *call)
 {
     Register calleereg = ToRegister(call->getFunction());
     Register objreg    = ToRegister(call->getTempObject());
     uint32_t unusedStack = StackOffsetOfPassedArg(call->argslot());
-    RawFunction target = call->getSingleTarget();
+    JSFunction *target = call->getSingleTarget();
     ExecutionMode executionMode = gen->info().executionMode();
     Label end, uncompiled;
 
     // Native single targets are handled by LCallNative.
     JS_ASSERT(!target->isNative());
     // Missing arguments must have been explicitly appended by the IonBuilder.
     JS_ASSERT(target->nargs <= call->numStackArgs());
 
@@ -1746,17 +1746,17 @@ CodeGenerator::visitApplyArgsGeneric(LAp
     // Copy the arguments of the current function.
     emitPushArguments(apply, copyreg);
 
     masm.checkStackAlignment();
 
     // If the function is known to be uncompilable, only emit the call to InvokeFunction.
     ExecutionMode executionMode = gen->info().executionMode();
     if (apply->hasSingleTarget()) {
-        RawFunction target = apply->getSingleTarget();
+        JSFunction *target = apply->getSingleTarget();
         if (!CanIonCompile(target, executionMode)) {
             if (!emitCallInvokeFunction(apply, copyreg))
                 return false;
             emitPopArguments(apply, copyreg);
             return true;
         }
     }
 
--- a/js/src/ion/ExecutionModeInlines.h
+++ b/js/src/ion/ExecutionModeInlines.h
@@ -59,17 +59,17 @@ CanIonCompile(RawScript script, Executio
       case SequentialExecution: return script->canIonCompile();
       case ParallelExecution: return script->canParallelIonCompile();
     }
     JS_NOT_REACHED("No such execution mode");
     return false;
 }
 
 static inline bool
-CanIonCompile(RawFunction fun, ExecutionMode cmode)
+CanIonCompile(JSFunction *fun, ExecutionMode cmode)
 {
     return fun->isInterpreted() && CanIonCompile(fun->nonLazyScript(), cmode);
 }
 
 static inline bool
 CompilingOffThread(RawScript script, ExecutionMode cmode)
 {
     switch (cmode) {
--- a/js/src/ion/IonCaches.cpp
+++ b/js/src/ion/IonCaches.cpp
@@ -2219,17 +2219,17 @@ GenerateScopeChainGuard(MacroAssembler &
                         Register scopeObjReg, Shape *shape, Label *failures)
 {
     if (scopeObj->isCall()) {
         // We can skip a guard on the call object if the script's bindings are
         // guaranteed to be immutable (and thus cannot introduce shadowing
         // variables).
         CallObject *callObj = &scopeObj->asCall();
         if (!callObj->isForEval()) {
-            RawFunction fun = &callObj->callee();
+            JSFunction *fun = &callObj->callee();
             RawScript script = fun->nonLazyScript();
             if (!script->funHasExtensibleScope)
                 return;
         }
     } else if (scopeObj->isGlobal()) {
         // If this is the last object on the scope walk, and the property we've
         // found is not configurable, then we don't need a shape guard because
         // the shape cannot be removed.
--- a/js/src/ion/IonFrames.h
+++ b/js/src/ion/IonFrames.h
@@ -59,17 +59,17 @@ CalleeTokenIsFunction(CalleeToken token)
     return GetCalleeTokenTag(token) == CalleeToken_Function;
 }
 static inline JSFunction *
 CalleeTokenToFunction(CalleeToken token)
 {
     JS_ASSERT(CalleeTokenIsFunction(token));
     return (JSFunction *)token;
 }
-static inline RawFunction
+static inline JSFunction *
 CalleeTokenToParallelFunction(CalleeToken token)
 {
     JS_ASSERT(GetCalleeTokenTag(token) == CalleeToken_ParallelFunction);
     return (JSFunction *)(uintptr_t(token) & ~uintptr_t(0x3));
 }
 static inline RawScript
 CalleeTokenToScript(CalleeToken token)
 {
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -5068,17 +5068,17 @@ JS_DefineFunctions(JSContext *cx, JSObje
                 return JS_FALSE;
             if (!funVal.isUndefined()) {
                 if (!JSObject::defineProperty(cx, obj, atom->asPropertyName(), funVal,
                                              NULL, NULL, flags & ~JSFUN_FLAGS_MASK))
                 {
                     return JS_FALSE;
                 }
             } else {
-                RawFunction fun = DefineFunction(cx, obj, id, /* native = */ NULL, fs->nargs, 0,
+                JSFunction *fun = DefineFunction(cx, obj, id, /* native = */ NULL, fs->nargs, 0,
                                                  JSFunction::ExtendedFinalizeKind, SingletonObject);
                 if (!fun)
                     return JS_FALSE;
                 fun->setIsSelfHostedBuiltin();
                 fun->setExtendedSlot(0, PrivateValue(const_cast<JSFunctionSpec*>(fs)));
                 funVal.setObject(*fun);
             }
             RootedObject holder(cx, cx->global()->intrinsicsHolder());
--- a/js/src/jscntxt.cpp
+++ b/js/src/jscntxt.cpp
@@ -235,17 +235,17 @@ JSCompartment::sweepCallsiteClones()
             CallsiteCloneKey key = e.front().key;
             JSFunction *fun = e.front().value;
             if (!IsScriptMarked(&key.script) || !IsObjectMarked(&fun))
                 e.removeFront();
         }
     }
 }
 
-RawFunction
+JSFunction *
 js::CloneFunctionAtCallsite(JSContext *cx, HandleFunction fun, HandleScript script, jsbytecode *pc)
 {
     JS_ASSERT(cx->typeInferenceEnabled());
     JS_ASSERT(fun->nonLazyScript()->shouldCloneAtCallsite);
     JS_ASSERT(!fun->nonLazyScript()->enclosingStaticScope());
     JS_ASSERT(types::UseNewTypeForClone(fun));
 
     typedef CallsiteCloneKey Key;
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -84,17 +84,17 @@ struct CallsiteCloneKey {
     }
 };
 
 typedef HashMap<CallsiteCloneKey,
                 ReadBarriered<JSFunction>,
                 CallsiteCloneKey,
                 SystemAllocPolicy> CallsiteCloneTable;
 
-RawFunction CloneFunctionAtCallsite(JSContext *cx, HandleFunction fun,
+JSFunction *CloneFunctionAtCallsite(JSContext *cx, HandleFunction fun,
                                     HandleScript script, jsbytecode *pc);
 
 typedef HashSet<JSObject *> ObjectSet;
 typedef HashSet<Shape *> ShapeSet;
 
 /* Detects cycles when traversing an object graph. */
 class AutoCycleDetector
 {
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -144,17 +144,17 @@ fun_getProperty(JSContext *cx, HandleObj
          * If the frame was called from within an inlined frame, mark the
          * innermost function as uninlineable to expand its frame and allow us
          * to recover its callee object.
          */
         InlinedSite *inlined;
         jsbytecode *prevpc = fp->prevpc(&inlined);
         if (inlined) {
             mjit::JITChunk *chunk = fp->prev()->jit()->chunk(prevpc);
-            RawFunction fun = chunk->inlineFrames()[inlined->inlineIndex].fun;
+            JSFunction *fun = chunk->inlineFrames()[inlined->inlineIndex].fun;
             fun->nonLazyScript()->uninlineable = true;
             MarkTypeObjectFlags(cx, fun, OBJECT_FLAG_UNINLINEABLE);
         }
     }
 #endif
 
     if (JSID_IS_ATOM(id, cx->names().caller)) {
         ++iter;
@@ -1151,17 +1151,17 @@ js::CallOrConstructBoundFunction(JSConte
     *vp = args.rval();
     return true;
 }
 
 #if JS_HAS_GENERATORS
 static JSBool
 fun_isGenerator(JSContext *cx, unsigned argc, Value *vp)
 {
-    RawFunction fun;
+    JSFunction *fun;
     if (!IsFunctionObject(vp[1], &fun)) {
         JS_SET_RVAL(cx, vp, BooleanValue(false));
         return true;
     }
 
     bool result = false;
     if (fun->hasScript()) {
         RawScript script = fun->nonLazyScript();
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -1392,24 +1392,24 @@ TypeConstraintSetElement::newType(JSCont
     RootedScript script(cx, script_);
     if (type.isUnknown() ||
         type.isPrimitive(JSVAL_TYPE_INT32) ||
         type.isPrimitive(JSVAL_TYPE_DOUBLE)) {
         objectTypes->addSetProperty(cx, script, pc, valueTypes, JSID_VOID);
     }
 }
 
-static inline RawFunction
+static inline JSFunction *
 CloneCallee(JSContext *cx, HandleFunction fun, HandleScript script, jsbytecode *pc)
 {
     /*
      * Clone called functions at appropriate callsites to match interpreter
      * behavior.
      */
-    RawFunction callee = CloneFunctionAtCallsite(cx, fun, script, pc);
+    JSFunction *callee = CloneFunctionAtCallsite(cx, fun, script, pc);
     if (!callee)
         return NULL;
 
     InferSpew(ISpewOps, "callsiteCloneType: #%u:%05u: %s",
               script->id(), pc - script->code, TypeString(Type::ObjectType(callee)));
 
     return callee;
 }
--- a/js/src/jsprobes.cpp
+++ b/js/src/jsprobes.cpp
@@ -84,40 +84,40 @@ ScriptFilename(const RawScript script)
     if (!script)
         return Probes::nullName;
     if (!script->filename())
         return Probes::anonymousName;
     return script->filename();
 }
 
 static const char *
-FunctionName(JSContext *cx, RawFunction fun, JSAutoByteString* bytes)
+FunctionName(JSContext *cx, JSFunction *fun, JSAutoByteString* bytes)
 {
     if (!fun)
         return Probes::nullName;
     if (!fun->displayAtom())
         return Probes::anonymousName;
     return bytes->encodeLatin1(cx, fun->displayAtom()) ? bytes->ptr() : Probes::nullName;
 }
 
 /*
  * These functions call the DTrace macros for the JavaScript USDT probes.
  * Originally this code was inlined in the JavaScript code; however since
  * a number of operations are called, these have been placed into functions
  * to reduce any negative compiler optimization effect that the addition of
  * a number of usually unused lines of code would cause.
  */
 void
-Probes::DTraceEnterJSFun(JSContext *cx, RawFunction fun, RawScript script)
+Probes::DTraceEnterJSFun(JSContext *cx, JSFunction *fun, RawScript script)
 {
     JSAutoByteString funNameBytes;
     JAVASCRIPT_FUNCTION_ENTRY(ScriptFilename(script), Probes::nullName,
                               FunctionName(cx, fun, &funNameBytes));
 }
 
 void
-Probes::DTraceExitJSFun(JSContext *cx, RawFunction fun, RawScript script)
+Probes::DTraceExitJSFun(JSContext *cx, JSFunction *fun, RawScript script)
 {
     JSAutoByteString funNameBytes;
     JAVASCRIPT_FUNCTION_RETURN(ScriptFilename(script), Probes::nullName,
                                FunctionName(cx, fun, &funNameBytes));
 }
 #endif
--- a/js/src/jsprobes.h
+++ b/js/src/jsprobes.h
@@ -70,20 +70,20 @@ bool callTrackingActive(JSContext *);
 
 /*
  * Test whether anything is looking for JIT native code registration events.
  * This information will not be collected otherwise.
  */
 bool wantNativeAddressInfo(JSContext *);
 
 /* Entering a JS function */
-bool enterScript(JSContext *, RawScript, RawFunction , StackFrame *);
+bool enterScript(JSContext *, RawScript, JSFunction *, StackFrame *);
 
 /* About to leave a JS function */
-bool exitScript(JSContext *, RawScript, RawFunction , StackFrame *);
+bool exitScript(JSContext *, RawScript, JSFunction *, StackFrame *);
 
 /* Executing a script */
 bool startExecution(RawScript script);
 
 /* Script has completed execution */
 bool stopExecution(RawScript script);
 
 /*
@@ -144,18 +144,18 @@ void
 discardExecutableRegion(void *start, size_t size);
 
 /*
  * Internal: DTrace-specific functions to be called during Probes::enterScript
  * and Probes::exitScript. These will not be inlined, but the argument
  * marshalling required for these probe points is expensive enough that it
  * shouldn't really matter.
  */
-void DTraceEnterJSFun(JSContext *cx, RawFunction fun, RawScript script);
-void DTraceExitJSFun(JSContext *cx, RawFunction fun, RawScript script);
+void DTraceEnterJSFun(JSContext *cx, JSFunction *fun, RawScript script);
+void DTraceExitJSFun(JSContext *cx, JSFunction *fun, RawScript script);
 
 } /* namespace Probes */
 
 /*
  * Many probe handlers are implemented inline for minimal performance impact,
  * especially important when no backends are enabled.
  */
 
@@ -176,17 +176,17 @@ Probes::callTrackingActive(JSContext *cx
 inline bool
 Probes::wantNativeAddressInfo(JSContext *cx)
 {
     return (cx->reportGranularity >= JITREPORT_GRANULARITY_FUNCTION &&
             JITGranularityRequested(cx) >= JITREPORT_GRANULARITY_FUNCTION);
 }
 
 inline bool
-Probes::enterScript(JSContext *cx, RawScript script, RawFunction maybeFun,
+Probes::enterScript(JSContext *cx, RawScript script, JSFunction *maybeFun,
                     StackFrame *fp)
 {
     bool ok = true;
 #ifdef INCLUDE_MOZILLA_DTRACE
     if (JAVASCRIPT_FUNCTION_ENTRY_ENABLED())
         DTraceEnterJSFun(cx, maybeFun, script);
 #endif
 #ifdef MOZ_TRACE_JSCALLS
@@ -199,17 +199,17 @@ Probes::enterScript(JSContext *cx, RawSc
         JS_ASSERT_IF(!fp->isGeneratorFrame(), !fp->hasPushedSPSFrame());
         fp->setPushedSPSFrame();
     }
 
     return ok;
 }
 
 inline bool
-Probes::exitScript(JSContext *cx, RawScript script, RawFunction maybeFun,
+Probes::exitScript(JSContext *cx, RawScript script, JSFunction *maybeFun,
                    StackFrame *fp)
 {
     bool ok = true;
 
 #ifdef INCLUDE_MOZILLA_DTRACE
     if (JAVASCRIPT_FUNCTION_RETURN_ENABLED())
         DTraceExitJSFun(cx, maybeFun, script);
 #endif
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -1931,17 +1931,17 @@ JSScript::enclosingScriptsCompiledSucces
      * static JSFunction of its enclosing script. The enclosing function's
      * 'script' field will be NULL until the enclosing script successfully
      * compiles. Thus, we can detect failed compilation by looking for
      * JSFunctions in the enclosingScope chain without scripts.
      */
     RawObject enclosing = enclosingStaticScope();
     while (enclosing) {
         if (enclosing->isFunction()) {
-            RawFunction fun = enclosing->toFunction();
+            JSFunction *fun = enclosing->toFunction();
             if (!fun->hasScript())
                 return false;
             enclosing = fun->nonLazyScript()->enclosingStaticScope();
         } else {
             enclosing = enclosing->asStaticBlock().enclosingStaticScope();
         }
     }
     return true;
--- a/js/src/vm/ArgumentsObject.cpp
+++ b/js/src/vm/ArgumentsObject.cpp
@@ -63,17 +63,17 @@ ArgumentsObject::MaybeForwardToCallObjec
     }
 }
 
 #if defined(JS_ION)
 /* static */ void
 ArgumentsObject::MaybeForwardToCallObject(ion::IonJSFrameLayout *frame, HandleObject callObj,
                                           JSObject *obj, ArgumentsData *data)
 {
-    RawFunction callee = ion::CalleeTokenToFunction(frame->calleeToken());
+    JSFunction *callee = ion::CalleeTokenToFunction(frame->calleeToken());
     RawScript script = callee->nonLazyScript();
     if (callee->isHeavyweight() && script->argsObjAliasesFormals()) {
         JS_ASSERT(callObj && callObj->isCall());
         obj->initFixedSlot(MAYBE_CALL_SLOT, ObjectValue(*callObj.get()));
         for (AliasedFormalIter fi(script); fi; fi++)
             data->args[fi.frameIndex()] = MagicValue(JS_FORWARD_TO_CALL_OBJECT);
     }
 }
--- a/js/src/vm/SPSProfiler.cpp
+++ b/js/src/vm/SPSProfiler.cpp
@@ -77,17 +77,17 @@ SPSProfiler::enable(bool enabled)
      * their profiler state toggled so they behave properly.
      */
     ion::ToggleBaselineSPS(rt, enabled);
 #endif
 }
 
 /* Lookup the string for the function/script, creating one if necessary */
 const char*
-SPSProfiler::profileString(JSContext *cx, RawScript script, RawFunction maybeFun)
+SPSProfiler::profileString(JSContext *cx, RawScript script, JSFunction *maybeFun)
 {
     JS_ASSERT(strings.initialized());
     ProfileStringMap::AddPtr s = strings.lookupForAdd(script);
     if (s)
         return s->value;
     const char *str = allocProfileString(cx, script, maybeFun);
     if (str == NULL)
         return NULL;
@@ -113,30 +113,30 @@ SPSProfiler::onScriptFinalized(RawScript
     if (ProfileStringMap::Ptr entry = strings.lookup(script)) {
         const char *tofree = entry->value;
         strings.remove(entry);
         js_free(const_cast<char *>(tofree));
     }
 }
 
 bool
-SPSProfiler::enter(JSContext *cx, RawScript script, RawFunction maybeFun)
+SPSProfiler::enter(JSContext *cx, RawScript script, JSFunction *maybeFun)
 {
     const char *str = profileString(cx, script, maybeFun);
     if (str == NULL)
         return false;
 
     JS_ASSERT_IF(*size_ > 0 && *size_ - 1 < max_ && stack_[*size_ - 1].js(),
                  stack_[*size_ - 1].pc() != NULL);
     push(str, NULL, script, script->code);
     return true;
 }
 
 void
-SPSProfiler::exit(JSContext *cx, RawScript script, RawFunction maybeFun)
+SPSProfiler::exit(JSContext *cx, RawScript script, JSFunction *maybeFun)
 {
     pop();
 
 #ifdef DEBUG
     /* Sanity check to make sure push/pop balanced */
     if (*size_ < max_) {
         const char *str = profileString(cx, script, maybeFun);
         /* Can't fail lookup because we should already be in the set */
@@ -209,17 +209,17 @@ SPSProfiler::pop()
 
 /*
  * Serializes the script/function pair into a "descriptive string" which is
  * allowed to fail. This function cannot trigger a GC because it could finalize
  * some scripts, resize the hash table of profile strings, and invalidate the
  * AddPtr held while invoking allocProfileString.
  */
 const char*
-SPSProfiler::allocProfileString(JSContext *cx, RawScript script, RawFunction maybeFun)
+SPSProfiler::allocProfileString(JSContext *cx, RawScript script, JSFunction *maybeFun)
 {
     DebugOnly<uint64_t> gcBefore = cx->runtime->gcNumber;
     StringBuffer buf(cx);
     bool hasAtom = maybeFun != NULL && maybeFun->displayAtom() != NULL;
     if (hasAtom) {
         if (!buf.append(maybeFun->displayAtom()))
             return NULL;
         if (!buf.append(" ("))
--- a/js/src/vm/SPSProfiler.h
+++ b/js/src/vm/SPSProfiler.h
@@ -131,17 +131,17 @@ class SPSProfiler
     ProfileStringMap     strings;
     ProfileEntry         *stack_;
     uint32_t             *size_;
     uint32_t             max_;
     bool                 slowAssertions;
     uint32_t             enabled_;
 
     const char *allocProfileString(JSContext *cx, RawScript script,
-                                   RawFunction function);
+                                   JSFunction *function);
     void push(const char *string, void *sp, RawScript script, jsbytecode *pc);
     void pop();
 
   public:
     SPSProfiler(JSRuntime *rt);
     ~SPSProfiler();
 
     uint32_t *sizePointer() { return size_; }
@@ -159,18 +159,18 @@ class SPSProfiler
      * Functions which are the actual instrumentation to track run information
      *
      *   - enter: a function has started to execute
      *   - updatePC: updates the pc information about where a function
      *               is currently executing
      *   - exit: this function has ceased execution, and no further
      *           entries/exits will be made
      */
-    bool enter(JSContext *cx, RawScript script, RawFunction maybeFun);
-    void exit(JSContext *cx, RawScript script, RawFunction maybeFun);
+    bool enter(JSContext *cx, RawScript script, JSFunction *maybeFun);
+    void exit(JSContext *cx, RawScript script, JSFunction *maybeFun);
     void updatePC(RawScript script, jsbytecode *pc) {
         if (enabled() && *size_ - 1 < max_) {
             JS_ASSERT(*size_ > 0);
             JS_ASSERT(stack_[*size_ - 1].script() == script);
             stack_[*size_ - 1].setPC(pc);
         }
     }
 
@@ -246,17 +246,17 @@ class SPSProfiler
                                 mjit::JITChunk *chunk);
     void unregisterScript(RawScript script, mjit::JITChunk *chunk);
   public:
 #else
     jsbytecode *ipToPC(RawScript script, size_t ip) { return NULL; }
 #endif
 
     void setProfilingStack(ProfileEntry *stack, uint32_t *size, uint32_t max);
-    const char *profileString(JSContext *cx, RawScript script, RawFunction maybeFun);
+    const char *profileString(JSContext *cx, RawScript script, JSFunction *maybeFun);
     void onScriptFinalized(RawScript script);
 
     /* meant to be used for testing, not recommended to call in normal code */
     size_t stringsCount() { return strings.count(); }
     void stringsReset() { strings.clear(); }
 
     uint32_t *addressOfEnabled() {
         return &enabled_;