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

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

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « test/cctest/compiler/test-js-constant-cache.cc ('k') | test/cctest/compiler/test-run-jsops.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 "test/cctest/cctest.h" 5 #include "test/cctest/cctest.h"
6 6
7 #include "src/base/utils/random-number-generator.h" 7 #include "src/base/utils/random-number-generator.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/compiler/graph-inl.h" 9 #include "src/compiler/graph-inl.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 ReducerTester R; 788 ReducerTester R;
789 R.binop = R.machine.Float64Mul(); 789 R.binop = R.machine.Float64Mul();
790 790
791 FOR_FLOAT64_INPUTS(pl) { 791 FOR_FLOAT64_INPUTS(pl) {
792 FOR_FLOAT64_INPUTS(pr) { 792 FOR_FLOAT64_INPUTS(pr) {
793 double x = *pl, y = *pr; 793 double x = *pl, y = *pr;
794 R.CheckFoldBinop<double>(x * y, x, y); 794 R.CheckFoldBinop<double>(x * y, x, y);
795 } 795 }
796 } 796 }
797 797
798 double inf = std::numeric_limits<double>::infinity(); 798 double inf = V8_INFINITY;
799 R.CheckPutConstantOnRight(-inf); 799 R.CheckPutConstantOnRight(-inf);
800 R.CheckPutConstantOnRight(-0.1); 800 R.CheckPutConstantOnRight(-0.1);
801 R.CheckPutConstantOnRight(0.1); 801 R.CheckPutConstantOnRight(0.1);
802 R.CheckPutConstantOnRight(inf); 802 R.CheckPutConstantOnRight(inf);
803 803
804 Node* x = R.Parameter(); 804 Node* x = R.Parameter();
805 Node* one = R.Constant<double>(1.0); 805 Node* one = R.Constant<double>(1.0);
806 806
807 R.CheckBinop(x, x, one); // x * 1.0 => x 807 R.CheckBinop(x, x, one); // x * 1.0 => x
808 R.CheckBinop(x, one, x); // 1.0 * x => x 808 R.CheckBinop(x, one, x); // 1.0 * x => x
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 // TODO(titzer): test MachineOperatorReducer for Int64Mul 864 // TODO(titzer): test MachineOperatorReducer for Int64Mul
865 // TODO(titzer): test MachineOperatorReducer for Int64UMul 865 // TODO(titzer): test MachineOperatorReducer for Int64UMul
866 // TODO(titzer): test MachineOperatorReducer for Int64Div 866 // TODO(titzer): test MachineOperatorReducer for Int64Div
867 // TODO(titzer): test MachineOperatorReducer for Uint64Div 867 // TODO(titzer): test MachineOperatorReducer for Uint64Div
868 // TODO(titzer): test MachineOperatorReducer for Int64Mod 868 // TODO(titzer): test MachineOperatorReducer for Int64Mod
869 // TODO(titzer): test MachineOperatorReducer for Uint64Mod 869 // TODO(titzer): test MachineOperatorReducer for Uint64Mod
870 // TODO(titzer): test MachineOperatorReducer for Int64Neg 870 // TODO(titzer): test MachineOperatorReducer for Int64Neg
871 // TODO(titzer): test MachineOperatorReducer for ChangeInt32ToFloat64 871 // TODO(titzer): test MachineOperatorReducer for ChangeInt32ToFloat64
872 // TODO(titzer): test MachineOperatorReducer for ChangeFloat64ToInt32 872 // TODO(titzer): test MachineOperatorReducer for ChangeFloat64ToInt32
873 // TODO(titzer): test MachineOperatorReducer for Float64Compare 873 // TODO(titzer): test MachineOperatorReducer for Float64Compare
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-js-constant-cache.cc ('k') | test/cctest/compiler/test-run-jsops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698