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

Side by Side Diff: src/isolate.cc

Issue 2215713002: [debug] fix exception prediction for asm frames. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test 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 | test/mjsunit/regress/regress-crbug-633999.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 HandlerTable::CatchPrediction PredictException(JavaScriptFrame* frame) { 1302 HandlerTable::CatchPrediction PredictException(JavaScriptFrame* frame) {
1303 HandlerTable::CatchPrediction prediction; 1303 HandlerTable::CatchPrediction prediction;
1304 if (frame->is_optimized()) { 1304 if (frame->is_optimized()) {
1305 if (frame->LookupExceptionHandlerInTable(nullptr, nullptr) > 0) { 1305 if (frame->LookupExceptionHandlerInTable(nullptr, nullptr) > 0) {
1306 // This optimized frame will catch. It's handler table does not include 1306 // This optimized frame will catch. It's handler table does not include
1307 // exception prediction, and we need to use the corresponding handler 1307 // exception prediction, and we need to use the corresponding handler
1308 // tables on the unoptimized code objects. 1308 // tables on the unoptimized code objects.
1309 List<FrameSummary> summaries; 1309 List<FrameSummary> summaries;
1310 frame->Summarize(&summaries); 1310 frame->Summarize(&summaries);
1311 for (const FrameSummary& summary : summaries) { 1311 for (const FrameSummary& summary : summaries) {
1312 Handle<AbstractCode> code = summary.abstract_code();
1313 if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) {
1314 DCHECK(summary.function()->shared()->asm_function());
1315 DCHECK(!FLAG_turbo_asm_deoptimization);
1316 // asm code cannot contain try-catch.
1317 continue;
1318 }
1312 int code_offset = summary.code_offset(); 1319 int code_offset = summary.code_offset();
1313 int index = summary.abstract_code()->LookupRangeInHandlerTable( 1320 int index =
1314 code_offset, nullptr, &prediction); 1321 code->LookupRangeInHandlerTable(code_offset, nullptr, &prediction);
1315 if (index <= 0) continue; 1322 if (index <= 0) continue;
1316 if (prediction == HandlerTable::UNCAUGHT) continue; 1323 if (prediction == HandlerTable::UNCAUGHT) continue;
1317 return prediction; 1324 return prediction;
1318 } 1325 }
1319 } 1326 }
1320 } else if (frame->LookupExceptionHandlerInTable(nullptr, &prediction) > 0) { 1327 } else if (frame->LookupExceptionHandlerInTable(nullptr, &prediction) > 0) {
1321 return prediction; 1328 return prediction;
1322 } 1329 }
1323 return HandlerTable::UNCAUGHT; 1330 return HandlerTable::UNCAUGHT;
1324 } 1331 }
(...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 // Then check whether this scope intercepts. 3212 // Then check whether this scope intercepts.
3206 if ((flag & intercept_mask_)) { 3213 if ((flag & intercept_mask_)) {
3207 intercepted_flags_ |= flag; 3214 intercepted_flags_ |= flag;
3208 return true; 3215 return true;
3209 } 3216 }
3210 return false; 3217 return false;
3211 } 3218 }
3212 3219
3213 } // namespace internal 3220 } // namespace internal
3214 } // namespace v8 3221 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-633999.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698