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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 HandlerTable::CatchPrediction prediction; | 1328 HandlerTable::CatchPrediction prediction; |
1329 if (frame->is_optimized()) { | 1329 if (frame->is_optimized()) { |
1330 if (frame->LookupExceptionHandlerInTable(nullptr, nullptr) > 0) { | 1330 if (frame->LookupExceptionHandlerInTable(nullptr, nullptr) > 0) { |
1331 // This optimized frame will catch. It's handler table does not include | 1331 // This optimized frame will catch. It's handler table does not include |
1332 // exception prediction, and we need to use the corresponding handler | 1332 // exception prediction, and we need to use the corresponding handler |
1333 // tables on the unoptimized code objects. | 1333 // tables on the unoptimized code objects. |
1334 List<FrameSummary> summaries; | 1334 List<FrameSummary> summaries; |
1335 frame->Summarize(&summaries); | 1335 frame->Summarize(&summaries); |
1336 for (const FrameSummary& summary : summaries) { | 1336 for (const FrameSummary& summary : summaries) { |
1337 Handle<AbstractCode> code = summary.abstract_code(); | 1337 Handle<AbstractCode> code = summary.abstract_code(); |
| 1338 if (code->IsCode() && code->kind() == AbstractCode::BUILTIN && |
| 1339 code->GetCode()->is_promise_rejection()) { |
| 1340 return HandlerTable::PROMISE; |
| 1341 } |
1338 if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { | 1342 if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { |
1339 DCHECK(summary.function()->shared()->asm_function()); | 1343 DCHECK(summary.function()->shared()->asm_function()); |
1340 DCHECK(!FLAG_turbo_asm_deoptimization); | 1344 DCHECK(!FLAG_turbo_asm_deoptimization); |
1341 // asm code cannot contain try-catch. | 1345 // asm code cannot contain try-catch. |
1342 continue; | 1346 continue; |
1343 } | 1347 } |
1344 // Must have been constructed from a bytecode array. | 1348 // Must have been constructed from a bytecode array. |
1345 CHECK_EQ(AbstractCode::INTERPRETED_FUNCTION, code->kind()); | 1349 CHECK_EQ(AbstractCode::INTERPRETED_FUNCTION, code->kind()); |
1346 int code_offset = summary.code_offset(); | 1350 int code_offset = summary.code_offset(); |
1347 BytecodeArray* bytecode = code->GetBytecodeArray(); | 1351 BytecodeArray* bytecode = code->GetBytecodeArray(); |
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3500 // Then check whether this scope intercepts. | 3504 // Then check whether this scope intercepts. |
3501 if ((flag & intercept_mask_)) { | 3505 if ((flag & intercept_mask_)) { |
3502 intercepted_flags_ |= flag; | 3506 intercepted_flags_ |= flag; |
3503 return true; | 3507 return true; |
3504 } | 3508 } |
3505 return false; | 3509 return false; |
3506 } | 3510 } |
3507 | 3511 |
3508 } // namespace internal | 3512 } // namespace internal |
3509 } // namespace v8 | 3513 } // namespace v8 |
OLD | NEW |