| 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 // For JSEntryStub frames we always have a handler. | 1069 // For JSEntryStub frames we always have a handler. |
| 1070 if (frame->is_entry() || frame->is_entry_construct()) { | 1070 if (frame->is_entry() || frame->is_entry_construct()) { |
| 1071 StackHandler* handler = frame->top_handler(); | 1071 StackHandler* handler = frame->top_handler(); |
| 1072 DCHECK_EQ(StackHandler::JS_ENTRY, handler->kind()); | 1072 DCHECK_EQ(StackHandler::JS_ENTRY, handler->kind()); |
| 1073 DCHECK_EQ(0, handler->index()); | 1073 DCHECK_EQ(0, handler->index()); |
| 1074 | 1074 |
| 1075 // Restore the next handler. | 1075 // Restore the next handler. |
| 1076 thread_local_top()->handler_ = handler->next()->address(); | 1076 thread_local_top()->handler_ = handler->next()->address(); |
| 1077 | 1077 |
| 1078 // Gather information from the handler. | 1078 // Gather information from the handler. |
| 1079 code = handler->code(); | 1079 code = frame->LookupCode(); |
| 1080 handler_sp = handler->address() + StackHandlerConstants::kSize; | 1080 handler_sp = handler->address() + StackHandlerConstants::kSize; |
| 1081 offset = Smi::cast(code->handler_table()->get(0))->value(); | 1081 offset = Smi::cast(code->handler_table()->get(0))->value(); |
| 1082 break; | 1082 break; |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 // For JavaScript frames which have a handler, we use the handler. | 1085 // For JavaScript frames which have a handler, we use the handler. |
| 1086 if (frame->is_java_script() && catchable_by_js && frame->HasHandler()) { | 1086 if (frame->is_java_script() && catchable_by_js && frame->HasHandler()) { |
| 1087 StackHandler* handler = frame->top_handler(); | 1087 StackHandler* handler = frame->top_handler(); |
| 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 = handler->code(); | 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 = handler->frame_pointer(); |
| 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(); |
| (...skipping 1554 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 |