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

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

Issue 73020: Implemented "no heap access" mode for JSFrame which is used for stack sampling in profiler. (Closed)
Patch Set: Renamings as Soeren suggested Created 11 years, 8 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
« src/frames.h ('K') | « src/frames-ia32.cc ('k') | no next file » | 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const int offset = JavaScriptFrameConstants::kReceiverOffset; 162 const int offset = JavaScriptFrameConstants::kReceiverOffset;
163 Memory::Object_at(pp() + offset) = value; 163 Memory::Object_at(pp() + offset) = value;
164 } 164 }
165 165
166 166
167 inline bool JavaScriptFrame::has_adapted_arguments() const { 167 inline bool JavaScriptFrame::has_adapted_arguments() const {
168 return IsArgumentsAdaptorFrame(caller_fp()); 168 return IsArgumentsAdaptorFrame(caller_fp());
169 } 169 }
170 170
171 171
172 inline bool JavaScriptFrame::is_at_function() const {
173 Object* result = function_slot_object();
174 // Verify that frame points at correct JS function object.
175 // We are verifying that function object address and
176 // the underlying map object address are valid, and that
177 // function is really a function.
178 return Heap::Contains(reinterpret_cast<Address>(result)) &&
179 result->IsHeapObject() &&
180 Heap::Contains(HeapObject::cast(result)->map()) &&
181 result->IsJSFunction();
182 }
183
184
185 inline Object* JavaScriptFrame::function() const { 172 inline Object* JavaScriptFrame::function() const {
186 Object* result = function_slot_object(); 173 Object* result = function_slot_object();
187 ASSERT(result->IsJSFunction()); 174 ASSERT(result->IsJSFunction());
188 return result; 175 return result;
189 } 176 }
190 177
191 178
192 template<typename Iterator> 179 template<typename Iterator>
193 inline JavaScriptFrame* JavaScriptFrameIteratorTemp<Iterator>::frame() const { 180 inline JavaScriptFrame* JavaScriptFrameIteratorTemp<Iterator>::frame() const {
194 // TODO(1233797): The frame hierarchy needs to change. It's 181 // TODO(1233797): The frame hierarchy needs to change. It's
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 template<typename Iterator> 217 template<typename Iterator>
231 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { 218 void JavaScriptFrameIteratorTemp<Iterator>::Reset() {
232 iterator_.Reset(); 219 iterator_.Reset();
233 if (!done()) Advance(); 220 if (!done()) Advance();
234 } 221 }
235 222
236 223
237 } } // namespace v8::internal 224 } } // namespace v8::internal
238 225
239 #endif // V8_FRAMES_INL_H_ 226 #endif // V8_FRAMES_INL_H_
OLDNEW
« src/frames.h ('K') | « src/frames-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698