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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 DCHECK_NE(StackHandler::JS_ENTRY, handler->kind()); | 1088 DCHECK_NE(StackHandler::JS_ENTRY, handler->kind()); |
1089 | 1089 |
1090 // Restore the next handler. | 1090 // Restore the next handler. |
1091 thread_local_top()->handler_ = handler->next()->address(); | 1091 thread_local_top()->handler_ = handler->next()->address(); |
1092 | 1092 |
1093 // Gather information from the handler. | 1093 // Gather information from the handler. |
1094 code = frame->LookupCode(); | 1094 code = frame->LookupCode(); |
1095 context = handler->context(); | 1095 context = handler->context(); |
1096 offset = Smi::cast(code->handler_table()->get(handler->index()))->value(); | 1096 offset = Smi::cast(code->handler_table()->get(handler->index()))->value(); |
1097 handler_sp = handler->address() + StackHandlerConstants::kSize; | 1097 handler_sp = handler->address() + StackHandlerConstants::kSize; |
1098 handler_fp = handler->frame_pointer(); | 1098 handler_fp = frame->fp(); |
1099 break; | 1099 break; |
1100 } | 1100 } |
1101 | 1101 |
1102 // For optimized frames we perform a lookup in the handler table. | 1102 // For optimized frames we perform a lookup in the handler table. |
1103 if (frame->is_optimized() && catchable_by_js) { | 1103 if (frame->is_optimized() && catchable_by_js) { |
1104 Code* frame_code = frame->LookupCode(); | 1104 Code* frame_code = frame->LookupCode(); |
1105 DCHECK(frame_code->is_optimized_code()); | 1105 DCHECK(frame_code->is_optimized_code()); |
1106 int pc_offset = static_cast<int>(frame->pc() - frame_code->entry()); | 1106 int pc_offset = static_cast<int>(frame->pc() - frame_code->entry()); |
1107 int handler_offset = LookupInHandlerTable(frame_code, pc_offset); | 1107 int handler_offset = LookupInHandlerTable(frame_code, pc_offset); |
1108 if (handler_offset < 0) continue; | 1108 if (handler_offset < 0) continue; |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 if (prev_ && prev_->Intercept(flag)) return true; | 2659 if (prev_ && prev_->Intercept(flag)) return true; |
2660 // Then check whether this scope intercepts. | 2660 // Then check whether this scope intercepts. |
2661 if ((flag & intercept_mask_)) { | 2661 if ((flag & intercept_mask_)) { |
2662 intercepted_flags_ |= flag; | 2662 intercepted_flags_ |= flag; |
2663 return true; | 2663 return true; |
2664 } | 2664 } |
2665 return false; | 2665 return false; |
2666 } | 2666 } |
2667 | 2667 |
2668 } } // namespace v8::internal | 2668 } } // namespace v8::internal |
OLD | NEW |