Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index b69ce7952dd917a918beb470806486b1637e4708..98616fa9c32c7b61c7f768d36a2d4f8f73658f34 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -6049,6 +6049,8 @@ class HObjectAccess FINAL { |
| return ExistingInobjectPropertyField::decode(value_); |
| } |
| + inline bool read_barrier() const { return ReadBarrierField::decode(value_); } |
| + |
| inline HObjectAccess WithRepresentation(Representation representation) { |
| return HObjectAccess(portion(), offset(), representation, name(), |
| immutable(), existing_inobject_property()); |
| @@ -6215,16 +6217,10 @@ class HObjectAccess FINAL { |
| Representation::UInteger16()); |
| } |
| - static HObjectAccess ForPropertyCellValue() { |
| - return HObjectAccess(kInobject, PropertyCell::kValueOffset); |
| - } |
| - |
| - static HObjectAccess ForCellValue() { |
| - return HObjectAccess(kInobject, Cell::kValueOffset); |
| - } |
| - |
| static HObjectAccess ForWeakCellValue() { |
|
Erik Corry Chromium.org
2015/02/03 17:42:53
I suspect some or perhaps all of the uses of this
ulan
2015/02/04 09:35:04
Yesterday I landed a change in StoreGlobal hydroge
Erik Corry
2015/02/04 10:49:42
OK, we probably need both.
|
| - return HObjectAccess(kInobject, WeakCell::kValueOffset); |
| + return HObjectAccess( |
| + kInobject, WeakCell::kValueOffsetDontForgetTheReadBarrier, |
| + Representation::Tagged(), Handle<String>::null(), false, true, true); |
| } |
| static HObjectAccess ForAllocationMementoSite() { |
| @@ -6398,15 +6394,16 @@ class HObjectAccess FINAL { |
| HObjectAccess(Portion portion, int offset, |
| Representation representation = Representation::Tagged(), |
| Handle<String> name = Handle<String>::null(), |
| - bool immutable = false, |
| - bool existing_inobject_property = true) |
| - : value_(PortionField::encode(portion) | |
| - RepresentationField::encode(representation.kind()) | |
| - ImmutableField::encode(immutable ? 1 : 0) | |
| - ExistingInobjectPropertyField::encode( |
| - existing_inobject_property ? 1 : 0) | |
| - OffsetField::encode(offset)), |
| - name_(name) { |
| + bool immutable = false, bool existing_inobject_property = true, |
| + bool read_barrier = false) |
| + : value_(PortionField::encode(portion) | |
| + RepresentationField::encode(representation.kind()) | |
| + ImmutableField::encode(immutable ? 1 : 0) | |
| + ExistingInobjectPropertyField::encode( |
| + existing_inobject_property ? 1 : 0) | |
| + ReadBarrierField::encode(read_barrier ? 1 : 0) | |
|
Hannes Payer (out of office)
2015/02/04 12:45:59
I like that.
|
| + OffsetField::encode(offset)), |
| + name_(name) { |
| // assert that the fields decode correctly |
| DCHECK(this->offset() == offset); |
| DCHECK(this->portion() == portion); |
| @@ -6420,7 +6417,8 @@ class HObjectAccess FINAL { |
| class RepresentationField : public BitField<Representation::Kind, 3, 4> {}; |
| class ImmutableField : public BitField<bool, 7, 1> {}; |
| class ExistingInobjectPropertyField : public BitField<bool, 8, 1> {}; |
| - class OffsetField : public BitField<int, 9, 23> {}; |
| + class ReadBarrierField : public BitField<bool, 9, 1> {}; |
| + class OffsetField : public BitField<int, 10, 22> {}; |
| uint32_t value_; // encodes portion, representation, immutable, and offset |
| Handle<String> name_; |