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

Unified Diff: src/compiler.cc

Issue 2449103006: [compiler] Remove redundant code (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | 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 1ccf5c2a394cb125b09e9c20549dab38d2b662b1..ec3d94d184a632bd47c9c7194d70e672295fb4aa 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1212,24 +1212,7 @@ bool Compiler::CompileOptimized(Handle<JSFunction> function,
}
bool Compiler::CompileDebugCode(Handle<JSFunction> function) {
- Isolate* isolate = function->GetIsolate();
- 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;
+ return CompileDebugCode(handle(function->shared()));
}
bool Compiler::CompileDebugCode(Handle<SharedFunctionInfo> shared) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698