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

Unified Diff: src/ast.h

Issue 755513003: Hydrogen: fix keyed loads with string keys (Closed) Base URL: gh:v8/v8@master
Patch Set: better fix Created 6 years 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 | « no previous file | src/hydrogen.cc » ('j') | src/ic/ic.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index d7119239c78355de4ac1c97fcbe255847c36d4fe..b74104db9253f2be25c59b4309277d53a4d7844f 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1786,8 +1786,7 @@ class Property FINAL : public Expression {
return STANDARD_STORE;
}
virtual IcCheckType GetKeyType() const OVERRIDE {
- // PROPERTY key types currently aren't implemented for KeyedLoadICs.
- return ELEMENT;
+ return KeyTypeField::decode(bit_field_);
}
bool IsUninitialized() const {
return !is_for_call() && HasNoTypeInformation();
@@ -1801,6 +1800,9 @@ class Property FINAL : public Expression {
void set_is_string_access(bool b) {
bit_field_ = IsStringAccessField::update(bit_field_, b);
}
+ void set_key_type(IcCheckType key_type) {
+ bit_field_ = KeyTypeField::update(bit_field_, key_type);
+ }
void mark_for_call() {
bit_field_ = IsForCallField::update(bit_field_, true);
}
@@ -1838,6 +1840,7 @@ class Property FINAL : public Expression {
class IsForCallField : public BitField8<bool, 0, 1> {};
class IsUninitializedField : public BitField8<bool, 1, 1> {};
class IsStringAccessField : public BitField8<bool, 2, 1> {};
+ class KeyTypeField : public BitField16<IcCheckType, 3, 1> {};
Jakob Kummerow 2014/12/10 15:21:18 This must be a BitField8!
uint8_t bit_field_;
FeedbackVectorICSlot property_feedback_slot_;
Expression* obj_;
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/ic/ic.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698