| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 Isolate* isolate_; | 60 Isolate* isolate_; |
| 61 | 61 |
| 62 static const int kInnerPointerToCodeCacheSize = 1024; | 62 static const int kInnerPointerToCodeCacheSize = 1024; |
| 63 InnerPointerToCodeCacheEntry cache_[kInnerPointerToCodeCacheSize]; | 63 InnerPointerToCodeCacheEntry cache_[kInnerPointerToCodeCacheSize]; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(InnerPointerToCodeCache); | 65 DISALLOW_COPY_AND_ASSIGN(InnerPointerToCodeCache); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 | 68 |
| 69 // Every try-block pushes the context register. | |
| 70 class TryBlockConstant : public AllStatic { | |
| 71 public: | |
| 72 static const int kElementCount = 1; | |
| 73 }; | |
| 74 | |
| 75 | |
| 76 class StackHandlerConstants : public AllStatic { | 69 class StackHandlerConstants : public AllStatic { |
| 77 public: | 70 public: |
| 78 static const int kNextOffset = 0 * kPointerSize; | 71 static const int kNextOffset = 0 * kPointerSize; |
| 79 | 72 |
| 80 static const int kSize = kNextOffset + kPointerSize; | 73 static const int kSize = kNextOffset + kPointerSize; |
| 81 static const int kSlotCount = kSize >> kPointerSizeLog2; | 74 static const int kSlotCount = kSize >> kPointerSizeLog2; |
| 82 }; | 75 }; |
| 83 | 76 |
| 84 | 77 |
| 85 class StackHandler BASE_EMBEDDED { | 78 class StackHandler BASE_EMBEDDED { |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 int index) const override; | 880 int index) const override; |
| 888 | 881 |
| 889 // Determine the code for the frame. | 882 // Determine the code for the frame. |
| 890 Code* unchecked_code() const override; | 883 Code* unchecked_code() const override; |
| 891 | 884 |
| 892 // Return a list with JSFunctions of this frame. | 885 // Return a list with JSFunctions of this frame. |
| 893 virtual void GetFunctions(List<JSFunction*>* functions) const; | 886 virtual void GetFunctions(List<JSFunction*>* functions) const; |
| 894 | 887 |
| 895 // Lookup exception handler for current {pc}, returns -1 if none found. Also | 888 // Lookup exception handler for current {pc}, returns -1 if none found. Also |
| 896 // returns data associated with the handler site specific to the frame type: | 889 // returns data associated with the handler site specific to the frame type: |
| 897 // - JavaScriptFrame : Data is the stack depth at entry of the try-block. | |
| 898 // - OptimizedFrame : Data is the stack slot count of the entire frame. | 890 // - OptimizedFrame : Data is the stack slot count of the entire frame. |
| 899 // - InterpretedFrame: Data is the register index holding the context. | 891 // - InterpretedFrame: Data is the register index holding the context. |
| 900 virtual int LookupExceptionHandlerInTable( | 892 virtual int LookupExceptionHandlerInTable( |
| 901 int* data, HandlerTable::CatchPrediction* prediction); | 893 int* data, HandlerTable::CatchPrediction* prediction); |
| 902 | 894 |
| 903 // Architecture-specific register description. | 895 // Architecture-specific register description. |
| 904 static Register fp_register(); | 896 static Register fp_register(); |
| 905 static Register context_register(); | 897 static Register context_register(); |
| 906 static Register constant_pool_pointer_register(); | 898 static Register constant_pool_pointer_register(); |
| 907 | 899 |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 | 1360 |
| 1369 | 1361 |
| 1370 // Reads all frames on the current stack and copies them into the current | 1362 // Reads all frames on the current stack and copies them into the current |
| 1371 // zone memory. | 1363 // zone memory. |
| 1372 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 1364 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 1373 | 1365 |
| 1374 } // namespace internal | 1366 } // namespace internal |
| 1375 } // namespace v8 | 1367 } // namespace v8 |
| 1376 | 1368 |
| 1377 #endif // V8_FRAMES_H_ | 1369 #endif // V8_FRAMES_H_ |
| OLD | NEW |