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

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

Issue 927363004: Verify/document assumption about stack resource addresses. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 | « no previous file | runtime/vm/exceptions.cc » ('j') | runtime/vm/exceptions.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ALLOCATION_H_ 5 #ifndef VM_ALLOCATION_H_
6 #define VM_ALLOCATION_H_ 6 #define VM_ALLOCATION_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/base_isolate.h" 9 #include "vm/base_isolate.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 BaseIsolate::AssertCurrent(isolate_); 58 BaseIsolate::AssertCurrent(isolate_);
59 } 59 }
60 #endif 60 #endif
61 } 61 }
62 62
63 // We can only create StackResources with Isolates, so provide the original 63 // We can only create StackResources with Isolates, so provide the original
64 // isolate to the subclasses. The only reason we have a BaseIsolate in the 64 // isolate to the subclasses. The only reason we have a BaseIsolate in the
65 // StackResource is to break the header include cycles. 65 // StackResource is to break the header include cycles.
66 Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); } 66 Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); }
67 67
68 #if defined(DEBUG)
69 StackResource* previous() const { return previous_; }
70 #endif // DEBUG
71
68 private: 72 private:
69 BaseIsolate* const isolate_; // Current isolate for this stack resource. 73 BaseIsolate* const isolate_; // Current isolate for this stack resource.
70 StackResource* previous_; 74 StackResource* previous_;
71 75
72 DISALLOW_ALLOCATION(); 76 DISALLOW_ALLOCATION();
73 DISALLOW_IMPLICIT_CONSTRUCTORS(StackResource); 77 DISALLOW_IMPLICIT_CONSTRUCTORS(StackResource);
74 }; 78 };
75 79
76 80
77 // Static allocated classes only contain static members and can never 81 // Static allocated classes only contain static members and can never
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // deallocated by invoking DeleteAll() on the zone they live in. 115 // deallocated by invoking DeleteAll() on the zone they live in.
112 void operator delete(void* pointer) { UNREACHABLE(); } 116 void operator delete(void* pointer) { UNREACHABLE(); }
113 117
114 private: 118 private:
115 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated); 119 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated);
116 }; 120 };
117 121
118 } // namespace dart 122 } // namespace dart
119 123
120 #endif // VM_ALLOCATION_H_ 124 #endif // VM_ALLOCATION_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/exceptions.cc » ('j') | runtime/vm/exceptions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698