Always initialize key_type_ in AST nodes

BUG=chromium:423117
LOG=n
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/652183002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 974f3dcf
......@@ -101,6 +101,7 @@ Assignment::Assignment(Zone* zone, Token::Value op, Expression* target,
Expression* value, int pos, IdGen* id_gen)
: Expression(zone, pos, num_ids(), id_gen),
is_uninitialized_(false),
key_type_(ELEMENT),
store_mode_(STANDARD_STORE),
op_(op),
target_(target),
......
......@@ -1742,6 +1742,10 @@ class Property FINAL : public Expression {
virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE {
return STANDARD_STORE;
}
virtual IcCheckType GetKeyType() {
// PROPERTY key types currently aren't implemented for KeyedLoadICs.
return ELEMENT;
}
bool IsUninitialized() { return !is_for_call_ && is_uninitialized_; }
bool HasNoTypeInformation() {
return is_uninitialized_;
......@@ -2123,6 +2127,7 @@ class CountOperation FINAL : public Expression {
: Expression(zone, pos, num_ids(), id_gen),
op_(op),
is_prefix_(is_prefix),
key_type_(ELEMENT),
store_mode_(STANDARD_STORE),
expression_(expr) {}
......
......@@ -547,7 +547,8 @@ class KeyedStoreIC : public StoreIC {
static ExtraICState ComputeExtraICState(StrictMode flag,
KeyedAccessStoreMode mode) {
return StrictModeState::encode(flag) |
ExtraICStateKeyedAccessStoreMode::encode(mode);
ExtraICStateKeyedAccessStoreMode::encode(mode) |
IcCheckTypeField::encode(ELEMENT);
}
static KeyedAccessStoreMode GetKeyedAccessStoreMode(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment