OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 | 1294 |
1295 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 1295 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
1296 | 1296 |
1297 DECLARE_CONCRETE_INSTRUCTION(Goto) | 1297 DECLARE_CONCRETE_INSTRUCTION(Goto) |
1298 }; | 1298 }; |
1299 | 1299 |
1300 | 1300 |
1301 class HDeoptimize final : public HTemplateControlInstruction<1, 0> { | 1301 class HDeoptimize final : public HTemplateControlInstruction<1, 0> { |
1302 public: | 1302 public: |
1303 static HDeoptimize* New(Isolate* isolate, Zone* zone, HValue* context, | 1303 static HDeoptimize* New(Isolate* isolate, Zone* zone, HValue* context, |
1304 Deoptimizer::DeoptReason reason, | 1304 DeoptimizeReason reason, |
1305 Deoptimizer::BailoutType type, | 1305 Deoptimizer::BailoutType type, |
1306 HBasicBlock* unreachable_continuation) { | 1306 HBasicBlock* unreachable_continuation) { |
1307 return new(zone) HDeoptimize(reason, type, unreachable_continuation); | 1307 return new(zone) HDeoptimize(reason, type, unreachable_continuation); |
1308 } | 1308 } |
1309 | 1309 |
1310 bool KnownSuccessorBlock(HBasicBlock** block) override { | 1310 bool KnownSuccessorBlock(HBasicBlock** block) override { |
1311 *block = NULL; | 1311 *block = NULL; |
1312 return true; | 1312 return true; |
1313 } | 1313 } |
1314 | 1314 |
1315 Representation RequiredInputRepresentation(int index) override { | 1315 Representation RequiredInputRepresentation(int index) override { |
1316 return Representation::None(); | 1316 return Representation::None(); |
1317 } | 1317 } |
1318 | 1318 |
1319 Deoptimizer::DeoptReason reason() const { return reason_; } | 1319 DeoptimizeReason reason() const { return reason_; } |
1320 Deoptimizer::BailoutType type() { return type_; } | 1320 Deoptimizer::BailoutType type() { return type_; } |
1321 | 1321 |
1322 DECLARE_CONCRETE_INSTRUCTION(Deoptimize) | 1322 DECLARE_CONCRETE_INSTRUCTION(Deoptimize) |
1323 | 1323 |
1324 private: | 1324 private: |
1325 explicit HDeoptimize(Deoptimizer::DeoptReason reason, | 1325 explicit HDeoptimize(DeoptimizeReason reason, Deoptimizer::BailoutType type, |
1326 Deoptimizer::BailoutType type, | |
1327 HBasicBlock* unreachable_continuation) | 1326 HBasicBlock* unreachable_continuation) |
1328 : reason_(reason), type_(type) { | 1327 : reason_(reason), type_(type) { |
1329 SetSuccessorAt(0, unreachable_continuation); | 1328 SetSuccessorAt(0, unreachable_continuation); |
1330 } | 1329 } |
1331 | 1330 |
1332 Deoptimizer::DeoptReason reason_; | 1331 DeoptimizeReason reason_; |
1333 Deoptimizer::BailoutType type_; | 1332 Deoptimizer::BailoutType type_; |
1334 }; | 1333 }; |
1335 | 1334 |
1336 | 1335 |
1337 class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> { | 1336 class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> { |
1338 public: | 1337 public: |
1339 HUnaryControlInstruction(HValue* value, | 1338 HUnaryControlInstruction(HValue* value, |
1340 HBasicBlock* true_target, | 1339 HBasicBlock* true_target, |
1341 HBasicBlock* false_target) { | 1340 HBasicBlock* false_target) { |
1342 SetOperandAt(0, value); | 1341 SetOperandAt(0, value); |
(...skipping 5784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7127 bool IsDeletable() const override { return true; } | 7126 bool IsDeletable() const override { return true; } |
7128 }; | 7127 }; |
7129 | 7128 |
7130 #undef DECLARE_INSTRUCTION | 7129 #undef DECLARE_INSTRUCTION |
7131 #undef DECLARE_CONCRETE_INSTRUCTION | 7130 #undef DECLARE_CONCRETE_INSTRUCTION |
7132 | 7131 |
7133 } // namespace internal | 7132 } // namespace internal |
7134 } // namespace v8 | 7133 } // namespace v8 |
7135 | 7134 |
7136 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7135 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |