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 #ifndef V8_FRAMES_H_ | 5 #ifndef V8_FRAMES_H_ |
6 #define V8_FRAMES_H_ | 6 #define V8_FRAMES_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/safepoint-table.h" | 10 #include "src/safepoint-table.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 440 } |
441 bool is_construct() const { return type() == CONSTRUCT; } | 441 bool is_construct() const { return type() == CONSTRUCT; } |
442 bool is_builtin_exit() const { return type() == BUILTIN_EXIT; } | 442 bool is_builtin_exit() const { return type() == BUILTIN_EXIT; } |
443 virtual bool is_standard() const { return false; } | 443 virtual bool is_standard() const { return false; } |
444 | 444 |
445 bool is_java_script() const { | 445 bool is_java_script() const { |
446 Type type = this->type(); | 446 Type type = this->type(); |
447 return (type == JAVA_SCRIPT) || (type == OPTIMIZED) || | 447 return (type == JAVA_SCRIPT) || (type == OPTIMIZED) || |
448 (type == INTERPRETED) || (type == BUILTIN); | 448 (type == INTERPRETED) || (type == BUILTIN); |
449 } | 449 } |
| 450 bool is_stub() const { return type() == STUB; } |
450 | 451 |
451 // Accessors. | 452 // Accessors. |
452 Address sp() const { return state_.sp; } | 453 Address sp() const { return state_.sp; } |
453 Address fp() const { return state_.fp; } | 454 Address fp() const { return state_.fp; } |
454 Address caller_sp() const { return GetCallerStackPointer(); } | 455 Address caller_sp() const { return GetCallerStackPointer(); } |
455 | 456 |
456 // If this frame is optimized and was dynamically aligned return its old | 457 // If this frame is optimized and was dynamically aligned return its old |
457 // unaligned frame pointer. When the frame is deoptimized its FP will shift | 458 // unaligned frame pointer. When the frame is deoptimized its FP will shift |
458 // up one word and become unaligned. | 459 // up one word and become unaligned. |
459 Address UnpaddedFP() const; | 460 Address UnpaddedFP() const; |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 class StubFrame : public StandardFrame { | 903 class StubFrame : public StandardFrame { |
903 public: | 904 public: |
904 Type type() const override { return STUB; } | 905 Type type() const override { return STUB; } |
905 | 906 |
906 // GC support. | 907 // GC support. |
907 void Iterate(ObjectVisitor* v) const override; | 908 void Iterate(ObjectVisitor* v) const override; |
908 | 909 |
909 // Determine the code for the frame. | 910 // Determine the code for the frame. |
910 Code* unchecked_code() const override; | 911 Code* unchecked_code() const override; |
911 | 912 |
| 913 int LookupExceptionHandlerInTable(int* data, |
| 914 HandlerTable::CatchPrediction* prediction); |
| 915 |
| 916 static StubFrame* cast(StackFrame* frame) { |
| 917 DCHECK(frame->is_stub()); |
| 918 return static_cast<StubFrame*>(frame); |
| 919 } |
| 920 |
912 protected: | 921 protected: |
913 inline explicit StubFrame(StackFrameIteratorBase* iterator); | 922 inline explicit StubFrame(StackFrameIteratorBase* iterator); |
914 | 923 |
915 Address GetCallerStackPointer() const override; | 924 Address GetCallerStackPointer() const override; |
916 | 925 |
917 virtual int GetNumberOfIncomingArguments() const; | 926 virtual int GetNumberOfIncomingArguments() const; |
918 | 927 |
919 friend class StackFrameIteratorBase; | 928 friend class StackFrameIteratorBase; |
920 }; | 929 }; |
921 | 930 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 | 1327 |
1319 | 1328 |
1320 // Reads all frames on the current stack and copies them into the current | 1329 // Reads all frames on the current stack and copies them into the current |
1321 // zone memory. | 1330 // zone memory. |
1322 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 1331 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
1323 | 1332 |
1324 } // namespace internal | 1333 } // namespace internal |
1325 } // namespace v8 | 1334 } // namespace v8 |
1326 | 1335 |
1327 #endif // V8_FRAMES_H_ | 1336 #endif // V8_FRAMES_H_ |
OLD | NEW |