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

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

Issue 15110003: Make deoptimization architecture dependent (it depends on the frame layout). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/flow_graph_compiler_x64.cc ('k') | runtime/vm/stack_frame_arm.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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_STACK_FRAME_H_ 5 #ifndef VM_STACK_FRAME_H_
6 #define VM_STACK_FRAME_H_ 6 #define VM_STACK_FRAME_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/stub_code.h" 10 #include "vm/stub_code.h"
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 virtual ~StackFrame() { } 34 virtual ~StackFrame() { }
35 35
36 // Accessors to get the pc, sp and fp of a frame. 36 // Accessors to get the pc, sp and fp of a frame.
37 uword sp() const { return sp_; } 37 uword sp() const { return sp_; }
38 uword fp() const { return fp_; } 38 uword fp() const { return fp_; }
39 uword pc() const { 39 uword pc() const {
40 return *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)); 40 return *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize));
41 } 41 }
42 42
43 // The pool pointer is not implemented on all architectures.
44 static int SavedCallerPpSlotFromFp() {
45 if (kSavedCallerPpSlotFromFp != kSavedCallerFpSlotFromFp) {
46 return kSavedCallerPpSlotFromFp;
47 }
48 UNREACHABLE();
49 return 0;
50 }
51
43 void set_pc(uword value) { 52 void set_pc(uword value) {
44 *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)) = value; 53 *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)) = value;
45 } 54 }
46 55
47 // Visit objects in the frame. 56 // Visit objects in the frame.
48 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); 57 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor);
49 58
50 // Print a frame. 59 // Print a frame.
51 virtual void Print() const; 60 virtual void Print() const;
52 61
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 GrowableArray<DeoptInstr*> deopt_instructions_; 282 GrowableArray<DeoptInstr*> deopt_instructions_;
274 Array& object_table_; 283 Array& object_table_;
275 284
276 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); 285 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator);
277 }; 286 };
278 287
279 } // namespace dart 288 } // namespace dart
280 289
281 #endif // VM_STACK_FRAME_H_ 290 #endif // VM_STACK_FRAME_H_
282 291
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/stack_frame_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698