OLD | NEW |
---|---|
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_DART_API_IMPL_H_ | 5 #ifndef VM_DART_API_IMPL_H_ |
6 #define VM_DART_API_IMPL_H_ | 6 #define VM_DART_API_IMPL_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 // Gets a handle to False | 116 // Gets a handle to False |
117 static Dart_Handle False(); | 117 static Dart_Handle False(); |
118 | 118 |
119 // Allocates space in the local zone. | 119 // Allocates space in the local zone. |
120 static uword Allocate(intptr_t size); | 120 static uword Allocate(intptr_t size); |
121 | 121 |
122 // Reallocates space in the local zone. | 122 // Reallocates space in the local zone. |
123 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); | 123 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); |
124 }; | 124 }; |
125 | 125 |
126 class IsolateSaver { | |
127 public: | |
128 explicit IsolateSaver(Isolate* current_isolate) | |
129 : saved_isolate_(current_isolate) { | |
130 } | |
131 ~IsolateSaver() { | |
132 Isolate::SetCurrent(saved_isolate_); | |
133 } | |
134 private: | |
135 Isolate* saved_isolate_; | |
siva
2012/02/01 00:38:56
DISALLOW_COPY_AND_ASSIGN etc...
turnidge
2012/02/01 18:51:27
Done.
| |
136 }; | |
137 | |
126 } // namespace dart. | 138 } // namespace dart. |
127 | 139 |
128 #endif // VM_DART_API_IMPL_H_ | 140 #endif // VM_DART_API_IMPL_H_ |
OLD | NEW |