Commit 892e6621 authored by titzer@chromium.org's avatar titzer@chromium.org

Don't update the compilation size statistics when doing an optimized compile.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/575393002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 97bce5e6
......@@ -1276,6 +1276,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
if (shared->code()->kind() != Code::FUNCTION ||
ScopeInfo::Empty(isolate) == shared->scope_info()) {
// The function was never compiled. Compile it unoptimized first.
// TODO(titzer): reuse the AST and scope info from this compile.
CompilationInfoWithZone nested(function);
nested.EnableDeoptimizationSupport();
if (!GetUnoptimizedCodeCommon(&nested).ToHandle(&current_code)) {
......@@ -1283,8 +1284,6 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
}
shared->ReplaceCode(*current_code);
}
int compiled_size = shared->end_position() - shared->start_position();
isolate->counters()->total_compile_size()->Increment(compiled_size);
current_code->set_profiler_ticks(0);
info->SetOptimizing(osr_ast_id, current_code);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment