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

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

Issue 12179020: Fix for issues 6080 - pass in the Isolate's top context into the stub for invoking dart code from n… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/scopes.cc ('k') | runtime/vm/stack_frame.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) 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"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 // Forward declarations. 14 // Forward declarations.
15 class ObjectPointerVisitor; 15 class ObjectPointerVisitor;
16 class RawContext;
16 17
17 18
18 // Generic stack frame. 19 // Generic stack frame.
19 class StackFrame : public ValueObject { 20 class StackFrame : public ValueObject {
20 public: 21 public:
21 virtual ~StackFrame() { } 22 virtual ~StackFrame() { }
22 23
23 // Accessors to get the pc, sp and fp of a frame. 24 // Accessors to get the pc, sp and fp of a frame.
24 uword sp() const { return sp_; } 25 uword sp() const { return sp_; }
25 uword fp() const { return fp_; } 26 uword fp() const { return fp_; }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 112
112 // Entry Frame is used to mark the transition from dart VM runtime code into 113 // Entry Frame is used to mark the transition from dart VM runtime code into
113 // dart code. 114 // dart code.
114 class EntryFrame : public StackFrame { 115 class EntryFrame : public StackFrame {
115 public: 116 public:
116 bool IsValid() const { return StubCode::InInvocationStub(pc()); } 117 bool IsValid() const { return StubCode::InInvocationStub(pc()); }
117 bool IsDartFrame() const { return false; } 118 bool IsDartFrame() const { return false; }
118 bool IsStubFrame() const { return false; } 119 bool IsStubFrame() const { return false; }
119 bool IsEntryFrame() const { return true; } 120 bool IsEntryFrame() const { return true; }
120 121
122 RawContext* SavedContext() const;
123
121 // Visit objects in the frame. 124 // Visit objects in the frame.
122 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); 125 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor);
123 126
124 protected: 127 protected:
125 virtual const char* GetName() const { return "entry"; } 128 virtual const char* GetName() const { return "entry"; }
126 129
127 private: 130 private:
128 EntryFrame() { } 131 EntryFrame() { }
129 intptr_t ExitLinkOffset(); 132 intptr_t ExitLinkOffset() const;
133 intptr_t SavedContextOffset() const;
130 134
131 friend class StackFrameIterator; 135 friend class StackFrameIterator;
132 DISALLOW_COPY_AND_ASSIGN(EntryFrame); 136 DISALLOW_COPY_AND_ASSIGN(EntryFrame);
133 }; 137 };
134 138
135 139
136 // Iterator for iterating over all frames from the last ExitFrame to the 140 // Iterator for iterating over all frames from the last ExitFrame to the
137 // first EntryFrame. 141 // first EntryFrame.
138 class StackFrameIterator : public ValueObject { 142 class StackFrameIterator : public ValueObject {
139 public: 143 public:
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 uword pc_; 264 uword pc_;
261 GrowableArray<DeoptInstr*> deopt_instructions_; 265 GrowableArray<DeoptInstr*> deopt_instructions_;
262 Array& object_table_; 266 Array& object_table_;
263 267
264 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); 268 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator);
265 }; 269 };
266 270
267 } // namespace dart 271 } // namespace dart
268 272
269 #endif // VM_STACK_FRAME_H_ 273 #endif // VM_STACK_FRAME_H_
OLDNEW
« no previous file with comments | « runtime/vm/scopes.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698