Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index d5b1c75ebf8b7f87bffd705e7c3a2dce999229ed..ae5655bd7a1fc602b99323d5d1f0e69ad3d4221d 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -5420,6 +5420,11 @@ class HStoreContextSlot V8_FINAL : public HTemplateInstruction<2> { |
| // array elements pointer, etc, but not accesses to array elements themselves. |
| class HObjectAccess V8_FINAL { |
| public: |
| + // Indicates whether the field is initialized while transitioning, or also |
| + // mutable afterwards. Transitioning stores only initialize new fields rather |
| + // than changing existing fields, so they are marked as CONSTANT. |
| + enum FieldType { MUTABLE, CONSTANT }; |
| + |
| inline bool IsInobject() const { |
| return portion() != kBackingStore && portion() != kExternalMemory; |
| } |
| @@ -5444,8 +5449,10 @@ class HObjectAccess V8_FINAL { |
| return name_; |
| } |
| - inline HObjectAccess WithRepresentation(Representation representation) { |
| - return HObjectAccess(portion(), offset(), representation, name()); |
| + inline HObjectAccess WithRepresentation(Representation representation, |
| + FieldType field_type = MUTABLE) { |
| + return HObjectAccess( |
| + portion(), offset(), representation, name(), field_type); |
| } |
| static HObjectAccess ForHeapNumberValue() { |
| @@ -5566,10 +5573,12 @@ class HObjectAccess V8_FINAL { |
| HObjectAccess(Portion portion, int offset, |
| Representation representation = Representation::Tagged(), |
| - Handle<String> name = Handle<String>::null()) |
| + Handle<String> name = Handle<String>::null(), |
| + FieldType field_type = MUTABLE) |
| : value_(PortionField::encode(portion) | |
| - RepresentationField::encode(representation.kind()) | |
| - OffsetField::encode(offset)), |
| + RepresentationField::encode(representation.kind()) | |
| + FieldTypeField::encode(field_type) | |
| + OffsetField::encode(offset)), |
| name_(name) { |
| // assert that the fields decode correctly |
| ASSERT(this->offset() == offset); |
| @@ -5579,7 +5588,8 @@ class HObjectAccess V8_FINAL { |
| class PortionField : public BitField<Portion, 0, 3> {}; |
| class RepresentationField : public BitField<Representation::Kind, 3, 3> {}; |
| - class OffsetField : public BitField<int, 6, 26> {}; |
| + class FieldTypeField : public BitField<FieldType, 6, 1> {}; |
| + class OffsetField : public BitField<int, 7, 26> {}; |
|
titzer
2013/08/26 13:06:45
Not gonna fit in 32 anymore, unless you shrink the
Toon Verwaest
2013/08/26 13:39:16
Woops. 25 should be more than enough, given that w
|
| uint32_t value_; // encodes portion, representation, and offset |
| Handle<String> name_; |