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 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 Handle<AbstractCode> code = summary.abstract_code(); | 1337 Handle<AbstractCode> code = summary.abstract_code(); |
1338 if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { | 1338 if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { |
1339 DCHECK(summary.function()->shared()->asm_function()); | 1339 DCHECK(summary.function()->shared()->asm_function()); |
1340 DCHECK(!FLAG_turbo_asm_deoptimization); | 1340 DCHECK(!FLAG_turbo_asm_deoptimization); |
1341 // asm code cannot contain try-catch. | 1341 // asm code cannot contain try-catch. |
1342 continue; | 1342 continue; |
1343 } | 1343 } |
1344 // Must have been constructed from a bytecode array. | 1344 // Must have been constructed from a bytecode array. |
1345 CHECK_EQ(AbstractCode::INTERPRETED_FUNCTION, code->kind()); | 1345 CHECK_EQ(AbstractCode::INTERPRETED_FUNCTION, code->kind()); |
1346 int code_offset = summary.code_offset(); | 1346 int code_offset = summary.code_offset(); |
1347 int index = code->GetBytecodeArray()->LookupRangeInHandlerTable( | 1347 BytecodeArray* bytecode = code->GetBytecodeArray(); |
1348 code_offset, nullptr, &prediction); | 1348 HandlerTable* table = HandlerTable::cast(bytecode->handler_table()); |
| 1349 int index = table->LookupRange(code_offset, nullptr, &prediction); |
1349 if (index <= 0) continue; | 1350 if (index <= 0) continue; |
1350 if (prediction == HandlerTable::UNCAUGHT) continue; | 1351 if (prediction == HandlerTable::UNCAUGHT) continue; |
1351 return prediction; | 1352 return prediction; |
1352 } | 1353 } |
1353 } | 1354 } |
1354 } else if (frame->LookupExceptionHandlerInTable(nullptr, &prediction) > 0) { | 1355 } else if (frame->LookupExceptionHandlerInTable(nullptr, &prediction) > 0) { |
1355 return prediction; | 1356 return prediction; |
1356 } | 1357 } |
1357 return HandlerTable::UNCAUGHT; | 1358 return HandlerTable::UNCAUGHT; |
1358 } | 1359 } |
(...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3499 // Then check whether this scope intercepts. | 3500 // Then check whether this scope intercepts. |
3500 if ((flag & intercept_mask_)) { | 3501 if ((flag & intercept_mask_)) { |
3501 intercepted_flags_ |= flag; | 3502 intercepted_flags_ |= flag; |
3502 return true; | 3503 return true; |
3503 } | 3504 } |
3504 return false; | 3505 return false; |
3505 } | 3506 } |
3506 | 3507 |
3507 } // namespace internal | 3508 } // namespace internal |
3508 } // namespace v8 | 3509 } // namespace v8 |
OLD | NEW |