OLD | NEW |
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/base/adapters.h" | 8 #include "src/base/adapters.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 ProfileEntryHookStub::MaybeCallEntryHook(masm()); | 84 ProfileEntryHookStub::MaybeCallEntryHook(masm()); |
85 } | 85 } |
86 // Architecture-specific, linkage-specific prologue. | 86 // Architecture-specific, linkage-specific prologue. |
87 info->set_prologue_offset(masm()->pc_offset()); | 87 info->set_prologue_offset(masm()->pc_offset()); |
88 | 88 |
89 // Define deoptimization literals for all inlined functions. | 89 // Define deoptimization literals for all inlined functions. |
90 DCHECK_EQ(0u, deoptimization_literals_.size()); | 90 DCHECK_EQ(0u, deoptimization_literals_.size()); |
91 for (CompilationInfo::InlinedFunctionHolder& inlined : | 91 for (CompilationInfo::InlinedFunctionHolder& inlined : |
92 info->inlined_functions()) { | 92 info->inlined_functions()) { |
93 if (!inlined.shared_info.is_identical_to(info->shared_info())) { | 93 if (!inlined.shared_info.is_identical_to(info->shared_info())) { |
94 inlined.RegisterInlinedFunctionId(deoptimization_literals_.size()); | 94 int index = DefineDeoptimizationLiteral(inlined.shared_info); |
95 DefineDeoptimizationLiteral(inlined.shared_info); | 95 inlined.RegisterInlinedFunctionId(index); |
96 } | 96 } |
97 } | 97 } |
98 inlined_function_count_ = deoptimization_literals_.size(); | 98 inlined_function_count_ = deoptimization_literals_.size(); |
99 | 99 |
100 // Define deoptimization literals for all unoptimized code objects of inlined | 100 // Define deoptimization literals for all unoptimized code objects of inlined |
101 // functions. This ensures unoptimized code is kept alive by optimized code. | 101 // functions. This ensures unoptimized code is kept alive by optimized code. |
102 for (const CompilationInfo::InlinedFunctionHolder& inlined : | 102 for (const CompilationInfo::InlinedFunctionHolder& inlined : |
103 info->inlined_functions()) { | 103 info->inlined_functions()) { |
104 if (!inlined.shared_info.is_identical_to(info->shared_info())) { | 104 if (!inlined.shared_info.is_identical_to(info->shared_info())) { |
105 DefineDeoptimizationLiteral(inlined.inlined_code_object_root); | 105 DefineDeoptimizationLiteral(inlined.inlined_code_object_root); |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { | 961 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { |
962 gen->ools_ = this; | 962 gen->ools_ = this; |
963 } | 963 } |
964 | 964 |
965 | 965 |
966 OutOfLineCode::~OutOfLineCode() {} | 966 OutOfLineCode::~OutOfLineCode() {} |
967 | 967 |
968 } // namespace compiler | 968 } // namespace compiler |
969 } // namespace internal | 969 } // namespace internal |
970 } // namespace v8 | 970 } // namespace v8 |
OLD | NEW |