diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index 18620e3a455..7197e597060 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -623,7 +623,7 @@ CodeGenerator::visitIntToString(LIntToString *lir) typedef JSString *(*DoubleToStringFn)(ThreadSafeContext *, double); typedef ParallelResult (*DoubleToStringParFn)(ForkJoinSlice *, double, MutableHandleString); static const VMFunctionsModal DoubleToStringInfo = VMFunctionsModal( - FunctionInfo(js_NumberToString), + FunctionInfo(NumberToString), FunctionInfo(DoubleToStringPar)); bool diff --git a/js/src/jit/ParallelFunctions.cpp b/js/src/jit/ParallelFunctions.cpp index 3a9251cc8b0..a443e235976 100644 --- a/js/src/jit/ParallelFunctions.cpp +++ b/js/src/jit/ParallelFunctions.cpp @@ -211,7 +211,7 @@ jit::IntToStringPar(ForkJoinSlice *slice, int i, MutableHandleString out) ParallelResult jit::DoubleToStringPar(ForkJoinSlice *slice, double d, MutableHandleString out) { - JSString *str = js_NumberToString(slice, d); + JSString *str = NumberToString(slice, d); if (!str) return TP_RETRY_SEQUENTIALLY; out.set(str); diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index b0519b89a76..d32a9a0cb80 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -1388,16 +1388,16 @@ js_NumberToStringWithBase(ThreadSafeContext *cx, double d, int base) template JSString * -js_NumberToString(ThreadSafeContext *cx, double d) +js::NumberToString(ThreadSafeContext *cx, double d) { return js_NumberToStringWithBase(cx, d, 10); } template JSString * -js_NumberToString(ThreadSafeContext *cx, double d); +js::NumberToString(ThreadSafeContext *cx, double d); template JSString * -js_NumberToString(ThreadSafeContext *cx, double d); +js::NumberToString(ThreadSafeContext *cx, double d); template JSAtom * diff --git a/js/src/jsnum.h b/js/src/jsnum.h index 15c33920aa0..0c112b97722 100644 --- a/js/src/jsnum.h +++ b/js/src/jsnum.h @@ -44,6 +44,8 @@ extern const char js_parseInt_str[]; class JSAtom; +namespace js { + /* * When base == 10, this function implements ToString() as specified by * ECMA-262-5 section 9.8.1; but note that it handles integers specially for @@ -51,9 +53,7 @@ class JSAtom; */ template extern JSString * -js_NumberToString(js::ThreadSafeContext *cx, double d); - -namespace js { +NumberToString(js::ThreadSafeContext *cx, double d); template extern JSAtom * diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index f43f84cd514..a9b39999b97 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -3862,7 +3862,7 @@ js::ToStringSlow(ExclusiveContext *cx, typename MaybeRooted::Han } else if (v.isInt32()) { str = Int32ToString(cx, v.toInt32()); } else if (v.isDouble()) { - str = js_NumberToString(cx, v.toDouble()); + str = NumberToString(cx, v.toDouble()); } else if (v.isBoolean()) { str = js_BooleanToString(cx, v.toBoolean()); } else if (v.isNull()) {