Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Side by Side Diff: src/frames.h

Issue 6125007: Allow arguments in safepoints with registers. (Closed)
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/frames.cc » ('j') | src/ia32/deoptimizer-ia32.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 10 matching lines...) Expand all
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_FRAMES_H_ 28 #ifndef V8_FRAMES_H_
29 #define V8_FRAMES_H_ 29 #define V8_FRAMES_H_
30 30
31 #include "safepoint-table.h"
32
31 namespace v8 { 33 namespace v8 {
32 namespace internal { 34 namespace internal {
33 35
34 typedef uint32_t RegList; 36 typedef uint32_t RegList;
35 37
36 // Get the number of registers in a given register list. 38 // Get the number of registers in a given register list.
37 int NumRegs(RegList list); 39 int NumRegs(RegList list);
38 40
39 // Return the code of the n-th saved register available to JavaScript. 41 // Return the code of the n-th saved register available to JavaScript.
40 int JSCallerSavedCode(int n); 42 int JSCallerSavedCode(int n);
41 43
42 44
43 // Forward declarations. 45 // Forward declarations.
44 class StackFrameIterator; 46 class StackFrameIterator;
45 class Top; 47 class Top;
46 class ThreadLocalTop; 48 class ThreadLocalTop;
47 49
48 50
49 class PcToCodeCache : AllStatic { 51 class PcToCodeCache : AllStatic {
50 public: 52 public:
51 struct PcToCodeCacheEntry { 53 struct PcToCodeCacheEntry {
52 Address pc; 54 Address pc;
53 Code* code; 55 Code* code;
54 uint8_t* safepoint_entry; 56 SafepointEntry safepoint_entry;
55 }; 57 };
56 58
57 static PcToCodeCacheEntry* cache(int index) { 59 static PcToCodeCacheEntry* cache(int index) {
58 return &cache_[index]; 60 return &cache_[index];
59 } 61 }
60 62
61 static Code* GcSafeFindCodeForPc(Address pc); 63 static Code* GcSafeFindCodeForPc(Address pc);
62 static Code* GcSafeCastToCode(HeapObject* object, Address pc); 64 static Code* GcSafeCastToCode(HeapObject* object, Address pc);
63 65
64 static void FlushPcToCodeCache() { 66 static void FlushPcToCodeCache() {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 203
202 // Get the code object that contains the given pc. 204 // Get the code object that contains the given pc.
203 static Code* GetContainingCode(Address pc) { 205 static Code* GetContainingCode(Address pc) {
204 return PcToCodeCache::GetCacheEntry(pc)->code; 206 return PcToCodeCache::GetCacheEntry(pc)->code;
205 } 207 }
206 208
207 // Get the code object containing the given pc and fill in the 209 // Get the code object containing the given pc and fill in the
208 // safepoint entry and the number of stack slots. The pc must be at 210 // safepoint entry and the number of stack slots. The pc must be at
209 // a safepoint. 211 // a safepoint.
210 static Code* GetSafepointData(Address pc, 212 static Code* GetSafepointData(Address pc,
211 uint8_t** safepoint_entry, 213 SafepointEntry* safepoint_entry,
212 unsigned* stack_slots); 214 unsigned* stack_slots);
213 215
214 virtual void Iterate(ObjectVisitor* v) const = 0; 216 virtual void Iterate(ObjectVisitor* v) const = 0;
215 static void IteratePc(ObjectVisitor* v, Address* pc_address, Code* holder); 217 static void IteratePc(ObjectVisitor* v, Address* pc_address, Code* holder);
216 218
217 219
218 // Printing support. 220 // Printing support.
219 enum PrintMode { OVERVIEW, DETAILS }; 221 enum PrintMode { OVERVIEW, DETAILS };
220 virtual void Print(StringStream* accumulator, 222 virtual void Print(StringStream* accumulator,
221 PrintMode mode, 223 PrintMode mode,
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 }; 817 };
816 818
817 819
818 // Reads all frames on the current stack and copies them into the current 820 // Reads all frames on the current stack and copies them into the current
819 // zone memory. 821 // zone memory.
820 Vector<StackFrame*> CreateStackMap(); 822 Vector<StackFrame*> CreateStackMap();
821 823
822 } } // namespace v8::internal 824 } } // namespace v8::internal
823 825
824 #endif // V8_FRAMES_H_ 826 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « no previous file | src/frames.cc » ('j') | src/ia32/deoptimizer-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698