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

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

Issue 1247783002: Make array allocation stub shared between isolates. (Closed) Base URL: git@github.com:dart-lang/sdk.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
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 friend class StackFrameIterator; 137 friend class StackFrameIterator;
138 DISALLOW_COPY_AND_ASSIGN(ExitFrame); 138 DISALLOW_COPY_AND_ASSIGN(ExitFrame);
139 }; 139 };
140 140
141 141
142 // Entry Frame is used to mark the transition from dart VM runtime code into 142 // Entry Frame is used to mark the transition from dart VM runtime code into
143 // dart code. 143 // dart code.
144 class EntryFrame : public StackFrame { 144 class EntryFrame : public StackFrame {
145 public: 145 public:
146 bool IsValid() const { 146 bool IsValid() const {
147 return StubCode::InInvocationStubForIsolate(isolate(), pc()); 147 return StubCode::InInvocationStub(pc());
148 } 148 }
149 bool IsDartFrame(bool validate = true) const { return false; } 149 bool IsDartFrame(bool validate = true) const { return false; }
150 bool IsStubFrame() const { return false; } 150 bool IsStubFrame() const { return false; }
151 bool IsEntryFrame() const { return true; } 151 bool IsEntryFrame() const { return true; }
152 152
153 // Visit objects in the frame. 153 // Visit objects in the frame.
154 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); 154 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor);
155 155
156 protected: 156 protected:
157 virtual const char* GetName() const { return "entry"; } 157 virtual const char* GetName() const { return "entry"; }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // in one EntryFrame and ExitFrame block. 199 // in one EntryFrame and ExitFrame block.
200 class FrameSetIterator : public ValueObject { 200 class FrameSetIterator : public ValueObject {
201 public: 201 public:
202 // Checks if a next non entry/exit frame exists in the set. 202 // Checks if a next non entry/exit frame exists in the set.
203 bool HasNext() const { 203 bool HasNext() const {
204 if (fp_ == 0) { 204 if (fp_ == 0) {
205 return false; 205 return false;
206 } 206 }
207 const uword pc = *(reinterpret_cast<uword*>( 207 const uword pc = *(reinterpret_cast<uword*>(
208 sp_ + (kSavedPcSlotFromSp * kWordSize))); 208 sp_ + (kSavedPcSlotFromSp * kWordSize)));
209 return !StubCode::InInvocationStubForIsolate(isolate_, pc); 209 return !StubCode::InInvocationStub(pc);
210 } 210 }
211 211
212 // Get next non entry/exit frame in the set (assumes a next frame exists). 212 // Get next non entry/exit frame in the set (assumes a next frame exists).
213 StackFrame* NextFrame(bool validate); 213 StackFrame* NextFrame(bool validate);
214 214
215 private: 215 private:
216 explicit FrameSetIterator(Isolate* isolate) 216 explicit FrameSetIterator(Isolate* isolate)
217 : fp_(0), sp_(0), pc_(0), stack_frame_(isolate), isolate_(isolate) { } 217 : fp_(0), sp_(0), pc_(0), stack_frame_(isolate), isolate_(isolate) { }
218 uword fp_; 218 uword fp_;
219 uword sp_; 219 uword sp_;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 uword pc_; 324 uword pc_;
325 GrowableArray<DeoptInstr*> deopt_instructions_; 325 GrowableArray<DeoptInstr*> deopt_instructions_;
326 ObjectPool& object_table_; 326 ObjectPool& object_table_;
327 327
328 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); 328 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator);
329 }; 329 };
330 330
331 } // namespace dart 331 } // namespace dart
332 332
333 #endif // VM_STACK_FRAME_H_ 333 #endif // VM_STACK_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698