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

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

Issue 18404009: Refactor JavaScriptFrame::function() to return a JSFunction* and remove associated casts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove implicit ASSERT. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/frames.cc ('k') | src/ic.cc » ('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 // 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 inline void JavaScriptFrame::set_receiver(Object* value) { 267 inline void JavaScriptFrame::set_receiver(Object* value) {
268 Memory::Object_at(GetParameterSlot(-1)) = value; 268 Memory::Object_at(GetParameterSlot(-1)) = value;
269 } 269 }
270 270
271 271
272 inline bool JavaScriptFrame::has_adapted_arguments() const { 272 inline bool JavaScriptFrame::has_adapted_arguments() const {
273 return IsArgumentsAdaptorFrame(caller_fp()); 273 return IsArgumentsAdaptorFrame(caller_fp());
274 } 274 }
275 275
276 276
277 inline Object* JavaScriptFrame::function() const { 277 inline JSFunction* JavaScriptFrame::function() const {
278 Object* result = function_slot_object(); 278 return JSFunction::cast(function_slot_object());
279 ASSERT(result->IsJSFunction());
280 return result;
281 } 279 }
282 280
283 281
284 inline StubFrame::StubFrame(StackFrameIteratorBase* iterator) 282 inline StubFrame::StubFrame(StackFrameIteratorBase* iterator)
285 : StandardFrame(iterator) { 283 : StandardFrame(iterator) {
286 } 284 }
287 285
288 286
289 inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator) 287 inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator)
290 : JavaScriptFrame(iterator) { 288 : JavaScriptFrame(iterator) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 inline JavaScriptFrame* SafeStackFrameIterator::frame() const { 337 inline JavaScriptFrame* SafeStackFrameIterator::frame() const {
340 ASSERT(!done()); 338 ASSERT(!done());
341 ASSERT(frame_->is_java_script()); 339 ASSERT(frame_->is_java_script());
342 return static_cast<JavaScriptFrame*>(frame_); 340 return static_cast<JavaScriptFrame*>(frame_);
343 } 341 }
344 342
345 343
346 } } // namespace v8::internal 344 } } // namespace v8::internal
347 345
348 #endif // V8_FRAMES_INL_H_ 346 #endif // V8_FRAMES_INL_H_
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698