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

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/allocation.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 // Destroy stack resources of isolate from top until stack_pointer, exclusive.
69 static void Unwind(Isolate* isolate, uword stack_pointer);
70 // Destroy stack resources of isolate above new_top, exclusive.
71 static void Unwind(Isolate* isolate, StackResource* new_top);
72
68 private: 73 private:
69 BaseIsolate* const isolate_; // Current isolate for this stack resource. 74 BaseIsolate* const isolate_; // Current isolate for this stack resource.
70 StackResource* previous_; 75 StackResource* previous_;
71 76
72 DISALLOW_ALLOCATION(); 77 DISALLOW_ALLOCATION();
73 DISALLOW_IMPLICIT_CONSTRUCTORS(StackResource); 78 DISALLOW_IMPLICIT_CONSTRUCTORS(StackResource);
74 }; 79 };
75 80
76 81
77 // Static allocated classes only contain static members and can never 82 // 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. 116 // deallocated by invoking DeleteAll() on the zone they live in.
112 void operator delete(void* pointer) { UNREACHABLE(); } 117 void operator delete(void* pointer) { UNREACHABLE(); }
113 118
114 private: 119 private:
115 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated); 120 DISALLOW_COPY_AND_ASSIGN(ZoneAllocated);
116 }; 121 };
117 122
118 } // namespace dart 123 } // namespace dart
119 124
120 #endif // VM_ALLOCATION_H_ 125 #endif // VM_ALLOCATION_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/allocation.cc » ('j') | runtime/vm/exceptions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698