Commit f6c3fd0a authored by clemensh's avatar clemensh Committed by Commit bot

[compiler] Remove redundant code

Just stumbled across this while doing
https://codereview.chromium.org/2457433002/

R=mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2449103006
Cr-Commit-Position: refs/heads/master@{#40596}
parent 7db6c79a
...@@ -1194,24 +1194,7 @@ bool Compiler::CompileOptimized(Handle<JSFunction> function, ...@@ -1194,24 +1194,7 @@ bool Compiler::CompileOptimized(Handle<JSFunction> function,
} }
bool Compiler::CompileDebugCode(Handle<JSFunction> function) { bool Compiler::CompileDebugCode(Handle<JSFunction> function) {
Isolate* isolate = function->GetIsolate(); return CompileDebugCode(handle(function->shared()));
DCHECK(AllowCompilation::IsAllowed(isolate));
// Start a compilation.
Zone zone(isolate->allocator(), ZONE_NAME);
ParseInfo parse_info(&zone, handle(function->shared()));
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
info.MarkAsDebug();
if (GetUnoptimizedCode(&info).is_null()) {
isolate->clear_pending_exception();
return false;
}
// Check postconditions on success.
DCHECK(!isolate->has_pending_exception());
DCHECK(function->shared()->is_compiled());
DCHECK(function->shared()->HasDebugCode());
return true;
} }
bool Compiler::CompileDebugCode(Handle<SharedFunctionInfo> shared) { bool Compiler::CompileDebugCode(Handle<SharedFunctionInfo> shared) {
......
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