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

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

Issue 1235893002: Our JavaScriptFrame::function_slot_object is arch independent. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/arm64/frames-arm64.h ('k') | src/ia32/frames-ia32.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 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_INL_H_ 5 #ifndef V8_FRAMES_INL_H_
6 #define V8_FRAMES_INL_H_ 6 #define V8_FRAMES_INL_H_
7 7
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/v8memory.h" 10 #include "src/v8memory.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 inline bool JavaScriptFrame::has_adapted_arguments() const { 210 inline bool JavaScriptFrame::has_adapted_arguments() const {
211 return IsArgumentsAdaptorFrame(caller_fp()); 211 return IsArgumentsAdaptorFrame(caller_fp());
212 } 212 }
213 213
214 214
215 inline JSFunction* JavaScriptFrame::function() const { 215 inline JSFunction* JavaScriptFrame::function() const {
216 return JSFunction::cast(function_slot_object()); 216 return JSFunction::cast(function_slot_object());
217 } 217 }
218 218
219 219
220 inline Object* JavaScriptFrame::function_slot_object() const {
221 const int offset = JavaScriptFrameConstants::kFunctionOffset;
222 return Memory::Object_at(fp() + offset);
223 }
224
225
220 inline StubFrame::StubFrame(StackFrameIteratorBase* iterator) 226 inline StubFrame::StubFrame(StackFrameIteratorBase* iterator)
221 : StandardFrame(iterator) { 227 : StandardFrame(iterator) {
222 } 228 }
223 229
224 230
225 inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator) 231 inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator)
226 : JavaScriptFrame(iterator) { 232 : JavaScriptFrame(iterator) {
227 } 233 }
228 234
229 235
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 inline StackFrame* SafeStackFrameIterator::frame() const { 281 inline StackFrame* SafeStackFrameIterator::frame() const {
276 DCHECK(!done()); 282 DCHECK(!done());
277 DCHECK(frame_->is_java_script() || frame_->is_exit()); 283 DCHECK(frame_->is_java_script() || frame_->is_exit());
278 return frame_; 284 return frame_;
279 } 285 }
280 286
281 287
282 } } // namespace v8::internal 288 } } // namespace v8::internal
283 289
284 #endif // V8_FRAMES_INL_H_ 290 #endif // V8_FRAMES_INL_H_
OLDNEW
« no previous file with comments | « src/arm64/frames-arm64.h ('k') | src/ia32/frames-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698