Check code kind when resetting profiler ticks.
BUG=121147 TEST=chromium gpu_tests/WebGLConformanceTests Review URL: https://chromiumcodereview.appspot.com/9956060 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
6c8a6c2640
commit
e352114fb8
@ -7869,14 +7869,17 @@ void SharedFunctionInfo::AttachInitialMap(Map* map) {
|
|||||||
|
|
||||||
void SharedFunctionInfo::ResetForNewContext(int new_ic_age) {
|
void SharedFunctionInfo::ResetForNewContext(int new_ic_age) {
|
||||||
code()->ClearInlineCaches();
|
code()->ClearInlineCaches();
|
||||||
code()->set_profiler_ticks(0);
|
|
||||||
set_ic_age(new_ic_age);
|
set_ic_age(new_ic_age);
|
||||||
if (optimization_disabled() && opt_count() >= Compiler::kDefaultMaxOptCount) {
|
if (code()->kind() == Code::FUNCTION) {
|
||||||
// Re-enable optimizations if they were disabled due to opt_count limit.
|
code()->set_profiler_ticks(0);
|
||||||
set_optimization_disabled(false);
|
if (optimization_disabled() &&
|
||||||
code()->set_optimizable(true);
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user