Commit 0b9b6c51 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[compiler] Avoid using CompilationInfoWithZone.

This is a preparatory change to only use the class in question when
allocating a CompilationInfo on the C-heap for a compilation job. As a
next step we will make CompilationInfoWithZone disappear and make the
CompilationJob be the one C-heap allocated object.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/1931573003
Cr-Commit-Position: refs/heads/master@{#35848}
parent c55cff52
......@@ -887,7 +887,9 @@ MaybeHandle<Code> GetBaselineCode(Handle<JSFunction> function) {
Isolate* isolate = function->GetIsolate();
VMState<COMPILER> state(isolate);
PostponeInterruptsScope postpone(isolate);
CompilationInfoWithZone info(function);
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info, function);
// Reset profiler ticks, function is no longer considered hot.
if (function->shared()->HasBytecodeArray()) {
......@@ -998,7 +1000,9 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
return Handle<Code>(function->shared()->code());
}
CompilationInfoWithZone info(function);
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info, function);
Handle<Code> result;
ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCode(&info), Code);
......@@ -1226,7 +1230,9 @@ bool Compiler::CompileOptimized(Handle<JSFunction> function,
if (function->shared()->is_compiled()) {
code = handle(function->shared()->code(), isolate);
} else {
CompilationInfoWithZone info(function);
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info, function);
if (!GetUnoptimizedCode(&info).ToHandle(&code)) {
return false;
}
......
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