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 #include "vm/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "vm/assert.h" | 9 #include "vm/assert.h" |
10 #include "vm/bigint_store.h" | 10 #include "vm/bigint_store.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 if (FLAG_generate_gdb_symbols) { | 216 if (FLAG_generate_gdb_symbols) { |
217 DebugInfo::UnregisterAllSections(); | 217 DebugInfo::UnregisterAllSections(); |
218 } | 218 } |
219 | 219 |
220 // TODO(5411455): For now just make sure there are no current isolates | 220 // TODO(5411455): For now just make sure there are no current isolates |
221 // as we are shutting down the isolate. | 221 // as we are shutting down the isolate. |
222 SetCurrent(NULL); | 222 SetCurrent(NULL); |
223 } | 223 } |
224 | 224 |
225 | 225 |
226 Dart_IsolateInitCallback Isolate::init_callback_ = NULL; | 226 Dart_IsolateCreateAndInitCallback Isolate::create_init_callback_ = NULL; |
227 | 227 |
228 | 228 |
229 void Isolate::SetInitCallback(Dart_IsolateInitCallback callback) { | 229 void Isolate::SetCreateAndInitCallback(Dart_IsolateCreateAndInitCallback cb) { |
230 init_callback_ = callback; | 230 create_init_callback_ = cb; |
231 } | 231 } |
232 | 232 |
233 | 233 |
234 Dart_IsolateInitCallback Isolate::InitCallback() { | 234 Dart_IsolateCreateAndInitCallback Isolate::CreateAndInitCallback() { |
235 return init_callback_; | 235 return create_init_callback_; |
236 } | 236 } |
237 | 237 |
238 | 238 |
239 void Isolate::StandardRunLoop() { | 239 void Isolate::StandardRunLoop() { |
240 ASSERT(long_jump_base() != NULL); | 240 ASSERT(long_jump_base() != NULL); |
241 ASSERT(post_message_callback() == &StandardPostMessageCallback); | 241 ASSERT(post_message_callback() == &StandardPostMessageCallback); |
242 ASSERT(close_port_callback() == &StandardClosePortCallback); | 242 ASSERT(close_port_callback() == &StandardClosePortCallback); |
243 | 243 |
244 while (active_ports() > 0) { | 244 while (active_ports() > 0) { |
245 ASSERT(this == Isolate::Current()); | 245 ASSERT(this == Isolate::Current()); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // Visit all objects in the code index table. | 289 // Visit all objects in the code index table. |
290 if (code_index_table() != NULL) { | 290 if (code_index_table() != NULL) { |
291 code_index_table()->VisitObjectPointers(visitor); | 291 code_index_table()->VisitObjectPointers(visitor); |
292 } | 292 } |
293 | 293 |
294 // Visit the top context which is stored in the isolate. | 294 // Visit the top context which is stored in the isolate. |
295 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); | 295 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); |
296 } | 296 } |
297 | 297 |
298 } // namespace dart | 298 } // namespace dart |
OLD | NEW |