Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: src/compiler/machine-operator-reducer.cc

Issue 864803002: Remove deprecated v8::base::OS::nan_value(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix invalid test expectation. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/machine-operator-reducer.h" 5 #include "src/compiler/machine-operator-reducer.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler/diamond.h" 10 #include "src/compiler/diamond.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 return Replace(m.left().node()); 383 return Replace(m.left().node());
384 } 384 }
385 if (m.IsFoldable()) { // K / K => K 385 if (m.IsFoldable()) { // K / K => K
386 return ReplaceFloat64(m.left().Value() / m.right().Value()); 386 return ReplaceFloat64(m.left().Value() / m.right().Value());
387 } 387 }
388 break; 388 break;
389 } 389 }
390 case IrOpcode::kFloat64Mod: { 390 case IrOpcode::kFloat64Mod: {
391 Float64BinopMatcher m(node); 391 Float64BinopMatcher m(node);
392 if (m.right().Is(0)) { // x % 0 => NaN 392 if (m.right().Is(0)) { // x % 0 => NaN
393 return ReplaceFloat64(base::OS::nan_value()); 393 return ReplaceFloat64(std::numeric_limits<double>::quiet_NaN());
394 } 394 }
395 if (m.right().IsNaN()) { // x % NaN => NaN 395 if (m.right().IsNaN()) { // x % NaN => NaN
396 return Replace(m.right().node()); 396 return Replace(m.right().node());
397 } 397 }
398 if (m.left().IsNaN()) { // NaN % x => NaN 398 if (m.left().IsNaN()) { // NaN % x => NaN
399 return Replace(m.left().node()); 399 return Replace(m.left().node());
400 } 400 }
401 if (m.IsFoldable()) { // K % K => K 401 if (m.IsFoldable()) { // K % K => K
402 return ReplaceFloat64(modulo(m.left().Value(), m.right().Value())); 402 return ReplaceFloat64(modulo(m.left().Value(), m.right().Value()));
403 } 403 }
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 MachineOperatorBuilder* MachineOperatorReducer::machine() const { 942 MachineOperatorBuilder* MachineOperatorReducer::machine() const {
943 return jsgraph()->machine(); 943 return jsgraph()->machine();
944 } 944 }
945 945
946 946
947 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } 947 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); }
948 948
949 } // namespace compiler 949 } // namespace compiler
950 } // namespace internal 950 } // namespace internal
951 } // namespace v8 951 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698