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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 // For JavaScript frames we perform a range lookup in the handler table. | 1058 // For JavaScript frames we perform a range lookup in the handler table. |
1059 if (frame->is_java_script() && catchable_by_js) { | 1059 if (frame->is_java_script() && catchable_by_js) { |
1060 JavaScriptFrame* js_frame = static_cast<JavaScriptFrame*>(frame); | 1060 JavaScriptFrame* js_frame = static_cast<JavaScriptFrame*>(frame); |
1061 int stack_slots = 0; // Will contain operand stack depth of handler. | 1061 int stack_slots = 0; // Will contain operand stack depth of handler. |
1062 offset = js_frame->LookupExceptionHandlerInTable(&stack_slots); | 1062 offset = js_frame->LookupExceptionHandlerInTable(&stack_slots); |
1063 if (offset < 0) continue; | 1063 if (offset < 0) continue; |
1064 | 1064 |
1065 // Compute the stack pointer from the frame pointer. This ensures that | 1065 // Compute the stack pointer from the frame pointer. This ensures that |
1066 // operand stack slots are dropped for nested statements. Also restore | 1066 // operand stack slots are dropped for nested statements. Also restore |
1067 // correct context for the handler which is pushed within the try-block. | 1067 // correct context for the handler which is pushed within the try-block. |
1068 Address return_sp = frame->fp() - | 1068 Address return_sp = |
1069 StandardFrameConstants::kFixedFrameSizeFromFp - | 1069 frame->fp() - |
1070 stack_slots * kPointerSize; | 1070 JavaScriptFrameConstants::kUnoptimizedFixedFrameSizeFromFp - |
| 1071 stack_slots * kPointerSize; |
1071 STATIC_ASSERT(TryBlockConstant::kElementCount == 1); | 1072 STATIC_ASSERT(TryBlockConstant::kElementCount == 1); |
1072 context = Context::cast(Memory::Object_at(return_sp - kPointerSize)); | 1073 context = Context::cast(Memory::Object_at(return_sp - kPointerSize)); |
1073 | 1074 |
1074 // Gather information from the frame. | 1075 // Gather information from the frame. |
1075 code = frame->LookupCode(); | 1076 code = frame->LookupCode(); |
1076 handler_sp = return_sp; | 1077 handler_sp = return_sp; |
1077 handler_fp = frame->fp(); | 1078 handler_fp = frame->fp(); |
1078 break; | 1079 break; |
1079 } | 1080 } |
1080 } | 1081 } |
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 if (prev_ && prev_->Intercept(flag)) return true; | 2656 if (prev_ && prev_->Intercept(flag)) return true; |
2656 // Then check whether this scope intercepts. | 2657 // Then check whether this scope intercepts. |
2657 if ((flag & intercept_mask_)) { | 2658 if ((flag & intercept_mask_)) { |
2658 intercepted_flags_ |= flag; | 2659 intercepted_flags_ |= flag; |
2659 return true; | 2660 return true; |
2660 } | 2661 } |
2661 return false; | 2662 return false; |
2662 } | 2663 } |
2663 | 2664 |
2664 } } // namespace v8::internal | 2665 } } // namespace v8::internal |
OLD | NEW |