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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 std::ostream& operator<<(std::ostream& os, SelectParameters const& p) { | 91 std::ostream& operator<<(std::ostream& os, SelectParameters const& p) { |
92 return os << p.representation() << "|" << p.hint(); | 92 return os << p.representation() << "|" << p.hint(); |
93 } | 93 } |
94 | 94 |
95 | 95 |
96 SelectParameters const& SelectParametersOf(const Operator* const op) { | 96 SelectParameters const& SelectParametersOf(const Operator* const op) { |
97 DCHECK_EQ(IrOpcode::kSelect, op->opcode()); | 97 DCHECK_EQ(IrOpcode::kSelect, op->opcode()); |
98 return OpParameter<SelectParameters>(op); | 98 return OpParameter<SelectParameters>(op); |
99 } | 99 } |
100 | 100 |
| 101 CallDescriptor const* CallDescriptorOf(const Operator* const op) { |
| 102 DCHECK(op->opcode() == IrOpcode::kCall || |
| 103 op->opcode() == IrOpcode::kTailCall); |
| 104 return OpParameter<CallDescriptor const*>(op); |
| 105 } |
101 | 106 |
102 size_t ProjectionIndexOf(const Operator* const op) { | 107 size_t ProjectionIndexOf(const Operator* const op) { |
103 DCHECK_EQ(IrOpcode::kProjection, op->opcode()); | 108 DCHECK_EQ(IrOpcode::kProjection, op->opcode()); |
104 return OpParameter<size_t>(op); | 109 return OpParameter<size_t>(op); |
105 } | 110 } |
106 | 111 |
107 | 112 |
108 MachineRepresentation PhiRepresentationOf(const Operator* const op) { | 113 MachineRepresentation PhiRepresentationOf(const Operator* const op) { |
109 DCHECK_EQ(IrOpcode::kPhi, op->opcode()); | 114 DCHECK_EQ(IrOpcode::kPhi, op->opcode()); |
110 return OpParameter<MachineRepresentation>(op); | 115 return OpParameter<MachineRepresentation>(op); |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 904 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
900 FrameStateType type, int parameter_count, int local_count, | 905 FrameStateType type, int parameter_count, int local_count, |
901 Handle<SharedFunctionInfo> shared_info) { | 906 Handle<SharedFunctionInfo> shared_info) { |
902 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 907 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
903 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 908 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
904 } | 909 } |
905 | 910 |
906 } // namespace compiler | 911 } // namespace compiler |
907 } // namespace internal | 912 } // namespace internal |
908 } // namespace v8 | 913 } // namespace v8 |
OLD | NEW |