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

Side by Side Diff: test/compiler-unittests/graph-unittest.cc

Issue 470633006: [turbofan] Add support for change/truncate to MachineOperatorReducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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/compiler-unittests/graph-unittest.h" 5 #include "test/compiler-unittests/graph-unittest.h"
6 6
7 #include <ostream> // NOLINT(readability/streams) 7 #include <ostream> // NOLINT(readability/streams)
8 8
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 Node* GraphTest::Float64Constant(double value) { 48 Node* GraphTest::Float64Constant(double value) {
49 return graph()->NewNode(common()->Float64Constant(value)); 49 return graph()->NewNode(common()->Float64Constant(value));
50 } 50 }
51 51
52 52
53 Node* GraphTest::Int32Constant(int32_t value) { 53 Node* GraphTest::Int32Constant(int32_t value) {
54 return graph()->NewNode(common()->Int32Constant(value)); 54 return graph()->NewNode(common()->Int32Constant(value));
55 } 55 }
56 56
57 57
58 Node* GraphTest::Int64Constant(int64_t value) {
59 return graph()->NewNode(common()->Int64Constant(value));
60 }
61
62
58 Node* GraphTest::NumberConstant(double value) { 63 Node* GraphTest::NumberConstant(double value) {
59 return graph()->NewNode(common()->NumberConstant(value)); 64 return graph()->NewNode(common()->NumberConstant(value));
60 } 65 }
61 66
62 67
63 Node* GraphTest::HeapConstant(const PrintableUnique<HeapObject>& value) { 68 Node* GraphTest::HeapConstant(const PrintableUnique<HeapObject>& value) {
64 return graph()->NewNode(common()->HeapConstant(value)); 69 return graph()->NewNode(common()->HeapConstant(value));
65 } 70 }
66 71
67 72
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 IrOpcode::kHeapConstant, value_matcher)); 645 IrOpcode::kHeapConstant, value_matcher));
641 } 646 }
642 647
643 648
644 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher) { 649 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher) {
645 return MakeMatcher( 650 return MakeMatcher(
646 new IsConstantMatcher<int32_t>(IrOpcode::kInt32Constant, value_matcher)); 651 new IsConstantMatcher<int32_t>(IrOpcode::kInt32Constant, value_matcher));
647 } 652 }
648 653
649 654
655 Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher) {
656 return MakeMatcher(
657 new IsConstantMatcher<int64_t>(IrOpcode::kInt64Constant, value_matcher));
658 }
659
660
650 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher) { 661 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher) {
651 return MakeMatcher( 662 return MakeMatcher(
652 new IsConstantMatcher<double>(IrOpcode::kFloat64Constant, value_matcher)); 663 new IsConstantMatcher<double>(IrOpcode::kFloat64Constant, value_matcher));
653 } 664 }
654 665
655 666
656 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher) { 667 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher) {
657 return MakeMatcher( 668 return MakeMatcher(
658 new IsConstantMatcher<double>(IrOpcode::kNumberConstant, value_matcher)); 669 new IsConstantMatcher<double>(IrOpcode::kNumberConstant, value_matcher));
659 } 670 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 IS_UNOP_MATCHER(ChangeInt32ToInt64) 748 IS_UNOP_MATCHER(ChangeInt32ToInt64)
738 IS_UNOP_MATCHER(ChangeUint32ToFloat64) 749 IS_UNOP_MATCHER(ChangeUint32ToFloat64)
739 IS_UNOP_MATCHER(ChangeUint32ToUint64) 750 IS_UNOP_MATCHER(ChangeUint32ToUint64)
740 IS_UNOP_MATCHER(TruncateFloat64ToInt32) 751 IS_UNOP_MATCHER(TruncateFloat64ToInt32)
741 IS_UNOP_MATCHER(TruncateInt64ToInt32) 752 IS_UNOP_MATCHER(TruncateInt64ToInt32)
742 #undef IS_UNOP_MATCHER 753 #undef IS_UNOP_MATCHER
743 754
744 } // namespace compiler 755 } // namespace compiler
745 } // namespace internal 756 } // namespace internal
746 } // namespace v8 757 } // namespace v8
OLDNEW
« no previous file with comments | « test/compiler-unittests/graph-unittest.h ('k') | test/compiler-unittests/machine-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698