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

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

Issue 2205893002: Remove catch prediction from handler table API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-remove-catch-prediction
Patch Set: Remove dead code. Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/objects.h » ('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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698