Reviewers: Michael Starzinger,

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

[email protected]
BUG=

Please review this at https://codereview.chromium.org/575393002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -3 lines):
  M src/compiler.cc


Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 074e4a20b735a8f9b0aaac355bb6129653089889..425ff4ce7ec7e5cf867360c7cc951cf5ee5aedef 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1276,15 +1276,14 @@ 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.
-    CompilationInfoWithZone nested(function);
+    // TODO(titzer): reuse the AST and scope info from this compile.
+    CompilationInfoWithZone nested(shared);
     nested.EnableDeoptimizationSupport();
     if (!GetUnoptimizedCodeCommon(&nested).ToHandle(&current_code)) {
       return MaybeHandle<Code>();
     }
     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);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to