| 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 "v8.h" | 8 #include "v8.h" |
| 9 | 9 |
| 10 #include "allocation.h" | 10 #include "allocation.h" |
| (...skipping 4405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4416 DECLARE_INSTRUCTION_FACTORY_P1(HIsStringAndBranch, HValue*); | 4416 DECLARE_INSTRUCTION_FACTORY_P1(HIsStringAndBranch, HValue*); |
| 4417 DECLARE_INSTRUCTION_FACTORY_P3(HIsStringAndBranch, HValue*, | 4417 DECLARE_INSTRUCTION_FACTORY_P3(HIsStringAndBranch, HValue*, |
| 4418 HBasicBlock*, HBasicBlock*); | 4418 HBasicBlock*, HBasicBlock*); |
| 4419 | 4419 |
| 4420 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 4420 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 4421 return Representation::Tagged(); | 4421 return Representation::Tagged(); |
| 4422 } | 4422 } |
| 4423 | 4423 |
| 4424 virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; | 4424 virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; |
| 4425 | 4425 |
| 4426 static const int kNoKnownSuccessorIndex = -1; |
| 4427 int known_successor_index() const { return known_successor_index_; } |
| 4428 void set_known_successor_index(int known_successor_index) { |
| 4429 known_successor_index_ = known_successor_index; |
| 4430 } |
| 4431 |
| 4426 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch) | 4432 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch) |
| 4427 | 4433 |
| 4428 protected: | 4434 protected: |
| 4429 virtual int RedefinedOperandIndex() { return 0; } | 4435 virtual int RedefinedOperandIndex() { return 0; } |
| 4430 | 4436 |
| 4431 private: | 4437 private: |
| 4432 HIsStringAndBranch(HValue* value, | 4438 HIsStringAndBranch(HValue* value, |
| 4433 HBasicBlock* true_target = NULL, | 4439 HBasicBlock* true_target = NULL, |
| 4434 HBasicBlock* false_target = NULL) | 4440 HBasicBlock* false_target = NULL) |
| 4435 : HUnaryControlInstruction(value, true_target, false_target) {} | 4441 : HUnaryControlInstruction(value, true_target, false_target), |
| 4442 known_successor_index_(kNoKnownSuccessorIndex) { } |
| 4443 |
| 4444 int known_successor_index_; |
| 4436 }; | 4445 }; |
| 4437 | 4446 |
| 4438 | 4447 |
| 4439 class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction { | 4448 class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction { |
| 4440 public: | 4449 public: |
| 4441 DECLARE_INSTRUCTION_FACTORY_P1(HIsSmiAndBranch, HValue*); | 4450 DECLARE_INSTRUCTION_FACTORY_P1(HIsSmiAndBranch, HValue*); |
| 4442 DECLARE_INSTRUCTION_FACTORY_P3(HIsSmiAndBranch, HValue*, | 4451 DECLARE_INSTRUCTION_FACTORY_P3(HIsSmiAndBranch, HValue*, |
| 4443 HBasicBlock*, HBasicBlock*); | 4452 HBasicBlock*, HBasicBlock*); |
| 4444 | 4453 |
| 4445 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch) | 4454 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch) |
| (...skipping 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7714 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7723 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7715 }; | 7724 }; |
| 7716 | 7725 |
| 7717 | 7726 |
| 7718 #undef DECLARE_INSTRUCTION | 7727 #undef DECLARE_INSTRUCTION |
| 7719 #undef DECLARE_CONCRETE_INSTRUCTION | 7728 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7720 | 7729 |
| 7721 } } // namespace v8::internal | 7730 } } // namespace v8::internal |
| 7722 | 7731 |
| 7723 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7732 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |