Commit a9d0d234 authored by bmeurer's avatar bmeurer Committed by Commit bot

Revert of [turbofan] Make Factory::NewNumber() always return the...

Revert of [turbofan] Make Factory::NewNumber() always return the minus_zero_value. (patchset #1 id:1 of https://codereview.chromium.org/838263006/)

Reason for revert:
Breaks the tree

Original issue's description:
> [turbofan] Make Factory::NewNumber() always return the minus_zero_value.
>
> TEST=unittests
> R=mstarzinger@chromium.org, dcarney@chromium.org
>
> Committed: https://crrev.com/55b3e268b2895e2c09230d39669a75b6ab4e7e4d
> Cr-Commit-Position: refs/heads/master@{#26080}

TBR=dcarney@chromium.org,mstarzinger@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/853683009

Cr-Commit-Position: refs/heads/master@{#26081}
parent 55b3e268
......@@ -1018,7 +1018,7 @@ Handle<Object> Factory::NewNumber(double value,
// We need to distinguish the minus zero value and this cannot be
// done after conversion to int. Doing this by comparing bit
// patterns is faster than using fpclassify() et al.
if (IsMinusZero(value)) return minus_zero_value();
if (IsMinusZero(value)) return NewHeapNumber(-0.0, IMMUTABLE, pretenure);
int int_value = FastD2IChecked(value);
if (value == int_value && Smi::IsValid(int_value)) {
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/factory.h"
#include "src/handles-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
typedef TestWithIsolate FactoryTest;
TEST_F(FactoryTest, NewNumberWithMinusZero) {
Handle<Object> minus_zero_value = factory()->minus_zero_value();
EXPECT_TRUE(minus_zero_value.is_identical_to(factory()->NewNumber(-0.0)));
}
} // namespace internal
} // namespace v8
......@@ -67,7 +67,6 @@
'compiler/simplified-operator-unittest.cc',
'compiler/value-numbering-reducer-unittest.cc',
'compiler/zone-pool-unittest.cc',
'factory-unittest.cc',
'libplatform/default-platform-unittest.cc',
'libplatform/task-queue-unittest.cc',
'libplatform/worker-thread-unittest.cc',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment