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

Unified Diff: src/compiler.cc

Issue 1812923002: [compiler] Remove CompilationInfo::unoptimized_code field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/compiler.h ('k') | 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 32120df9e304e31a6115dc507180a9ccd12248de..289da722b61ff35040fa1fb0d1c707f28b12b181 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1086,20 +1086,20 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
DCHECK(AllowCompilation::IsAllowed(isolate));
- Handle<Code> current_code(shared->code());
if (!shared->is_compiled() ||
shared->scope_info() == ScopeInfo::Empty(isolate)) {
// The function was never compiled. Compile it unoptimized first.
// TODO(titzer): reuse the AST and scope info from this compile.
CompilationInfoWithZone unoptimized(function);
unoptimized.EnableDeoptimizationSupport();
- if (!GetUnoptimizedCodeCommon(&unoptimized).ToHandle(&current_code)) {
+ Handle<Code> unoptimized_code;
+ if (!GetUnoptimizedCodeCommon(&unoptimized).ToHandle(&unoptimized_code)) {
return MaybeHandle<Code>();
}
- shared->ReplaceCode(*current_code);
+ shared->ReplaceCode(*unoptimized_code);
}
- current_code->set_profiler_ticks(0);
+ shared->code()->set_profiler_ticks(0);
// TODO(mstarzinger): We cannot properly deserialize a scope chain containing
// an eval scope and hence would fail at parsing the eval source again.
@@ -1119,7 +1119,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
DCHECK(!isolate->has_pending_exception());
PostponeInterruptsScope postpone(isolate);
- info->SetOptimizingForOsr(osr_ast_id, current_code);
+ info->SetOptimizingForOsr(osr_ast_id);
if (mode == Compiler::CONCURRENT) {
if (GetOptimizedCodeLater(info.get())) {
« no previous file with comments | « src/compiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698