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

Side by Side Diff: src/compiler/code-generator.cc

Issue 1490233009: [heap] Make link from optimized code to inlined code explicit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Allow handle deref. Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/crankshaft/lithium-codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/address-map.h" 7 #include "src/address-map.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Define deoptimization literals for all inlined functions. 86 // Define deoptimization literals for all inlined functions.
87 DCHECK_EQ(0u, deoptimization_literals_.size()); 87 DCHECK_EQ(0u, deoptimization_literals_.size());
88 for (auto& inlined : info->inlined_functions()) { 88 for (auto& inlined : info->inlined_functions()) {
89 if (!inlined.shared_info.is_identical_to(info->shared_info())) { 89 if (!inlined.shared_info.is_identical_to(info->shared_info())) {
90 DefineDeoptimizationLiteral(inlined.shared_info); 90 DefineDeoptimizationLiteral(inlined.shared_info);
91 } 91 }
92 } 92 }
93 inlined_function_count_ = deoptimization_literals_.size(); 93 inlined_function_count_ = deoptimization_literals_.size();
94 94
95 // Define deoptimization literals for all unoptimized code objects of inlined
96 // functions. This ensures unoptimized code is kept alive by optimized code.
97 for (auto& inlined : info->inlined_functions()) {
98 if (!inlined.shared_info.is_identical_to(info->shared_info())) {
99 DefineDeoptimizationLiteral(inlined.inlined_code_object_root);
100 }
101 }
102
95 // Assemble all non-deferred blocks, followed by deferred ones. 103 // Assemble all non-deferred blocks, followed by deferred ones.
96 for (int deferred = 0; deferred < 2; ++deferred) { 104 for (int deferred = 0; deferred < 2; ++deferred) {
97 for (auto const block : code()->instruction_blocks()) { 105 for (auto const block : code()->instruction_blocks()) {
98 if (block->IsDeferred() == (deferred == 0)) { 106 if (block->IsDeferred() == (deferred == 0)) {
99 continue; 107 continue;
100 } 108 }
101 // Align loop headers on 16-byte boundaries. 109 // Align loop headers on 16-byte boundaries.
102 if (block->IsLoopHeader()) masm()->Align(16); 110 if (block->IsLoopHeader()) masm()->Align(16);
103 // Ensure lazy deopt doesn't patch handler entry points. 111 // Ensure lazy deopt doesn't patch handler entry points.
104 if (block->IsHandler()) EnsureSpaceForLazyDeopt(); 112 if (block->IsHandler()) EnsureSpaceForLazyDeopt();
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { 697 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) {
690 gen->ools_ = this; 698 gen->ools_ = this;
691 } 699 }
692 700
693 701
694 OutOfLineCode::~OutOfLineCode() {} 702 OutOfLineCode::~OutOfLineCode() {}
695 703
696 } // namespace compiler 704 } // namespace compiler
697 } // namespace internal 705 } // namespace internal
698 } // namespace v8 706 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/lithium-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698