Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index 23dbbd289c6c5d5a9e07697368e9fba6ab05e22d..b30c16983c8730918823f4150f5580c6e174159b 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -5913,6 +5913,10 @@ class HObjectAccess V8_FINAL { |
| return name_; |
| } |
| + inline bool immutable() const { |
| + return ImmutableField::decode(value_); |
| + } |
| + |
| inline HObjectAccess WithRepresentation(Representation representation) { |
| return HObjectAccess(portion(), offset(), representation, name()); |
| } |
| @@ -6143,20 +6147,24 @@ 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(), |
| + bool immutable = false) |
| : value_(PortionField::encode(portion) | |
| RepresentationField::encode(representation.kind()) | |
| + ImmutableField::encode(immutable ? 1 : 0) | |
| OffsetField::encode(offset)), |
| name_(name) { |
| // assert that the fields decode correctly |
| ASSERT(this->offset() == offset); |
| ASSERT(this->portion() == portion); |
| + ASSERT(this->immutable() == immutable); |
| ASSERT(RepresentationField::decode(value_) == representation.kind()); |
| } |
| class PortionField : public BitField<Portion, 0, 3> {}; |
| class RepresentationField : public BitField<Representation::Kind, 3, 4> {}; |
| - class OffsetField : public BitField<int, 7, 25> {}; |
| + class ImmutableField : public BitField<int, 7, 1> {}; |
|
Igor Sheludko
2013/12/06 09:18:54
Wouldn't it be better to define it as a BitField<b
|
| + class OffsetField : public BitField<int, 8, 24> {}; |
| uint32_t value_; // encodes portion, representation, and offset |
| Handle<String> name_; |