| 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 5402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5413 HPhi* incoming_value_; | 5413 HPhi* incoming_value_; |
| 5414 }; | 5414 }; |
| 5415 | 5415 |
| 5416 | 5416 |
| 5417 class HLoadGlobalCell FINAL : public HTemplateInstruction<0> { | 5417 class HLoadGlobalCell FINAL : public HTemplateInstruction<0> { |
| 5418 public: | 5418 public: |
| 5419 DECLARE_INSTRUCTION_FACTORY_P2(HLoadGlobalCell, Handle<Cell>, | 5419 DECLARE_INSTRUCTION_FACTORY_P2(HLoadGlobalCell, Handle<Cell>, |
| 5420 PropertyDetails); | 5420 PropertyDetails); |
| 5421 | 5421 |
| 5422 Unique<Cell> cell() const { return cell_; } | 5422 Unique<Cell> cell() const { return cell_; } |
| 5423 bool RequiresHoleCheck() const; | 5423 // TODO(dcarney): remove this. |
| 5424 bool RequiresHoleCheck() const { return false; } |
| 5424 | 5425 |
| 5425 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT | 5426 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
| 5426 | 5427 |
| 5427 intptr_t Hashcode() OVERRIDE { return cell_.Hashcode(); } | 5428 intptr_t Hashcode() OVERRIDE { return cell_.Hashcode(); } |
| 5428 | 5429 |
| 5429 void FinalizeUniqueness() OVERRIDE { cell_ = Unique<Cell>(cell_.handle()); } | 5430 void FinalizeUniqueness() OVERRIDE { cell_ = Unique<Cell>(cell_.handle()); } |
| 5430 | 5431 |
| 5431 Representation RequiredInputRepresentation(int index) OVERRIDE { | 5432 Representation RequiredInputRepresentation(int index) OVERRIDE { |
| 5432 return Representation::None(); | 5433 return Representation::None(); |
| 5433 } | 5434 } |
| 5434 | 5435 |
| 5435 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) | 5436 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) |
| 5436 | 5437 |
| 5437 protected: | 5438 protected: |
| 5438 bool DataEquals(HValue* other) OVERRIDE { | 5439 bool DataEquals(HValue* other) OVERRIDE { |
| 5439 return cell_ == HLoadGlobalCell::cast(other)->cell_; | 5440 return cell_ == HLoadGlobalCell::cast(other)->cell_; |
| 5440 } | 5441 } |
| 5441 | 5442 |
| 5442 private: | 5443 private: |
| 5443 HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details) | 5444 HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details) |
| 5444 : cell_(Unique<Cell>::CreateUninitialized(cell)), details_(details) { | 5445 : cell_(Unique<Cell>::CreateUninitialized(cell)), details_(details) { |
| 5445 set_representation(Representation::Tagged()); | 5446 set_representation(Representation::Tagged()); |
| 5446 SetFlag(kUseGVN); | 5447 SetFlag(kUseGVN); |
| 5447 SetDependsOnFlag(kGlobalVars); | 5448 SetDependsOnFlag(kGlobalVars); |
| 5448 } | 5449 } |
| 5449 | 5450 |
| 5450 bool IsDeletable() const OVERRIDE { return !RequiresHoleCheck(); } | 5451 bool IsDeletable() const OVERRIDE { return true; } |
| 5451 | 5452 |
| 5452 Unique<Cell> cell_; | 5453 Unique<Cell> cell_; |
| 5453 PropertyDetails details_; | 5454 PropertyDetails details_; |
| 5454 }; | 5455 }; |
| 5455 | 5456 |
| 5456 | 5457 |
| 5457 class HLoadGlobalGeneric FINAL : public HTemplateInstruction<2> { | 5458 class HLoadGlobalGeneric FINAL : public HTemplateInstruction<2> { |
| 5458 public: | 5459 public: |
| 5459 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*, | 5460 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*, |
| 5460 Handle<String>, bool); | 5461 Handle<String>, bool); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5804 return kPointersToHereMaybeInteresting; | 5805 return kPointersToHereMaybeInteresting; |
| 5805 } | 5806 } |
| 5806 | 5807 |
| 5807 | 5808 |
| 5808 class HStoreGlobalCell FINAL : public HUnaryOperation { | 5809 class HStoreGlobalCell FINAL : public HUnaryOperation { |
| 5809 public: | 5810 public: |
| 5810 DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*, | 5811 DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*, |
| 5811 Handle<PropertyCell>, PropertyDetails); | 5812 Handle<PropertyCell>, PropertyDetails); |
| 5812 | 5813 |
| 5813 Unique<PropertyCell> cell() const { return cell_; } | 5814 Unique<PropertyCell> cell() const { return cell_; } |
| 5814 bool RequiresHoleCheck() { return details_.IsConfigurable(); } | 5815 // TODO(dcarney): remove |
| 5816 bool RequiresHoleCheck() const { return false; } |
| 5815 bool NeedsWriteBarrier() { | 5817 bool NeedsWriteBarrier() { |
| 5816 return StoringValueNeedsWriteBarrier(value()); | 5818 return StoringValueNeedsWriteBarrier(value()); |
| 5817 } | 5819 } |
| 5818 | 5820 |
| 5819 void FinalizeUniqueness() OVERRIDE { | 5821 void FinalizeUniqueness() OVERRIDE { |
| 5820 cell_ = Unique<PropertyCell>(cell_.handle()); | 5822 cell_ = Unique<PropertyCell>(cell_.handle()); |
| 5821 } | 5823 } |
| 5822 | 5824 |
| 5823 Representation RequiredInputRepresentation(int index) OVERRIDE { | 5825 Representation RequiredInputRepresentation(int index) OVERRIDE { |
| 5824 return Representation::Tagged(); | 5826 return Representation::Tagged(); |
| (...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7977 }; | 7979 }; |
| 7978 | 7980 |
| 7979 | 7981 |
| 7980 | 7982 |
| 7981 #undef DECLARE_INSTRUCTION | 7983 #undef DECLARE_INSTRUCTION |
| 7982 #undef DECLARE_CONCRETE_INSTRUCTION | 7984 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7983 | 7985 |
| 7984 } } // namespace v8::internal | 7986 } } // namespace v8::internal |
| 7985 | 7987 |
| 7986 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7988 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |