| 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/js-operator.h" | 5 #include "src/compiler/js-operator.h" |
| 6 #include "src/compiler/opcodes.h" | 6 #include "src/compiler/opcodes.h" |
| 7 #include "src/compiler/operator.h" | 7 #include "src/compiler/operator.h" |
| 8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
| 9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 control_input_count, value_output_count, effect_output_count, \ | 40 control_input_count, value_output_count, effect_output_count, \ |
| 41 control_output_count \ | 41 control_output_count \ |
| 42 } | 42 } |
| 43 SHARED(ToNumber, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2), | 43 SHARED(ToNumber, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2), |
| 44 SHARED(ToString, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2), | 44 SHARED(ToString, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2), |
| 45 SHARED(ToName, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2), | 45 SHARED(ToName, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2), |
| 46 SHARED(ToObject, Operator::kFoldable, 1, 1, 1, 1, 1, 1, 2), | 46 SHARED(ToObject, Operator::kFoldable, 1, 1, 1, 1, 1, 1, 2), |
| 47 SHARED(Create, Operator::kEliminatable, 2, 1, 1, 0, 1, 1, 0), | 47 SHARED(Create, Operator::kEliminatable, 2, 1, 1, 0, 1, 1, 0), |
| 48 SHARED(TypeOf, Operator::kPure, 1, 0, 0, 0, 1, 0, 0), | 48 SHARED(TypeOf, Operator::kPure, 1, 0, 0, 0, 1, 0, 0), |
| 49 SHARED(CreateWithContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2), | 49 SHARED(CreateWithContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2), |
| 50 SHARED(CreateModuleContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2), | |
| 51 #undef SHARED | 50 #undef SHARED |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 | 53 |
| 55 std::ostream& operator<<(std::ostream& os, const SharedOperator& sop) { | 54 std::ostream& operator<<(std::ostream& os, const SharedOperator& sop) { |
| 56 return os << IrOpcode::Mnemonic(sop.opcode); | 55 return os << IrOpcode::Mnemonic(sop.opcode); |
| 57 } | 56 } |
| 58 | 57 |
| 59 } // namespace | 58 } // namespace |
| 60 | 59 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 EXPECT_EQ(sop.properties, op->properties()); | 109 EXPECT_EQ(sop.properties, op->properties()); |
| 111 } | 110 } |
| 112 | 111 |
| 113 | 112 |
| 114 INSTANTIATE_TEST_CASE_P(JSOperatorTest, JSSharedOperatorTest, | 113 INSTANTIATE_TEST_CASE_P(JSOperatorTest, JSSharedOperatorTest, |
| 115 ::testing::ValuesIn(kSharedOperators)); | 114 ::testing::ValuesIn(kSharedOperators)); |
| 116 | 115 |
| 117 } // namespace compiler | 116 } // namespace compiler |
| 118 } // namespace internal | 117 } // namespace internal |
| 119 } // namespace v8 | 118 } // namespace v8 |
| OLD | NEW |