OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5126 DECLARE_CONCRETE_INSTRUCTION(CallStub) | 5126 DECLARE_CONCRETE_INSTRUCTION(CallStub) |
5127 | 5127 |
5128 private: | 5128 private: |
5129 CodeStub::Major major_key_; | 5129 CodeStub::Major major_key_; |
5130 TranscendentalCache::Type transcendental_type_; | 5130 TranscendentalCache::Type transcendental_type_; |
5131 }; | 5131 }; |
5132 | 5132 |
5133 | 5133 |
5134 class HUnknownOSRValue: public HTemplateInstruction<0> { | 5134 class HUnknownOSRValue: public HTemplateInstruction<0> { |
5135 public: | 5135 public: |
5136 HUnknownOSRValue() | 5136 HUnknownOSRValue(HEnvironment *environment, int index) |
5137 : incoming_value_(NULL) { | 5137 : environment_(environment), |
Michael Starzinger
2013/07/31 14:55:50
It seems dangerous to me to preserve the full HEnv
| |
5138 index_(index), | |
5139 incoming_value_(NULL) { | |
5138 set_representation(Representation::Tagged()); | 5140 set_representation(Representation::Tagged()); |
5139 } | 5141 } |
5140 | 5142 |
5143 virtual void PrintDataTo(StringStream* stream); | |
5144 | |
5141 virtual Representation RequiredInputRepresentation(int index) { | 5145 virtual Representation RequiredInputRepresentation(int index) { |
5142 return Representation::None(); | 5146 return Representation::None(); |
5143 } | 5147 } |
5144 | 5148 |
5145 void set_incoming_value(HPhi* value) { | 5149 void set_incoming_value(HPhi* value) { incoming_value_ = value; } |
5146 incoming_value_ = value; | 5150 HPhi* incoming_value() { return incoming_value_; } |
5147 } | 5151 HEnvironment *environment() { return environment_; } |
Michael Starzinger
2013/07/31 14:55:50
nit: The star character sticks to the left.
| |
5148 | 5152 int index() { return index_; } |
5149 HPhi* incoming_value() { | |
5150 return incoming_value_; | |
5151 } | |
5152 | 5153 |
5153 virtual Representation KnownOptimalRepresentation() { | 5154 virtual Representation KnownOptimalRepresentation() { |
5154 if (incoming_value_ == NULL) return Representation::None(); | 5155 if (incoming_value_ == NULL) return Representation::None(); |
5155 return incoming_value_->KnownOptimalRepresentation(); | 5156 return incoming_value_->KnownOptimalRepresentation(); |
5156 } | 5157 } |
5157 | 5158 |
5158 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue) | 5159 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue) |
5159 | 5160 |
5160 private: | 5161 private: |
5162 HEnvironment *environment_; | |
5163 int index_; | |
5161 HPhi* incoming_value_; | 5164 HPhi* incoming_value_; |
5162 }; | 5165 }; |
5163 | 5166 |
5164 | 5167 |
5165 class HLoadGlobalCell: public HTemplateInstruction<0> { | 5168 class HLoadGlobalCell: public HTemplateInstruction<0> { |
5166 public: | 5169 public: |
5167 HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details) | 5170 HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details) |
5168 : cell_(cell), details_(details), unique_id_() { | 5171 : cell_(cell), details_(details), unique_id_() { |
5169 set_representation(Representation::Tagged()); | 5172 set_representation(Representation::Tagged()); |
5170 SetFlag(kUseGVN); | 5173 SetFlag(kUseGVN); |
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7005 virtual bool IsDeletable() const { return true; } | 7008 virtual bool IsDeletable() const { return true; } |
7006 }; | 7009 }; |
7007 | 7010 |
7008 | 7011 |
7009 #undef DECLARE_INSTRUCTION | 7012 #undef DECLARE_INSTRUCTION |
7010 #undef DECLARE_CONCRETE_INSTRUCTION | 7013 #undef DECLARE_CONCRETE_INSTRUCTION |
7011 | 7014 |
7012 } } // namespace v8::internal | 7015 } } // namespace v8::internal |
7013 | 7016 |
7014 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7017 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |