| 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 5090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5101 return Representation::Tagged(); | 5101 return Representation::Tagged(); |
| 5102 } | 5102 } |
| 5103 | 5103 |
| 5104 virtual void PrintDataTo(StringStream* stream); | 5104 virtual void PrintDataTo(StringStream* stream); |
| 5105 | 5105 |
| 5106 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) | 5106 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) |
| 5107 | 5107 |
| 5108 private: | 5108 private: |
| 5109 HInnerAllocatedObject(HValue* value, int offset, HType type = HType::Tagged()) | 5109 HInnerAllocatedObject(HValue* value, int offset, HType type = HType::Tagged()) |
| 5110 : HTemplateInstruction<1>(type), offset_(offset) { | 5110 : HTemplateInstruction<1>(type), offset_(offset) { |
| 5111 ASSERT(value->IsAllocate()); | 5111 // ASSERT(value->IsAllocate()); |
| 5112 SetOperandAt(0, value); | 5112 SetOperandAt(0, value); |
| 5113 set_type(type); | 5113 set_type(type); |
| 5114 set_representation(Representation::Tagged()); | 5114 set_representation(Representation::Tagged()); |
| 5115 } | 5115 } |
| 5116 | 5116 |
| 5117 int offset_; | 5117 int offset_; |
| 5118 }; | 5118 }; |
| 5119 | 5119 |
| 5120 | 5120 |
| 5121 inline bool StoringValueNeedsWriteBarrier(HValue* value) { | 5121 inline bool StoringValueNeedsWriteBarrier(HValue* value) { |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5386 | 5386 |
| 5387 static HObjectAccess ForHeapNumberValue() { | 5387 static HObjectAccess ForHeapNumberValue() { |
| 5388 return HObjectAccess( | 5388 return HObjectAccess( |
| 5389 kDouble, HeapNumber::kValueOffset, Representation::Double()); | 5389 kDouble, HeapNumber::kValueOffset, Representation::Double()); |
| 5390 } | 5390 } |
| 5391 | 5391 |
| 5392 static HObjectAccess ForElementsPointer() { | 5392 static HObjectAccess ForElementsPointer() { |
| 5393 return HObjectAccess(kElementsPointer, JSObject::kElementsOffset); | 5393 return HObjectAccess(kElementsPointer, JSObject::kElementsOffset); |
| 5394 } | 5394 } |
| 5395 | 5395 |
| 5396 static HObjectAccess ForLiteralsPointer() { |
| 5397 return HObjectAccess(kInobject, JSFunction::kLiteralsOffset); |
| 5398 } |
| 5399 |
| 5400 static HObjectAccess ForNextFunctionLinkPointer() { |
| 5401 return HObjectAccess(kInobject, JSFunction::kNextFunctionLinkOffset); |
| 5402 } |
| 5403 |
| 5396 static HObjectAccess ForArrayLength(ElementsKind elements_kind) { | 5404 static HObjectAccess ForArrayLength(ElementsKind elements_kind) { |
| 5397 return HObjectAccess( | 5405 return HObjectAccess( |
| 5398 kArrayLengths, | 5406 kArrayLengths, |
| 5399 JSArray::kLengthOffset, | 5407 JSArray::kLengthOffset, |
| 5400 IsFastElementsKind(elements_kind) && | 5408 IsFastElementsKind(elements_kind) && |
| 5401 FLAG_track_fields | 5409 FLAG_track_fields |
| 5402 ? Representation::Smi() : Representation::Tagged()); | 5410 ? Representation::Smi() : Representation::Tagged()); |
| 5403 } | 5411 } |
| 5404 | 5412 |
| 5405 static HObjectAccess ForAllocationSiteTransitionInfo() { | 5413 static HObjectAccess ForAllocationSiteTransitionInfo() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 5430 } | 5438 } |
| 5431 | 5439 |
| 5432 static HObjectAccess ForPropertiesPointer() { | 5440 static HObjectAccess ForPropertiesPointer() { |
| 5433 return HObjectAccess(kInobject, JSObject::kPropertiesOffset); | 5441 return HObjectAccess(kInobject, JSObject::kPropertiesOffset); |
| 5434 } | 5442 } |
| 5435 | 5443 |
| 5436 static HObjectAccess ForPrototypeOrInitialMap() { | 5444 static HObjectAccess ForPrototypeOrInitialMap() { |
| 5437 return HObjectAccess(kInobject, JSFunction::kPrototypeOrInitialMapOffset); | 5445 return HObjectAccess(kInobject, JSFunction::kPrototypeOrInitialMapOffset); |
| 5438 } | 5446 } |
| 5439 | 5447 |
| 5448 static HObjectAccess ForSharedFunctionInfoPointer() { |
| 5449 return HObjectAccess(kInobject, JSFunction::kSharedFunctionInfoOffset); |
| 5450 } |
| 5451 |
| 5452 static HObjectAccess ForCodeEntryPointer() { |
| 5453 return HObjectAccess(kInobject, JSFunction::kCodeEntryOffset); |
| 5454 } |
| 5455 |
| 5456 static HObjectAccess ForCodeOffset() { |
| 5457 return HObjectAccess(kInobject, SharedFunctionInfo::kCodeOffset); |
| 5458 } |
| 5459 |
| 5460 static HObjectAccess ForFirstCodeSlot() { |
| 5461 return HObjectAccess(kInobject, SharedFunctionInfo::kFirstCodeSlot); |
| 5462 } |
| 5463 |
| 5464 static HObjectAccess ForFirstContextSlot() { |
| 5465 return HObjectAccess(kInobject, SharedFunctionInfo::kFirstContextSlot); |
| 5466 } |
| 5467 |
| 5468 static HObjectAccess ForOptimizedCodeMap() { |
| 5469 return HObjectAccess(kInobject, |
| 5470 SharedFunctionInfo::kOptimizedCodeMapOffset); |
| 5471 } |
| 5472 |
| 5473 static HObjectAccess ForFunctionContextPointer() { |
| 5474 return HObjectAccess(kInobject, JSFunction::kContextOffset); |
| 5475 } |
| 5476 |
| 5440 static HObjectAccess ForMap() { | 5477 static HObjectAccess ForMap() { |
| 5441 return HObjectAccess(kMaps, JSObject::kMapOffset); | 5478 return HObjectAccess(kMaps, JSObject::kMapOffset); |
| 5442 } | 5479 } |
| 5443 | 5480 |
| 5444 static HObjectAccess ForPropertyCellValue() { | 5481 static HObjectAccess ForPropertyCellValue() { |
| 5445 return HObjectAccess(kInobject, PropertyCell::kValueOffset); | 5482 return HObjectAccess(kInobject, PropertyCell::kValueOffset); |
| 5446 } | 5483 } |
| 5447 | 5484 |
| 5448 static HObjectAccess ForCellValue() { | 5485 static HObjectAccess ForCellValue() { |
| 5449 return HObjectAccess(kInobject, Cell::kValueOffset); | 5486 return HObjectAccess(kInobject, Cell::kValueOffset); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 5460 // Create an access to an offset in a fixed array header. | 5497 // Create an access to an offset in a fixed array header. |
| 5461 static HObjectAccess ForFixedArrayHeader(int offset); | 5498 static HObjectAccess ForFixedArrayHeader(int offset); |
| 5462 | 5499 |
| 5463 // Create an access to an in-object property in a JSObject. | 5500 // Create an access to an in-object property in a JSObject. |
| 5464 static HObjectAccess ForJSObjectOffset(int offset, | 5501 static HObjectAccess ForJSObjectOffset(int offset, |
| 5465 Representation representation = Representation::Tagged()); | 5502 Representation representation = Representation::Tagged()); |
| 5466 | 5503 |
| 5467 // Create an access to an in-object property in a JSArray. | 5504 // Create an access to an in-object property in a JSArray. |
| 5468 static HObjectAccess ForJSArrayOffset(int offset); | 5505 static HObjectAccess ForJSArrayOffset(int offset); |
| 5469 | 5506 |
| 5507 static HObjectAccess ForContextSlot(int index); |
| 5508 |
| 5470 // Create an access to the backing store of an object. | 5509 // Create an access to the backing store of an object. |
| 5471 static HObjectAccess ForBackingStoreOffset(int offset, | 5510 static HObjectAccess ForBackingStoreOffset(int offset, |
| 5472 Representation representation = Representation::Tagged()); | 5511 Representation representation = Representation::Tagged()); |
| 5473 | 5512 |
| 5474 // Create an access to a resolved field (in-object or backing store). | 5513 // Create an access to a resolved field (in-object or backing store). |
| 5475 static HObjectAccess ForField(Handle<Map> map, | 5514 static HObjectAccess ForField(Handle<Map> map, |
| 5476 LookupResult *lookup, Handle<String> name = Handle<String>::null()); | 5515 LookupResult *lookup, Handle<String> name = Handle<String>::null()); |
| 5477 | 5516 |
| 5478 // Create an access for the payload of a Cell or JSGlobalPropertyCell. | 5517 // Create an access for the payload of a Cell or JSGlobalPropertyCell. |
| 5479 static HObjectAccess ForCellPayload(Isolate* isolate); | 5518 static HObjectAccess ForCellPayload(Isolate* isolate); |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6778 virtual bool IsDeletable() const { return true; } | 6817 virtual bool IsDeletable() const { return true; } |
| 6779 }; | 6818 }; |
| 6780 | 6819 |
| 6781 | 6820 |
| 6782 #undef DECLARE_INSTRUCTION | 6821 #undef DECLARE_INSTRUCTION |
| 6783 #undef DECLARE_CONCRETE_INSTRUCTION | 6822 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6784 | 6823 |
| 6785 } } // namespace v8::internal | 6824 } } // namespace v8::internal |
| 6786 | 6825 |
| 6787 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6826 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |