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

Unified Diff: src/ast.h

Issue 755513003: Hydrogen: fix keyed loads with string keys (Closed) Base URL: gh:v8/v8@master
Patch Set: rebase again 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/typing.cc » ('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 368ff81c733996ba36c0a5ab3e5bde7d1ec5f60a..43bde6ad25cc736bd89aab639ebb7398ccf6a947 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1748,8 +1748,7 @@ class Property FINAL : public Expression {
SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
KeyedAccessStoreMode GetStoreMode() const OVERRIDE { return STANDARD_STORE; }
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();
@@ -1763,6 +1762,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);
}
@@ -1805,6 +1807,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 BitField8<IcCheckType, 3, 1> {};
uint8_t bit_field_;
FeedbackVectorICSlot property_feedback_slot_;
Expression* obj_;
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/typing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698