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

Side by Side Diff: runtime/vm/stack_frame.cc

Issue 10869063: Add attributions so printf like functions can have their arguments checked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 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 | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/timer.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/stack_frame.h" 5 #include "vm/stack_frame.h"
6 6
7 #include "vm/assembler_macros.h" 7 #include "vm/assembler_macros.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
11 #include "vm/os.h" 11 #include "vm/os.h"
12 #include "vm/parser.h" 12 #include "vm/parser.h"
13 #include "vm/raw_object.h" 13 #include "vm/raw_object.h"
14 #include "vm/stub_code.h" 14 #include "vm/stub_code.h"
15 #include "vm/visitor.h" 15 #include "vm/visitor.h"
16 16
17 namespace dart { 17 namespace dart {
18 18
19 19
20 bool StackFrame::IsStubFrame() const { 20 bool StackFrame::IsStubFrame() const {
21 ASSERT(!(IsEntryFrame() || IsExitFrame())); 21 ASSERT(!(IsEntryFrame() || IsExitFrame()));
22 uword saved_pc = *(reinterpret_cast<uword*>(fp() - kWordSize)); 22 uword saved_pc = *(reinterpret_cast<uword*>(fp() - kWordSize));
23 return (saved_pc == 0); 23 return (saved_pc == 0);
24 } 24 }
25 25
26 26
27 void StackFrame::Print() const { 27 void StackFrame::Print() const {
28 OS::Print("[%-8s : sp(%p) ]\n", GetName(), sp()); 28 OS::Print("[%-8s : sp(%#"Px") ]\n", GetName(), sp());
29 } 29 }
30 30
31 31
32 void ExitFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) { 32 void ExitFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
33 // There are no objects to visit in this frame. 33 // There are no objects to visit in this frame.
34 } 34 }
35 35
36 36
37 void EntryFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) { 37 void EntryFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
38 // Visit objects between SP and (FP - callee_save_area). 38 // Visit objects between SP and (FP - callee_save_area).
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 EntryFrame* StackFrameIterator::NextEntryFrame() { 262 EntryFrame* StackFrameIterator::NextEntryFrame() {
263 ASSERT(!frames_.HasNext()); 263 ASSERT(!frames_.HasNext());
264 entry_.sp_ = frames_.sp_; 264 entry_.sp_ = frames_.sp_;
265 entry_.fp_ = frames_.fp_; 265 entry_.fp_ = frames_.fp_;
266 SetupNextExitFrameData(); // Setup data for next exit frame in chain. 266 SetupNextExitFrameData(); // Setup data for next exit frame in chain.
267 ASSERT(entry_.IsValid()); 267 ASSERT(entry_.IsValid());
268 return &entry_; 268 return &entry_;
269 } 269 }
270 270
271 } // namespace dart 271 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698