Bug 676739 - Part 3: Rename js_NumberToString to js::NumberToString. r=luke
authorYaron Tausky <yaron.tausky@gmail.com>
Fri, 06 Sep 2013 13:05:01 +0200
changeset 146178 be8536d49a60e1449437b024837f10eb5b7f0742
parent 146177 3f272348bb63bcf92f615ec80d026968c16db50f
child 146179 f8a559f4f741b933e1d85ce96be15283e9b574f8
push id25244
push userryanvm@gmail.com
push dateMon, 09 Sep 2013 20:03:14 +0000
treeherdermozilla-central@f320b8c034bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs676739
milestone26.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 676739 - Part 3: Rename js_NumberToString to js::NumberToString. r=luke
js/src/jit/CodeGenerator.cpp
js/src/jit/ParallelFunctions.cpp
js/src/jsnum.cpp
js/src/jsnum.h
js/src/jsstr.cpp
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -618,17 +618,17 @@ CodeGenerator::visitIntToString(LIntToSt
 
     masm.bind(ool->rejoin());
     return true;
 }
 
 typedef JSString *(*DoubleToStringFn)(ThreadSafeContext *, double);
 typedef ParallelResult (*DoubleToStringParFn)(ForkJoinSlice *, double, MutableHandleString);
 static const VMFunctionsModal DoubleToStringInfo = VMFunctionsModal(
-    FunctionInfo<DoubleToStringFn>(js_NumberToString<CanGC>),
+    FunctionInfo<DoubleToStringFn>(NumberToString<CanGC>),
     FunctionInfo<DoubleToStringParFn>(DoubleToStringPar));
 
 bool
 CodeGenerator::visitDoubleToString(LDoubleToString *lir)
 {
     FloatRegister input = ToFloatRegister(lir->input());
     Register temp = ToRegister(lir->tempInt());
     Register output = ToRegister(lir->output());
--- a/js/src/jit/ParallelFunctions.cpp
+++ b/js/src/jit/ParallelFunctions.cpp
@@ -206,17 +206,17 @@ jit::IntToStringPar(ForkJoinSlice *slice
         return TP_RETRY_SEQUENTIALLY;
     out.set(str);
     return TP_SUCCESS;
 }
 
 ParallelResult
 jit::DoubleToStringPar(ForkJoinSlice *slice, double d, MutableHandleString out)
 {
-    JSString *str = js_NumberToString<NoGC>(slice, d);
+    JSString *str = NumberToString<NoGC>(slice, d);
     if (!str)
         return TP_RETRY_SEQUENTIALLY;
     out.set(str);
     return TP_SUCCESS;
 }
 
 ParallelResult
 jit::StringToNumberPar(ForkJoinSlice *slice, JSString *str, double *out)
--- a/js/src/jsnum.cpp
+++ b/js/src/jsnum.cpp
@@ -1383,26 +1383,26 @@ js_NumberToStringWithBase(ThreadSafeCont
     if (comp)
         comp->dtoaCache.cache(base, d, s);
 
     return s;
 }
 
 template <AllowGC allowGC>
 JSString *
-js_NumberToString(ThreadSafeContext *cx, double d)
+js::NumberToString(ThreadSafeContext *cx, double d)
 {
     return js_NumberToStringWithBase<allowGC>(cx, d, 10);
 }
 
 template JSString *
-js_NumberToString<CanGC>(ThreadSafeContext *cx, double d);
+js::NumberToString<CanGC>(ThreadSafeContext *cx, double d);
 
 template JSString *
-js_NumberToString<NoGC>(ThreadSafeContext *cx, double d);
+js::NumberToString<NoGC>(ThreadSafeContext *cx, double d);
 
 template <AllowGC allowGC>
 JSAtom *
 js::NumberToAtom(ExclusiveContext *cx, double d)
 {
     int32_t si;
     if (mozilla::DoubleIsInt32(d, &si))
         return Int32ToAtom<allowGC>(cx, si);
--- a/js/src/jsnum.h
+++ b/js/src/jsnum.h
@@ -39,26 +39,26 @@ js_InitNumberClass(JSContext *cx, js::Ha
  */
 extern const char js_isNaN_str[];
 extern const char js_isFinite_str[];
 extern const char js_parseFloat_str[];
 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
  * performance.  See also js::NumberToCString().
  */
 template <js::AllowGC allowGC>
 extern JSString *
-js_NumberToString(js::ThreadSafeContext *cx, double d);
-
-namespace js {
+NumberToString(js::ThreadSafeContext *cx, double d);
 
 template <js::AllowGC allowGC>
 extern JSAtom *
 NumberToAtom(js::ExclusiveContext *cx, double d);
 
 template <AllowGC allowGC>
 extern JSFlatString *
 Int32ToString(ThreadSafeContext *cx, int32_t i);
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -3857,17 +3857,17 @@ js::ToStringSlow(ExclusiveContext *cx, t
     }
 
     JSString *str;
     if (v.isString()) {
         str = v.toString();
     } else if (v.isInt32()) {
         str = Int32ToString<allowGC>(cx, v.toInt32());
     } else if (v.isDouble()) {
-        str = js_NumberToString<allowGC>(cx, v.toDouble());
+        str = NumberToString<allowGC>(cx, v.toDouble());
     } else if (v.isBoolean()) {
         str = js_BooleanToString(cx, v.toBoolean());
     } else if (v.isNull()) {
         str = cx->names().null;
     } else {
         str = cx->names().undefined;
     }
     return str;