Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: src/hydrogen-instructions.h

Issue 10538002: Skip canonicalization of packed arrays in HStoreKeyedFastDoubleElement (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698