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

Unified Diff: src/objects.cc

Issue 9956060: Check code kind when resetting profiler ticks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 58a34634a7ffc4842ac7a6fa6114002cacdca85b..d99338cbcff22df1ab574f0991df1094a8384063 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7869,14 +7869,17 @@ void SharedFunctionInfo::AttachInitialMap(Map* map) {
void SharedFunctionInfo::ResetForNewContext(int new_ic_age) {
code()->ClearInlineCaches();
- code()->set_profiler_ticks(0);
set_ic_age(new_ic_age);
- if (optimization_disabled() && opt_count() >= Compiler::kDefaultMaxOptCount) {
- // Re-enable optimizations if they were disabled due to opt_count limit.
- set_optimization_disabled(false);
- code()->set_optimizable(true);
+ if (code()->kind() == Code::FUNCTION) {
ulan 2012/04/02 12:52:30 Another kind that can appear here is Code::BUILTIN
+ code()->set_profiler_ticks(0);
+ if (optimization_disabled() &&
+ opt_count() >= Compiler::kDefaultMaxOptCount) {
+ // Re-enable optimizations if they were disabled due to opt_count limit.
+ set_optimization_disabled(false);
+ code()->set_optimizable(true);
+ }
+ set_opt_count(0);
}
- set_opt_count(0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698