OLD | NEW |
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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 HandlerTable::CatchPrediction prediction; | 1334 HandlerTable::CatchPrediction prediction; |
1335 if (frame->is_optimized()) { | 1335 if (frame->is_optimized()) { |
1336 if (frame->LookupExceptionHandlerInTable(nullptr, nullptr) > 0) { | 1336 if (frame->LookupExceptionHandlerInTable(nullptr, nullptr) > 0) { |
1337 // This optimized frame will catch. It's handler table does not include | 1337 // This optimized frame will catch. It's handler table does not include |
1338 // exception prediction, and we need to use the corresponding handler | 1338 // exception prediction, and we need to use the corresponding handler |
1339 // tables on the unoptimized code objects. | 1339 // tables on the unoptimized code objects. |
1340 List<FrameSummary> summaries; | 1340 List<FrameSummary> summaries; |
1341 frame->Summarize(&summaries); | 1341 frame->Summarize(&summaries); |
1342 for (const FrameSummary& summary : summaries) { | 1342 for (const FrameSummary& summary : summaries) { |
1343 Handle<AbstractCode> code = summary.abstract_code(); | 1343 Handle<AbstractCode> code = summary.abstract_code(); |
| 1344 if (code->IsCode() && code->GetCode()->exception_hint() == 1) { |
| 1345 return HandlerTable::PROMISE; |
| 1346 } |
1344 if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { | 1347 if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { |
1345 DCHECK(summary.function()->shared()->asm_function()); | 1348 DCHECK(summary.function()->shared()->asm_function()); |
1346 DCHECK(!FLAG_turbo_asm_deoptimization); | 1349 DCHECK(!FLAG_turbo_asm_deoptimization); |
1347 // asm code cannot contain try-catch. | 1350 // asm code cannot contain try-catch. |
1348 continue; | 1351 continue; |
1349 } | 1352 } |
1350 int code_offset = summary.code_offset(); | 1353 int code_offset = summary.code_offset(); |
1351 int index = | 1354 int index = |
1352 code->LookupRangeInHandlerTable(code_offset, nullptr, &prediction); | 1355 code->LookupRangeInHandlerTable(code_offset, nullptr, &prediction); |
1353 if (index <= 0) continue; | 1356 if (index <= 0) continue; |
(...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3503 // Then check whether this scope intercepts. | 3506 // Then check whether this scope intercepts. |
3504 if ((flag & intercept_mask_)) { | 3507 if ((flag & intercept_mask_)) { |
3505 intercepted_flags_ |= flag; | 3508 intercepted_flags_ |= flag; |
3506 return true; | 3509 return true; |
3507 } | 3510 } |
3508 return false; | 3511 return false; |
3509 } | 3512 } |
3510 | 3513 |
3511 } // namespace internal | 3514 } // namespace internal |
3512 } // namespace v8 | 3515 } // namespace v8 |
OLD | NEW |