| 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 6550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6561 | 6561 |
| 6562 bool IsDeletable() const OVERRIDE { return true; } | 6562 bool IsDeletable() const OVERRIDE { return true; } |
| 6563 | 6563 |
| 6564 HObjectAccess access_; | 6564 HObjectAccess access_; |
| 6565 const UniqueSet<Map>* maps_; | 6565 const UniqueSet<Map>* maps_; |
| 6566 }; | 6566 }; |
| 6567 | 6567 |
| 6568 | 6568 |
| 6569 class HLoadNamedGeneric FINAL : public HTemplateInstruction<2> { | 6569 class HLoadNamedGeneric FINAL : public HTemplateInstruction<2> { |
| 6570 public: | 6570 public: |
| 6571 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadNamedGeneric, HValue*, | 6571 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadNamedGeneric, HValue*, |
| 6572 Handle<Object>); | 6572 Handle<Object>, InlineCacheState); |
| 6573 | 6573 |
| 6574 HValue* context() const { return OperandAt(0); } | 6574 HValue* context() const { return OperandAt(0); } |
| 6575 HValue* object() const { return OperandAt(1); } | 6575 HValue* object() const { return OperandAt(1); } |
| 6576 Handle<Object> name() const { return name_; } | 6576 Handle<Object> name() const { return name_; } |
| 6577 | 6577 |
| 6578 InlineCacheState initialization_state() const { |
| 6579 return initialization_state_; |
| 6580 } |
| 6578 FeedbackVectorICSlot slot() const { return slot_; } | 6581 FeedbackVectorICSlot slot() const { return slot_; } |
| 6579 Handle<TypeFeedbackVector> feedback_vector() const { | 6582 Handle<TypeFeedbackVector> feedback_vector() const { |
| 6580 return feedback_vector_; | 6583 return feedback_vector_; |
| 6581 } | 6584 } |
| 6582 bool HasVectorAndSlot() const { return FLAG_vector_ics; } | 6585 bool HasVectorAndSlot() const { return FLAG_vector_ics; } |
| 6583 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 6586 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
| 6584 FeedbackVectorICSlot slot) { | 6587 FeedbackVectorICSlot slot) { |
| 6585 DCHECK(FLAG_vector_ics); | 6588 DCHECK(FLAG_vector_ics); |
| 6586 feedback_vector_ = vector; | 6589 feedback_vector_ = vector; |
| 6587 slot_ = slot; | 6590 slot_ = slot; |
| 6588 } | 6591 } |
| 6589 | 6592 |
| 6590 Representation RequiredInputRepresentation(int index) OVERRIDE { | 6593 Representation RequiredInputRepresentation(int index) OVERRIDE { |
| 6591 return Representation::Tagged(); | 6594 return Representation::Tagged(); |
| 6592 } | 6595 } |
| 6593 | 6596 |
| 6594 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT | 6597 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
| 6595 | 6598 |
| 6596 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) | 6599 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) |
| 6597 | 6600 |
| 6598 private: | 6601 private: |
| 6599 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name) | 6602 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name, |
| 6600 : name_(name), slot_(FeedbackVectorICSlot::Invalid()) { | 6603 InlineCacheState initialization_state) |
| 6604 : name_(name), |
| 6605 slot_(FeedbackVectorICSlot::Invalid()), |
| 6606 initialization_state_(initialization_state) { |
| 6601 SetOperandAt(0, context); | 6607 SetOperandAt(0, context); |
| 6602 SetOperandAt(1, object); | 6608 SetOperandAt(1, object); |
| 6603 set_representation(Representation::Tagged()); | 6609 set_representation(Representation::Tagged()); |
| 6604 SetAllSideEffects(); | 6610 SetAllSideEffects(); |
| 6605 } | 6611 } |
| 6606 | 6612 |
| 6607 Handle<Object> name_; | 6613 Handle<Object> name_; |
| 6608 Handle<TypeFeedbackVector> feedback_vector_; | 6614 Handle<TypeFeedbackVector> feedback_vector_; |
| 6609 FeedbackVectorICSlot slot_; | 6615 FeedbackVectorICSlot slot_; |
| 6616 InlineCacheState initialization_state_; |
| 6610 }; | 6617 }; |
| 6611 | 6618 |
| 6612 | 6619 |
| 6613 class HLoadFunctionPrototype FINAL : public HUnaryOperation { | 6620 class HLoadFunctionPrototype FINAL : public HUnaryOperation { |
| 6614 public: | 6621 public: |
| 6615 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); | 6622 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); |
| 6616 | 6623 |
| 6617 HValue* function() { return OperandAt(0); } | 6624 HValue* function() { return OperandAt(0); } |
| 6618 | 6625 |
| 6619 Representation RequiredInputRepresentation(int index) OVERRIDE { | 6626 Representation RequiredInputRepresentation(int index) OVERRIDE { |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7053 class ReceiverIsCellField : public BitField<bool, 2, 1> {}; | 7060 class ReceiverIsCellField : public BitField<bool, 2, 1> {}; |
| 7054 | 7061 |
| 7055 HObjectAccess access_; | 7062 HObjectAccess access_; |
| 7056 HValue* dominator_; | 7063 HValue* dominator_; |
| 7057 uint32_t bit_field_; | 7064 uint32_t bit_field_; |
| 7058 }; | 7065 }; |
| 7059 | 7066 |
| 7060 | 7067 |
| 7061 class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> { | 7068 class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> { |
| 7062 public: | 7069 public: |
| 7063 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreNamedGeneric, HValue*, | 7070 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HStoreNamedGeneric, HValue*, |
| 7064 Handle<String>, HValue*, | 7071 Handle<String>, HValue*, |
| 7065 LanguageMode); | 7072 LanguageMode, InlineCacheState); |
| 7066 HValue* object() const { return OperandAt(0); } | 7073 HValue* object() const { return OperandAt(0); } |
| 7067 HValue* value() const { return OperandAt(1); } | 7074 HValue* value() const { return OperandAt(1); } |
| 7068 HValue* context() const { return OperandAt(2); } | 7075 HValue* context() const { return OperandAt(2); } |
| 7069 Handle<String> name() const { return name_; } | 7076 Handle<String> name() const { return name_; } |
| 7070 LanguageMode language_mode() const { return language_mode_; } | 7077 LanguageMode language_mode() const { return language_mode_; } |
| 7078 InlineCacheState initialization_state() const { |
| 7079 return initialization_state_; |
| 7080 } |
| 7071 | 7081 |
| 7072 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT | 7082 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
| 7073 | 7083 |
| 7074 Representation RequiredInputRepresentation(int index) OVERRIDE { | 7084 Representation RequiredInputRepresentation(int index) OVERRIDE { |
| 7075 return Representation::Tagged(); | 7085 return Representation::Tagged(); |
| 7076 } | 7086 } |
| 7077 | 7087 |
| 7078 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) | 7088 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) |
| 7079 | 7089 |
| 7080 private: | 7090 private: |
| 7081 HStoreNamedGeneric(HValue* context, HValue* object, Handle<String> name, | 7091 HStoreNamedGeneric(HValue* context, HValue* object, Handle<String> name, |
| 7082 HValue* value, LanguageMode language_mode) | 7092 HValue* value, LanguageMode language_mode, |
| 7083 : name_(name), language_mode_(language_mode) { | 7093 InlineCacheState initialization_state) |
| 7094 : name_(name), |
| 7095 language_mode_(language_mode), |
| 7096 initialization_state_(initialization_state) { |
| 7084 SetOperandAt(0, object); | 7097 SetOperandAt(0, object); |
| 7085 SetOperandAt(1, value); | 7098 SetOperandAt(1, value); |
| 7086 SetOperandAt(2, context); | 7099 SetOperandAt(2, context); |
| 7087 SetAllSideEffects(); | 7100 SetAllSideEffects(); |
| 7088 } | 7101 } |
| 7089 | 7102 |
| 7090 Handle<String> name_; | 7103 Handle<String> name_; |
| 7091 LanguageMode language_mode_; | 7104 LanguageMode language_mode_; |
| 7105 InlineCacheState initialization_state_; |
| 7092 }; | 7106 }; |
| 7093 | 7107 |
| 7094 | 7108 |
| 7095 class HStoreKeyed FINAL | 7109 class HStoreKeyed FINAL |
| 7096 : public HTemplateInstruction<3>, public ArrayInstructionInterface { | 7110 : public HTemplateInstruction<3>, public ArrayInstructionInterface { |
| 7097 public: | 7111 public: |
| 7098 DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue*, HValue*, HValue*, | 7112 DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue*, HValue*, HValue*, |
| 7099 ElementsKind); | 7113 ElementsKind); |
| 7100 DECLARE_INSTRUCTION_FACTORY_P5(HStoreKeyed, HValue*, HValue*, HValue*, | 7114 DECLARE_INSTRUCTION_FACTORY_P5(HStoreKeyed, HValue*, HValue*, HValue*, |
| 7101 ElementsKind, StoreFieldOrKeyedMode); | 7115 ElementsKind, StoreFieldOrKeyedMode); |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7996 }; | 8010 }; |
| 7997 | 8011 |
| 7998 | 8012 |
| 7999 | 8013 |
| 8000 #undef DECLARE_INSTRUCTION | 8014 #undef DECLARE_INSTRUCTION |
| 8001 #undef DECLARE_CONCRETE_INSTRUCTION | 8015 #undef DECLARE_CONCRETE_INSTRUCTION |
| 8002 | 8016 |
| 8003 } } // namespace v8::internal | 8017 } } // namespace v8::internal |
| 8004 | 8018 |
| 8005 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 8019 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |