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

Unified Diff: src/objects.cc

Issue 10534139: One Zone per CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 6314955b13749fbcc7abd71d535cc0225c9604f7..2038a0fadfaa0b030c71bca89a82dfc8a999e9ae 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7466,7 +7466,10 @@ static bool CompileLazyHelper(CompilationInfo* info,
bool SharedFunctionInfo::CompileLazy(Handle<SharedFunctionInfo> shared,
ClearExceptionFlag flag) {
- CompilationInfo info(shared);
+
+ Zone zone(shared->GetIsolate());
+ CompilationInfo info(shared, &zone);
+ ZoneScope scope(&zone, DELETE_ON_EXIT);
return CompileLazyHelper(&info, flag);
}
@@ -7478,7 +7481,9 @@ bool JSFunction::CompileLazy(Handle<JSFunction> function,
function->ReplaceCode(function->shared()->code());
function->shared()->set_code_age(0);
} else {
- CompilationInfo info(function);
+ Zone zone(function->GetIsolate());
+ CompilationInfo info(function, &zone);
+ ZoneScope scope(&zone, DELETE_ON_EXIT);
result = CompileLazyHelper(&info, flag);
ASSERT(!result || function->is_compiled());
}
@@ -7489,7 +7494,9 @@ bool JSFunction::CompileLazy(Handle<JSFunction> function,
bool JSFunction::CompileOptimized(Handle<JSFunction> function,
int osr_ast_id,
ClearExceptionFlag flag) {
- CompilationInfo info(function);
+ Zone zone(function->GetIsolate());
+ CompilationInfo info(function, &zone);
+ ZoneScope scope(&zone, DELETE_ON_EXIT);
info.SetOptimizing(osr_ast_id);
return CompileLazyHelper(&info, flag);
}

Powered by Google App Engine
This is Rietveld 408576698