Bug 1564125 - Part 1: Don't call into the runtime for negative zero in LDoubleToString. r=nbp
authorAndré Bargull <andre.bargull@gmail.com>
Tue, 09 Jul 2019 13:11:05 +0000
changeset 482366 b2044941257e5407aa18936f35ca1e1c21cce706
parent 482365 633fc7b52221c3f8229eac8f353750e2bd9d77b2
child 482367 3e2d63c9f835f84809c1bdf7dfbe0013a4a4067b
push id36276
push usercbrindusan@mozilla.com
push dateThu, 11 Jul 2019 16:20:48 +0000
treeherdermozilla-central@8013e87c08ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1564125
milestone70.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 1564125 - Part 1: Don't call into the runtime for negative zero in LDoubleToString. r=nbp The string representation of negative zero is equal to the one for positive zero, so there's no need to call into the runtime for that case. Differential Revision: https://phabricator.services.mozilla.com/D37259
js/src/jit/CodeGenerator.cpp
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -1564,17 +1564,17 @@ void CodeGenerator::visitDoubleToString(
   Register temp = ToRegister(lir->tempInt());
   Register output = ToRegister(lir->output());
 
   using Fn = JSString* (*)(JSContext*, double);
   OutOfLineCode* ool = oolCallVM<Fn, NumberToString<CanGC>>(
       lir, ArgList(input), StoreRegisterTo(output));
 
   // Try double to integer conversion and run integer to string code.
-  masm.convertDoubleToInt32(input, temp, ool->entry(), true);
+  masm.convertDoubleToInt32(input, temp, ool->entry(), false);
   emitIntToString(temp, output, ool->entry());
 
   masm.bind(ool->rejoin());
 }
 
 void CodeGenerator::visitValueToString(LValueToString* lir) {
   ValueOperand input = ToValue(lir, LValueToString::Input);
   Register output = ToRegister(lir->output());