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

Unified Diff: src/compiler.cc

Issue 2679303003: Reland of land: [Parse] ParseInfo owns the parsing Zone. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « src/background-parsing-task.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 0ed44b143576db31eaf0e53fc9e07d24b3ddc6d2..39dd9fbef915cd8fc9d866af39003a9b0cab135f 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -537,8 +537,7 @@
continue;
} else {
// Otherwise generate unoptimized code now.
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, script);
+ ParseInfo parse_info(script);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
parse_info.set_literal(literal);
@@ -925,8 +924,7 @@
Isolate* isolate = function->GetIsolate();
VMState<COMPILER> state(isolate);
PostponeInterruptsScope postpone(isolate);
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, handle(function->shared()));
+ ParseInfo parse_info(handle(function->shared()));
CompilationInfo info(&parse_info, function);
DCHECK(function->shared()->is_compiled());
@@ -1059,8 +1057,7 @@
return entry;
}
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, handle(function->shared()));
+ ParseInfo parse_info(handle(function->shared()));
CompilationInfo info(&parse_info, function);
Handle<Code> result;
ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCode(&info), Code);
@@ -1241,8 +1238,7 @@
code = isolate->builtins()->InterpreterEntryTrampoline();
function->shared()->ReplaceCode(*code);
} else {
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, handle(function->shared()));
+ ParseInfo parse_info(handle(function->shared()));
CompilationInfo info(&parse_info, function);
if (!GetUnoptimizedCode(&info).ToHandle(&code)) {
return false;
@@ -1266,8 +1262,7 @@
DCHECK(AllowCompilation::IsAllowed(isolate));
// Start a compilation.
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, shared);
+ ParseInfo parse_info(shared);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
info.MarkAsDebug();
if (GetUnoptimizedCode(&info).is_null()) {
@@ -1294,8 +1289,7 @@
script->set_shared_function_infos(isolate->heap()->empty_fixed_array());
// Start a compilation.
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, script);
+ ParseInfo parse_info(script);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
info.MarkAsDebug();
@@ -1306,7 +1300,7 @@
// Check postconditions on success.
DCHECK(!isolate->has_pending_exception());
infos = LiveEditFunctionTracker::Collect(parse_info.literal(), script,
- &zone, isolate);
+ parse_info.zone(), isolate);
}
// Restore the original function info list in order to remain side-effect
@@ -1436,8 +1430,7 @@
script->set_compilation_type(Script::COMPILATION_TYPE_EVAL);
Script::SetEvalOrigin(script, outer_info, eval_position);
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, script);
+ ParseInfo parse_info(script);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
parse_info.set_eval();
parse_info.set_language_mode(language_mode);
@@ -1646,8 +1639,7 @@
}
// Compile the function and add it to the cache.
- Zone zone(isolate->allocator(), ZONE_NAME);
- ParseInfo parse_info(&zone, script);
+ ParseInfo parse_info(script);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
if (resource_options.IsModule()) parse_info.set_module();
if (compile_options != ScriptCompiler::kNoCompileOptions) {
« no previous file with comments | « src/background-parsing-task.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698