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

Unified Diff: src/hydrogen.cc

Issue 18526005: Fix StoreIsUninitialized, and add Soft Deopt if keyed store is uninitialized. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months 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/type-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 096c4e3356a9548c99bac1bed77a9460cbdbd110..79ce3a522101785a90dccbdf674310c573ca9aa5 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5996,8 +5996,14 @@ 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 {
+ if (expr->AsProperty()->IsUninitialized()) {
+ AddSoftDeoptimize();
+ }
instr = BuildLoadKeyedGeneric(obj, key);
}
AddInstruction(instr);
« no previous file with comments | « no previous file | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698