| 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 #ifndef V8_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 StateId AddFrameStateDescriptor(FrameStateDescriptor* descriptor); | 1149 StateId AddFrameStateDescriptor(FrameStateDescriptor* descriptor); |
| 1150 FrameStateDescriptor* GetFrameStateDescriptor(StateId deoptimization_id); | 1150 FrameStateDescriptor* GetFrameStateDescriptor(StateId deoptimization_id); |
| 1151 int GetFrameStateDescriptorCount(); | 1151 int GetFrameStateDescriptorCount(); |
| 1152 | 1152 |
| 1153 RpoNumber InputRpo(Instruction* instr, size_t index); | 1153 RpoNumber InputRpo(Instruction* instr, size_t index); |
| 1154 | 1154 |
| 1155 bool GetSourcePosition(const Instruction* instr, | 1155 bool GetSourcePosition(const Instruction* instr, |
| 1156 SourcePosition* result) const; | 1156 SourcePosition* result) const; |
| 1157 void SetSourcePosition(const Instruction* instr, SourcePosition value); | 1157 void SetSourcePosition(const Instruction* instr, SourcePosition value); |
| 1158 | 1158 |
| 1159 bool ContainsCall() const { |
| 1160 for (Instruction* instr : instructions_) { |
| 1161 if (instr->IsCall()) return true; |
| 1162 } |
| 1163 return false; |
| 1164 } |
| 1165 |
| 1159 private: | 1166 private: |
| 1160 friend std::ostream& operator<<(std::ostream& os, | 1167 friend std::ostream& operator<<(std::ostream& os, |
| 1161 const PrintableInstructionSequence& code); | 1168 const PrintableInstructionSequence& code); |
| 1162 | 1169 |
| 1163 typedef std::set<int, std::less<int>, ZoneIntAllocator> VirtualRegisterSet; | 1170 typedef std::set<int, std::less<int>, ZoneIntAllocator> VirtualRegisterSet; |
| 1164 typedef ZoneMap<const Instruction*, SourcePosition> SourcePositionMap; | 1171 typedef ZoneMap<const Instruction*, SourcePosition> SourcePositionMap; |
| 1165 | 1172 |
| 1166 Isolate* isolate_; | 1173 Isolate* isolate_; |
| 1167 Zone* const zone_; | 1174 Zone* const zone_; |
| 1168 InstructionBlocks* const instruction_blocks_; | 1175 InstructionBlocks* const instruction_blocks_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1187 | 1194 |
| 1188 | 1195 |
| 1189 std::ostream& operator<<(std::ostream& os, | 1196 std::ostream& operator<<(std::ostream& os, |
| 1190 const PrintableInstructionSequence& code); | 1197 const PrintableInstructionSequence& code); |
| 1191 | 1198 |
| 1192 } // namespace compiler | 1199 } // namespace compiler |
| 1193 } // namespace internal | 1200 } // namespace internal |
| 1194 } // namespace v8 | 1201 } // namespace v8 |
| 1195 | 1202 |
| 1196 #endif // V8_COMPILER_INSTRUCTION_H_ | 1203 #endif // V8_COMPILER_INSTRUCTION_H_ |
| OLD | NEW |