Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 86374371e9b81de642cb528ad2b9a89e76c2c7f1..24652c4e88a8b6d7e08009f089dc121aba41bd6d 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -609,6 +609,7 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source, |
if (result->ic_age() != HEAP->global_ic_age()) { |
result->ResetForNewContext(HEAP->global_ic_age()); |
} |
+ result->code()->MakeYoung(); |
} |
if (result.is_null()) isolate->ReportPendingMessages(); |
@@ -670,6 +671,7 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source, |
if (result->ic_age() != HEAP->global_ic_age()) { |
result->ResetForNewContext(HEAP->global_ic_age()); |
} |
+ result->code()->MakeYoung(); |
} |
return result; |
@@ -708,7 +710,6 @@ static bool InstallFullCode(CompilationInfo* info) { |
// Check the function has compiled code. |
ASSERT(shared->is_compiled()); |
- shared->set_code_age(0); |
shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); |
shared->set_dont_inline(lit->flags()->Contains(kDontInline)); |
shared->set_ast_node_count(lit->ast_node_count()); |