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_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 | 1356 |
1357 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT | 1357 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
1358 | 1358 |
1359 DECLARE_CONCRETE_INSTRUCTION(Goto) | 1359 DECLARE_CONCRETE_INSTRUCTION(Goto) |
1360 }; | 1360 }; |
1361 | 1361 |
1362 | 1362 |
1363 class HDeoptimize FINAL : public HTemplateControlInstruction<1, 0> { | 1363 class HDeoptimize FINAL : public HTemplateControlInstruction<1, 0> { |
1364 public: | 1364 public: |
1365 static HDeoptimize* New(Isolate* isolate, Zone* zone, HValue* context, | 1365 static HDeoptimize* New(Isolate* isolate, Zone* zone, HValue* context, |
1366 Deoptimizer::DeoptReason reason, | 1366 const char* reason, Deoptimizer::BailoutType type, |
1367 Deoptimizer::BailoutType type, | |
1368 HBasicBlock* unreachable_continuation) { | 1367 HBasicBlock* unreachable_continuation) { |
1369 return new(zone) HDeoptimize(reason, type, unreachable_continuation); | 1368 return new(zone) HDeoptimize(reason, type, unreachable_continuation); |
1370 } | 1369 } |
1371 | 1370 |
1372 bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE { | 1371 bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE { |
1373 *block = NULL; | 1372 *block = NULL; |
1374 return true; | 1373 return true; |
1375 } | 1374 } |
1376 | 1375 |
1377 Representation RequiredInputRepresentation(int index) OVERRIDE { | 1376 Representation RequiredInputRepresentation(int index) OVERRIDE { |
1378 return Representation::None(); | 1377 return Representation::None(); |
1379 } | 1378 } |
1380 | 1379 |
1381 Deoptimizer::DeoptReason reason() const { return reason_; } | 1380 const char* reason() const { return reason_; } |
1382 Deoptimizer::BailoutType type() { return type_; } | 1381 Deoptimizer::BailoutType type() { return type_; } |
1383 | 1382 |
1384 DECLARE_CONCRETE_INSTRUCTION(Deoptimize) | 1383 DECLARE_CONCRETE_INSTRUCTION(Deoptimize) |
1385 | 1384 |
1386 private: | 1385 private: |
1387 explicit HDeoptimize(Deoptimizer::DeoptReason reason, | 1386 explicit HDeoptimize(const char* reason, |
1388 Deoptimizer::BailoutType type, | 1387 Deoptimizer::BailoutType type, |
1389 HBasicBlock* unreachable_continuation) | 1388 HBasicBlock* unreachable_continuation) |
1390 : reason_(reason), type_(type) { | 1389 : reason_(reason), type_(type) { |
1391 SetSuccessorAt(0, unreachable_continuation); | 1390 SetSuccessorAt(0, unreachable_continuation); |
1392 } | 1391 } |
1393 | 1392 |
1394 Deoptimizer::DeoptReason reason_; | 1393 const char* reason_; |
1395 Deoptimizer::BailoutType type_; | 1394 Deoptimizer::BailoutType type_; |
1396 }; | 1395 }; |
1397 | 1396 |
1398 | 1397 |
1399 class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> { | 1398 class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> { |
1400 public: | 1399 public: |
1401 HUnaryControlInstruction(HValue* value, | 1400 HUnaryControlInstruction(HValue* value, |
1402 HBasicBlock* true_target, | 1401 HBasicBlock* true_target, |
1403 HBasicBlock* false_target) { | 1402 HBasicBlock* false_target) { |
1404 SetOperandAt(0, value); | 1403 SetOperandAt(0, value); |
(...skipping 6595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8000 }; | 7999 }; |
8001 | 8000 |
8002 | 8001 |
8003 | 8002 |
8004 #undef DECLARE_INSTRUCTION | 8003 #undef DECLARE_INSTRUCTION |
8005 #undef DECLARE_CONCRETE_INSTRUCTION | 8004 #undef DECLARE_CONCRETE_INSTRUCTION |
8006 | 8005 |
8007 } } // namespace v8::internal | 8006 } } // namespace v8::internal |
8008 | 8007 |
8009 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 8008 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |