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/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 if (ools_) { | 140 if (ools_) { |
141 masm()->RecordComment("-- Out of line code --"); | 141 masm()->RecordComment("-- Out of line code --"); |
142 for (OutOfLineCode* ool = ools_; ool; ool = ool->next()) { | 142 for (OutOfLineCode* ool = ools_; ool; ool = ool->next()) { |
143 masm()->bind(ool->entry()); | 143 masm()->bind(ool->entry()); |
144 ool->Generate(); | 144 ool->Generate(); |
145 if (ool->exit()->is_bound()) masm()->jmp(ool->exit()); | 145 if (ool->exit()->is_bound()) masm()->jmp(ool->exit()); |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 // Ensure there is space for lazy deoptimization in the code. | 149 // Ensure there is space for lazy deoptimization in the code. |
150 if (!info->IsStub()) { | 150 if (info->ShouldEnsureSpaceForLazyDeopt()) { |
151 int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); | 151 int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); |
152 while (masm()->pc_offset() < target_offset) { | 152 while (masm()->pc_offset() < target_offset) { |
153 masm()->nop(); | 153 masm()->nop(); |
154 } | 154 } |
155 } | 155 } |
156 | 156 |
157 FinishCode(masm()); | 157 FinishCode(masm()); |
158 | 158 |
159 // Emit the jump tables. | 159 // Emit the jump tables. |
160 if (jump_tables_) { | 160 if (jump_tables_) { |
(...skipping 25 matching lines...) Expand all Loading... | |
186 : HandlerTable::UNCAUGHT; | 186 : HandlerTable::UNCAUGHT; |
187 table->SetReturnOffset(static_cast<int>(i), handlers_[i].pc_offset); | 187 table->SetReturnOffset(static_cast<int>(i), handlers_[i].pc_offset); |
188 table->SetReturnHandler(static_cast<int>(i), position, prediction); | 188 table->SetReturnHandler(static_cast<int>(i), position, prediction); |
189 } | 189 } |
190 result->set_handler_table(*table); | 190 result->set_handler_table(*table); |
191 } | 191 } |
192 | 192 |
193 PopulateDeoptimizationData(result); | 193 PopulateDeoptimizationData(result); |
194 | 194 |
195 // Ensure there is space for lazy deoptimization in the relocation info. | 195 // Ensure there is space for lazy deoptimization in the relocation info. |
196 if (!info->IsStub()) { | 196 if (!info->IsStub() && !info->IsBytecodeHandler()) { |
titzer
2015/08/21 13:37:21
Missed this one.
rmcilroy
2015/08/21 16:41:05
Done.
| |
197 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); | 197 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); |
198 } | 198 } |
199 | 199 |
200 // Emit a code line info recording stop event. | 200 // Emit a code line info recording stop event. |
201 void* line_info = recorder->DetachJITHandlerData(); | 201 void* line_info = recorder->DetachJITHandlerData(); |
202 LOG_CODE_EVENT(isolate(), CodeEndLinePosInfoRecordEvent(*result, line_info)); | 202 LOG_CODE_EVENT(isolate(), CodeEndLinePosInfoRecordEvent(*result, line_info)); |
203 | 203 |
204 return result; | 204 return result; |
205 } | 205 } |
206 | 206 |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
668 : masm_(gen->masm()), next_(gen->ools_) { | 668 : masm_(gen->masm()), next_(gen->ools_) { |
669 gen->ools_ = this; | 669 gen->ools_ = this; |
670 } | 670 } |
671 | 671 |
672 | 672 |
673 OutOfLineCode::~OutOfLineCode() {} | 673 OutOfLineCode::~OutOfLineCode() {} |
674 | 674 |
675 } // namespace compiler | 675 } // namespace compiler |
676 } // namespace internal | 676 } // namespace internal |
677 } // namespace v8 | 677 } // namespace v8 |
OLD | NEW |