| OLD | NEW |
| 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/graph-unittest.h" | 5 #include "src/compiler/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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 | 38 |
| 39 GraphTest::~GraphTest() {} | 39 GraphTest::~GraphTest() {} |
| 40 | 40 |
| 41 | 41 |
| 42 Node* GraphTest::Parameter(int32_t index) { | 42 Node* GraphTest::Parameter(int32_t index) { |
| 43 return graph()->NewNode(common()->Parameter(index), graph()->start()); | 43 return graph()->NewNode(common()->Parameter(index), graph()->start()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 | 46 |
| 47 Node* GraphTest::Float64Constant(double value) { | 47 Node* GraphTest::Float32Constant(volatile float value) { |
| 48 return graph()->NewNode(common()->Float32Constant(value)); |
| 49 } |
| 50 |
| 51 |
| 52 Node* GraphTest::Float64Constant(volatile double value) { |
| 48 return graph()->NewNode(common()->Float64Constant(value)); | 53 return graph()->NewNode(common()->Float64Constant(value)); |
| 49 } | 54 } |
| 50 | 55 |
| 51 | 56 |
| 52 Node* GraphTest::Int32Constant(int32_t value) { | 57 Node* GraphTest::Int32Constant(int32_t value) { |
| 53 return graph()->NewNode(common()->Int32Constant(value)); | 58 return graph()->NewNode(common()->Int32Constant(value)); |
| 54 } | 59 } |
| 55 | 60 |
| 56 | 61 |
| 57 Node* GraphTest::Int64Constant(int64_t value) { | 62 Node* GraphTest::Int64Constant(int64_t value) { |
| 58 return graph()->NewNode(common()->Int64Constant(value)); | 63 return graph()->NewNode(common()->Int64Constant(value)); |
| 59 } | 64 } |
| 60 | 65 |
| 61 | 66 |
| 62 Node* GraphTest::NumberConstant(double value) { | 67 Node* GraphTest::NumberConstant(volatile double value) { |
| 63 return graph()->NewNode(common()->NumberConstant(value)); | 68 return graph()->NewNode(common()->NumberConstant(value)); |
| 64 } | 69 } |
| 65 | 70 |
| 66 | 71 |
| 67 Node* GraphTest::HeapConstant(const Unique<HeapObject>& value) { | 72 Node* GraphTest::HeapConstant(const Unique<HeapObject>& value) { |
| 68 return graph()->NewNode(common()->HeapConstant(value)); | 73 return graph()->NewNode(common()->HeapConstant(value)); |
| 69 } | 74 } |
| 70 | 75 |
| 71 | 76 |
| 72 Node* GraphTest::FalseConstant() { | 77 Node* GraphTest::FalseConstant() { |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 new IsConstantMatcher<int32_t>(IrOpcode::kInt32Constant, value_matcher)); | 662 new IsConstantMatcher<int32_t>(IrOpcode::kInt32Constant, value_matcher)); |
| 658 } | 663 } |
| 659 | 664 |
| 660 | 665 |
| 661 Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher) { | 666 Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher) { |
| 662 return MakeMatcher( | 667 return MakeMatcher( |
| 663 new IsConstantMatcher<int64_t>(IrOpcode::kInt64Constant, value_matcher)); | 668 new IsConstantMatcher<int64_t>(IrOpcode::kInt64Constant, value_matcher)); |
| 664 } | 669 } |
| 665 | 670 |
| 666 | 671 |
| 672 Matcher<Node*> IsFloat32Constant(const Matcher<float>& value_matcher) { |
| 673 return MakeMatcher( |
| 674 new IsConstantMatcher<float>(IrOpcode::kFloat32Constant, value_matcher)); |
| 675 } |
| 676 |
| 677 |
| 667 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher) { | 678 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher) { |
| 668 return MakeMatcher( | 679 return MakeMatcher( |
| 669 new IsConstantMatcher<double>(IrOpcode::kFloat64Constant, value_matcher)); | 680 new IsConstantMatcher<double>(IrOpcode::kFloat64Constant, value_matcher)); |
| 670 } | 681 } |
| 671 | 682 |
| 672 | 683 |
| 673 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher) { | 684 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher) { |
| 674 return MakeMatcher( | 685 return MakeMatcher( |
| 675 new IsConstantMatcher<double>(IrOpcode::kNumberConstant, value_matcher)); | 686 new IsConstantMatcher<double>(IrOpcode::kNumberConstant, value_matcher)); |
| 676 } | 687 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 IS_UNOP_MATCHER(ChangeInt32ToInt64) | 767 IS_UNOP_MATCHER(ChangeInt32ToInt64) |
| 757 IS_UNOP_MATCHER(ChangeUint32ToFloat64) | 768 IS_UNOP_MATCHER(ChangeUint32ToFloat64) |
| 758 IS_UNOP_MATCHER(ChangeUint32ToUint64) | 769 IS_UNOP_MATCHER(ChangeUint32ToUint64) |
| 759 IS_UNOP_MATCHER(TruncateFloat64ToInt32) | 770 IS_UNOP_MATCHER(TruncateFloat64ToInt32) |
| 760 IS_UNOP_MATCHER(TruncateInt64ToInt32) | 771 IS_UNOP_MATCHER(TruncateInt64ToInt32) |
| 761 #undef IS_UNOP_MATCHER | 772 #undef IS_UNOP_MATCHER |
| 762 | 773 |
| 763 } // namespace compiler | 774 } // namespace compiler |
| 764 } // namespace internal | 775 } // namespace internal |
| 765 } // namespace v8 | 776 } // namespace v8 |
| OLD | NEW |