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

Side by Side Diff: src/frames-inl.h

Issue 3226014: Add functionality for finding code objects from a pc that points into... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/frames.cc ('k') | src/heap.h » ('j') | no next file with comments »
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 59
60 inline bool StackHandler::includes(Address address) const { 60 inline bool StackHandler::includes(Address address) const {
61 Address start = this->address(); 61 Address start = this->address();
62 Address end = start + StackHandlerConstants::kSize; 62 Address end = start + StackHandlerConstants::kSize;
63 return start <= address && address <= end; 63 return start <= address && address <= end;
64 } 64 }
65 65
66 66
67 inline void StackHandler::Iterate(ObjectVisitor* v) const { 67 inline void StackHandler::Iterate(ObjectVisitor* v, Code* holder) const {
68 // Stack handlers do not contain any pointers that need to be 68 StackFrame::IteratePc(v, pc_address(), holder);
69 // traversed.
70 } 69 }
71 70
72 71
73 inline StackHandler* StackHandler::FromAddress(Address address) { 72 inline StackHandler* StackHandler::FromAddress(Address address) {
74 return reinterpret_cast<StackHandler*>(address); 73 return reinterpret_cast<StackHandler*>(address);
75 } 74 }
76 75
77 76
78 inline StackHandler::State StackHandler::state() const { 77 inline StackHandler::State StackHandler::state() const {
79 const int offset = StackHandlerConstants::kStateOffset; 78 const int offset = StackHandlerConstants::kStateOffset;
80 return static_cast<State>(Memory::int_at(address() + offset)); 79 return static_cast<State>(Memory::int_at(address() + offset));
81 } 80 }
82 81
83 82
84 inline Address StackHandler::pc() const { 83 inline Address* StackHandler::pc_address() const {
85 const int offset = StackHandlerConstants::kPCOffset; 84 const int offset = StackHandlerConstants::kPCOffset;
86 return Memory::Address_at(address() + offset); 85 return reinterpret_cast<Address*>(address() + offset);
87 }
88
89
90 inline void StackHandler::set_pc(Address value) {
91 const int offset = StackHandlerConstants::kPCOffset;
92 Memory::Address_at(address() + offset) = value;
93 } 86 }
94 87
95 88
96 inline StackHandler* StackFrame::top_handler() const { 89 inline StackHandler* StackFrame::top_handler() const {
97 return iterator_->handler(); 90 return iterator_->handler();
98 } 91 }
99 92
100 93
101 inline Object* StandardFrame::GetExpression(int index) const { 94 inline Object* StandardFrame::GetExpression(int index) const {
102 return Memory::Object_at(GetExpressionAddress(index)); 95 return Memory::Object_at(GetExpressionAddress(index));
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 template<typename Iterator> 201 template<typename Iterator>
209 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { 202 void JavaScriptFrameIteratorTemp<Iterator>::Reset() {
210 iterator_.Reset(); 203 iterator_.Reset();
211 if (!done()) Advance(); 204 if (!done()) Advance();
212 } 205 }
213 206
214 207
215 } } // namespace v8::internal 208 } } // namespace v8::internal
216 209
217 #endif // V8_FRAMES_INL_H_ 210 #endif // V8_FRAMES_INL_H_
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698