Reviewers: Jakob,

Message:
PTAL

Description:
Fix StoreIsUninitialized, and add Soft Deopt if keyed store is uninitialized.

Please review this at https://chromiumcodereview.appspot.com/18526005/

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

Affected files:
  M src/hydrogen.cc
  M src/type-info.cc


Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 096c4e3356a9548c99bac1bed77a9460cbdbd110..6a1f041d81f719101921b07cc881337a809b40ee 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5996,6 +5996,9 @@ HValue* HOptimizedGraphBuilder::HandleKeyedElementAccess(
         expr->GetStoreMode(), has_side_effects);
   } else {
     if (is_store) {
+ if (expr->IsAssignment() && expr->AsAssignment()->IsUninitialized()) {
+        AddSoftDeoptimize();
+      }
       instr = BuildStoreKeyedGeneric(obj, key, val);
     } else {
       instr = BuildLoadKeyedGeneric(obj, key);
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index b256bb406e4de7f8c40931b856d4b5ec46919bb1..6db810e6ea258d7c4bcc6d378d33d3c53e461e9c 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -141,7 +141,7 @@ bool TypeFeedbackOracle::LoadIsPolymorphic(Property* expr) {
 bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) {
   Handle<Object> map_or_code = GetInfo(ast_id);
   if (map_or_code->IsMap()) return false;
-  if (!map_or_code->IsCode()) return true;
+  if (!map_or_code->IsCode()) return false;
   Handle<Code> code = Handle<Code>::cast(map_or_code);
   return code->ic_state() == UNINITIALIZED;
 }


--
--
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/groups/opt_out.


Reply via email to