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

Unified Diff: src/objects.cc

Issue 59823002: Reset opt count on optimized code map lookup failure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 8bb603a985db87e6a8c0d78be94d081b74777f67..8c6dc357a32c29fbac5d976db93d8ee1e164ba5c 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9580,7 +9580,7 @@ MaybeObject* SharedFunctionInfo::AddToOptimizedCodeMap(Context* native_context,
if (value->IsSmi()) {
// No optimized code map.
ASSERT_EQ(0, Smi::cast(value)->value());
- // Crate 3 entries per context {context, code, literals}.
+ // Create 3 entries per context {context, code, literals}.
MaybeObject* maybe = heap->AllocateFixedArray(kInitialLength);
if (!maybe->To(&new_code_map)) return maybe;
new_code_map->set(kEntriesStart + 0, native_context);
@@ -10231,9 +10231,9 @@ void SharedFunctionInfo::ResetForNewContext(int new_ic_age) {
set_optimization_disabled(false);
code()->set_optimizable(true);
}
- set_opt_count(0);
- set_deopt_count(0);
}
+ set_opt_count(0);
+ set_deopt_count(0);
}

Powered by Google App Engine
This is Rietveld 408576698