OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 | 42 |
43 // Return the code of the n-th saved register available to JavaScript. | 43 // Return the code of the n-th saved register available to JavaScript. |
44 int JSCallerSavedCode(int n); | 44 int JSCallerSavedCode(int n); |
45 | 45 |
46 | 46 |
47 // Forward declarations. | 47 // Forward declarations. |
48 class StackFrameIterator; | 48 class StackFrameIterator; |
49 class ThreadLocalTop; | 49 class ThreadLocalTop; |
50 class Isolate; | 50 class Isolate; |
51 | 51 |
52 class PcToCodeCache { | 52 class InnerPointerToCodeCache { |
53 public: | 53 public: |
54 struct PcToCodeCacheEntry { | 54 struct InnerPointerToCodeCacheEntry { |
55 Address pc; | 55 Address inner_pointer; |
56 Code* code; | 56 Code* code; |
57 SafepointEntry safepoint_entry; | 57 SafepointEntry safepoint_entry; |
58 }; | 58 }; |
59 | 59 |
60 explicit PcToCodeCache(Isolate* isolate) : isolate_(isolate) { | 60 explicit InnerPointerToCodeCache(Isolate* isolate) : isolate_(isolate) { |
61 Flush(); | 61 Flush(); |
62 } | 62 } |
63 | 63 |
64 Code* GcSafeFindCodeForPc(Address pc); | 64 Code* GcSafeFindCodeForInnerPointer(Address pc); |
Rico
2011/09/20 09:38:45
address instead of pc?
Erik Corry
2011/09/20 09:44:11
Done.
| |
65 Code* GcSafeCastToCode(HeapObject* object, Address pc); | 65 Code* GcSafeCastToCode(HeapObject* object, Address pc); |
Rico
2011/09/20 09:38:45
same as above
Erik Corry
2011/09/20 09:44:11
Done.
| |
66 | 66 |
67 void Flush() { | 67 void Flush() { |
68 memset(&cache_[0], 0, sizeof(cache_)); | 68 memset(&cache_[0], 0, sizeof(cache_)); |
69 } | 69 } |
70 | 70 |
71 PcToCodeCacheEntry* GetCacheEntry(Address pc); | 71 InnerPointerToCodeCacheEntry* GetCacheEntry(Address pc); |
Rico
2011/09/20 09:38:45
same as above
Erik Corry
2011/09/20 09:44:11
Done.
| |
72 | 72 |
73 private: | 73 private: |
74 PcToCodeCacheEntry* cache(int index) { return &cache_[index]; } | 74 InnerPointerToCodeCacheEntry* cache(int index) { return &cache_[index]; } |
75 | 75 |
76 Isolate* isolate_; | 76 Isolate* isolate_; |
77 | 77 |
78 static const int kPcToCodeCacheSize = 1024; | 78 static const int kPcToCodeCacheSize = 1024; |
79 PcToCodeCacheEntry cache_[kPcToCodeCacheSize]; | 79 InnerPointerToCodeCacheEntry cache_[kPcToCodeCacheSize]; |
Rico
2011/09/20 09:38:45
kAddressToCodeCacheSize?
Erik Corry
2011/09/20 09:44:11
kInnerPointerToCodeCacheSize
| |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(PcToCodeCache); | 81 DISALLOW_COPY_AND_ASSIGN(InnerPointerToCodeCache); |
82 }; | 82 }; |
83 | 83 |
84 | 84 |
85 class StackHandler BASE_EMBEDDED { | 85 class StackHandler BASE_EMBEDDED { |
86 public: | 86 public: |
87 enum State { | 87 enum State { |
88 ENTRY, | 88 ENTRY, |
89 TRY_CATCH, | 89 TRY_CATCH, |
90 TRY_FINALLY | 90 TRY_FINALLY |
91 }; | 91 }; |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
872 }; | 872 }; |
873 | 873 |
874 | 874 |
875 // Reads all frames on the current stack and copies them into the current | 875 // Reads all frames on the current stack and copies them into the current |
876 // zone memory. | 876 // zone memory. |
877 Vector<StackFrame*> CreateStackMap(); | 877 Vector<StackFrame*> CreateStackMap(); |
878 | 878 |
879 } } // namespace v8::internal | 879 } } // namespace v8::internal |
880 | 880 |
881 #endif // V8_FRAMES_H_ | 881 #endif // V8_FRAMES_H_ |
OLD | NEW |