Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index 0f6cb6e473d7454dd9cb1709f3b2faef1f1feaf3..f593bcbc647421dd058003b616ee7f6a6d555c5c 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -4302,8 +4302,11 @@ class HStoreKeyedFastDoubleElement |
| public: |
| HStoreKeyedFastDoubleElement(HValue* elements, |
| HValue* key, |
| - HValue* val) |
| - : index_offset_(0), is_dehoisted_(false) { |
| + HValue* val, |
| + ElementsKind element_kind) |
|
Jakob Kummerow
2012/06/05 09:05:40
nit: for consistency, "elements_kind" (with 's') p
|
| + : index_offset_(0), bit_field_(0) { |
| + bit_field_ = IsDehoisted::encode(false) | |
| + SkipCanonicalization::encode(IsFastPackedElementsKind(element_kind)); |
| SetOperandAt(0, elements); |
| SetOperandAt(1, key); |
| SetOperandAt(2, val); |
| @@ -4327,8 +4330,10 @@ class HStoreKeyedFastDoubleElement |
| void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } |
| HValue* GetKey() { return key(); } |
| void SetKey(HValue* key) { SetOperandAt(1, key); } |
| - bool IsDehoisted() { return is_dehoisted_; } |
| - void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } |
| + bool IsDehoisted() { return IsDehoisted::decode(bit_field_); } |
| + void SetDehoisted(bool is_dehoisted) { |
| + bit_field_ = IsDehoisted::update(bit_field_, is_dehoisted); |
| + } |
| bool NeedsWriteBarrier() { |
| return StoringValueNeedsWriteBarrier(value()); |
| @@ -4341,8 +4346,11 @@ class HStoreKeyedFastDoubleElement |
| DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement) |
| private: |
| + class IsDehoisted: public BitField<bool, 0, 1> {}; |
| + class SkipCanonicalization: public BitField<bool, 1, 2> {}; |
|
Jakob Kummerow
2012/06/05 09:05:40
not that it matters, but why use two bits to store
Vyacheslav Egorov (Google)
2012/06/05 09:13:24
why not
bool is_dehoisted_ : 1;
bool skip_canoni
|
| + |
| uint32_t index_offset_; |
| - bool is_dehoisted_; |
| + uint32_t bit_field_; |
| }; |