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

Unified Diff: src/compiler.cc

Issue 1868553002: [compiler] Remove obsolete GetUnoptimizedCodeCommon. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-internal-11
Patch Set: Created 4 years, 8 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 5f12138c16a29ba2b0375cc7b08b9633b05108be..27cabfd259b405cdfa84d506442ec04f16401c15 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -861,8 +861,7 @@ void InstallBaselineCompilationResult(CompilationInfo* info,
}
}
-MUST_USE_RESULT MaybeHandle<Code> GetUnoptimizedCodeCommon(
- CompilationInfo* info) {
+MUST_USE_RESULT MaybeHandle<Code> GetUnoptimizedCode(CompilationInfo* info) {
VMState<COMPILER> state(info->isolate());
PostponeInterruptsScope postpone(info->isolate());
@@ -1026,21 +1025,6 @@ bool GetOptimizedCodeLater(CompilationInfo* info) {
return true;
}
-MaybeHandle<Code> GetUnoptimizedCode(Handle<JSFunction> function) {
- DCHECK(!function->GetIsolate()->has_pending_exception());
- DCHECK(!function->is_compiled());
- if (function->shared()->is_compiled()) {
- return Handle<Code>(function->shared()->code());
- }
-
- CompilationInfoWithZone info(function);
- Handle<Code> result;
- ASSIGN_RETURN_ON_EXCEPTION(info.isolate(), result,
- GetUnoptimizedCodeCommon(&info),
- Code);
- return result;
-}
-
MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
Compiler::ConcurrencyMode mode,
BailoutId osr_ast_id = BailoutId::None(),
@@ -1137,8 +1121,7 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
CompilationInfoWithZone info(function);
Handle<Code> result;
- ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCodeCommon(&info),
- Code);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCode(&info), Code);
if (FLAG_always_opt) {
Handle<Code> opt_code;
@@ -1192,7 +1175,7 @@ bool CompileEvalForDebugging(Handle<JSFunction> function,
bool CompileForDebugging(CompilationInfo* info) {
info->MarkAsDebug();
- if (GetUnoptimizedCodeCommon(info).is_null()) {
+ if (GetUnoptimizedCode(info).is_null()) {
info->isolate()->clear_pending_exception();
return false;
}
@@ -1385,8 +1368,13 @@ bool Compiler::CompileOptimized(Handle<JSFunction> function,
code = Handle<Code>(function->shared()->code(), isolate);
if (code->kind() != Code::FUNCTION &&
code->kind() != Code::OPTIMIZED_FUNCTION) {
- if (!GetUnoptimizedCode(function).ToHandle(&code)) {
- return false;
+ DCHECK(!isolate->has_pending_exception());
+ DCHECK(!function->is_compiled());
+ if (!function->shared()->is_compiled()) {
+ CompilationInfoWithZone info(function);
+ if (!GetUnoptimizedCode(&info).ToHandle(&code)) {
+ return false;
+ }
}
}
function->ReplaceCode(*code);
« 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