Reviewers: mvstanton,

Message:
Committed patchset #1 (id:1) manually as 24604 (presubmit successful).

Description:
Always initialize key_type_ in AST nodes

BUG=chromium:423117
LOG=n
[email protected]

Committed: https://code.google.com/p/v8/source/detail?r=24604

Please review this at https://codereview.chromium.org/652183002/

Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+8, -1 lines):
  M src/ast.h
  M src/ast.cc
  M src/ic/ic.h


Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 60db9132104dcc09c63357e104d9adb8de537226..f6dec89f612d84e7156f80135b38b364a84d01e5 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -105,6 +105,7 @@ Assignment::Assignment(Zone* zone, Token::Value op, Expression* target,
       value_(value),
       binary_operation_(NULL),
       is_uninitialized_(false),
+      key_type_(ELEMENT),
       store_mode_(STANDARD_STORE) {}


Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index a3fb9626b823185336966aa4d220d22d79508459..45c1374de123ce847054339c1d4c2ce721252db4 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1748,6 +1748,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_;
@@ -2124,6 +2128,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) {}

Index: src/ic/ic.h
diff --git a/src/ic/ic.h b/src/ic/ic.h
index 7a6ee616b8061be2fa0e36eb1f1131342fdeb37f..7124638bcb0581575451ce1540cf6992e8837c0d 100644
--- a/src/ic/ic.h
+++ b/src/ic/ic.h
@@ -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(


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to