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/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 result->set_source_position_table(*source_positions); | 221 result->set_source_position_table(*source_positions); |
222 source_position_table_builder_.EndJitLogging(AbstractCode::cast(*result)); | 222 source_position_table_builder_.EndJitLogging(AbstractCode::cast(*result)); |
223 | 223 |
224 // Emit exception handler table. | 224 // Emit exception handler table. |
225 if (!handlers_.empty()) { | 225 if (!handlers_.empty()) { |
226 Handle<HandlerTable> table = | 226 Handle<HandlerTable> table = |
227 Handle<HandlerTable>::cast(isolate()->factory()->NewFixedArray( | 227 Handle<HandlerTable>::cast(isolate()->factory()->NewFixedArray( |
228 HandlerTable::LengthForReturn(static_cast<int>(handlers_.size())), | 228 HandlerTable::LengthForReturn(static_cast<int>(handlers_.size())), |
229 TENURED)); | 229 TENURED)); |
230 for (size_t i = 0; i < handlers_.size(); ++i) { | 230 for (size_t i = 0; i < handlers_.size(); ++i) { |
231 int position = handlers_[i].handler->pos(); | |
232 HandlerTable::CatchPrediction prediction = HandlerTable::UNCAUGHT; | |
233 table->SetReturnOffset(static_cast<int>(i), handlers_[i].pc_offset); | 231 table->SetReturnOffset(static_cast<int>(i), handlers_[i].pc_offset); |
234 table->SetReturnHandler(static_cast<int>(i), position, prediction); | 232 table->SetReturnHandler(static_cast<int>(i), handlers_[i].handler->pos()); |
235 } | 233 } |
236 result->set_handler_table(*table); | 234 result->set_handler_table(*table); |
237 } | 235 } |
238 | 236 |
239 PopulateDeoptimizationData(result); | 237 PopulateDeoptimizationData(result); |
240 | 238 |
241 // Ensure there is space for lazy deoptimization in the relocation info. | 239 // Ensure there is space for lazy deoptimization in the relocation info. |
242 if (info->ShouldEnsureSpaceForLazyDeopt()) { | 240 if (info->ShouldEnsureSpaceForLazyDeopt()) { |
243 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); | 241 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); |
244 } | 242 } |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { | 917 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { |
920 gen->ools_ = this; | 918 gen->ools_ = this; |
921 } | 919 } |
922 | 920 |
923 | 921 |
924 OutOfLineCode::~OutOfLineCode() {} | 922 OutOfLineCode::~OutOfLineCode() {} |
925 | 923 |
926 } // namespace compiler | 924 } // namespace compiler |
927 } // namespace internal | 925 } // namespace internal |
928 } // namespace v8 | 926 } // namespace v8 |
OLD | NEW |