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 5325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5336 DECLARE_CONCRETE_INSTRUCTION(CallStub) | 5336 DECLARE_CONCRETE_INSTRUCTION(CallStub) |
5337 | 5337 |
5338 private: | 5338 private: |
5339 CodeStub::Major major_key_; | 5339 CodeStub::Major major_key_; |
5340 TranscendentalCache::Type transcendental_type_; | 5340 TranscendentalCache::Type transcendental_type_; |
5341 }; | 5341 }; |
5342 | 5342 |
5343 | 5343 |
5344 class HUnknownOSRValue: public HTemplateInstruction<0> { | 5344 class HUnknownOSRValue: public HTemplateInstruction<0> { |
5345 public: | 5345 public: |
5346 DECLARE_INSTRUCTION_FACTORY_P0(HUnknownOSRValue) | 5346 DECLARE_INSTRUCTION_FACTORY_P2(HUnknownOSRValue, HEnvironment*, int); |
| 5347 |
| 5348 virtual void PrintDataTo(StringStream* stream); |
5347 | 5349 |
5348 virtual Representation RequiredInputRepresentation(int index) { | 5350 virtual Representation RequiredInputRepresentation(int index) { |
5349 return Representation::None(); | 5351 return Representation::None(); |
5350 } | 5352 } |
5351 | 5353 |
5352 void set_incoming_value(HPhi* value) { | 5354 void set_incoming_value(HPhi* value) { incoming_value_ = value; } |
5353 incoming_value_ = value; | 5355 HPhi* incoming_value() { return incoming_value_; } |
5354 } | 5356 HEnvironment *environment() { return environment_; } |
5355 | 5357 int index() { return index_; } |
5356 HPhi* incoming_value() { | |
5357 return incoming_value_; | |
5358 } | |
5359 | 5358 |
5360 virtual Representation KnownOptimalRepresentation() { | 5359 virtual Representation KnownOptimalRepresentation() { |
5361 if (incoming_value_ == NULL) return Representation::None(); | 5360 if (incoming_value_ == NULL) return Representation::None(); |
5362 return incoming_value_->KnownOptimalRepresentation(); | 5361 return incoming_value_->KnownOptimalRepresentation(); |
5363 } | 5362 } |
5364 | 5363 |
5365 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue) | 5364 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue) |
5366 | 5365 |
5367 private: | 5366 private: |
5368 HUnknownOSRValue() | 5367 HUnknownOSRValue(HEnvironment* environment, int index) |
5369 : incoming_value_(NULL) { | 5368 : environment_(environment), |
| 5369 index_(index), |
| 5370 incoming_value_(NULL) { |
5370 set_representation(Representation::Tagged()); | 5371 set_representation(Representation::Tagged()); |
5371 } | 5372 } |
5372 | 5373 |
| 5374 HEnvironment* environment_; |
| 5375 int index_; |
5373 HPhi* incoming_value_; | 5376 HPhi* incoming_value_; |
5374 }; | 5377 }; |
5375 | 5378 |
5376 | 5379 |
5377 class HLoadGlobalCell: public HTemplateInstruction<0> { | 5380 class HLoadGlobalCell: public HTemplateInstruction<0> { |
5378 public: | 5381 public: |
5379 HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details) | 5382 HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details) |
5380 : cell_(cell), details_(details), unique_id_() { | 5383 : cell_(cell), details_(details), unique_id_() { |
5381 set_representation(Representation::Tagged()); | 5384 set_representation(Representation::Tagged()); |
5382 SetFlag(kUseGVN); | 5385 SetFlag(kUseGVN); |
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7269 virtual bool IsDeletable() const { return true; } | 7272 virtual bool IsDeletable() const { return true; } |
7270 }; | 7273 }; |
7271 | 7274 |
7272 | 7275 |
7273 #undef DECLARE_INSTRUCTION | 7276 #undef DECLARE_INSTRUCTION |
7274 #undef DECLARE_CONCRETE_INSTRUCTION | 7277 #undef DECLARE_CONCRETE_INSTRUCTION |
7275 | 7278 |
7276 } } // namespace v8::internal | 7279 } } // namespace v8::internal |
7277 | 7280 |
7278 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7281 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |