| 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/dart.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/code_index_table.h" | 7 #include "vm/code_index_table.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/handles.h" | 9 #include "vm/handles.h" |
| 10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 | 53 |
| 54 Isolate* Dart::CreateIsolate() { | 54 Isolate* Dart::CreateIsolate() { |
| 55 // Create a new isolate. | 55 // Create a new isolate. |
| 56 Isolate* isolate = Isolate::Init(); | 56 Isolate* isolate = Isolate::Init(); |
| 57 ASSERT(isolate != NULL); | 57 ASSERT(isolate != NULL); |
| 58 return isolate; | 58 return isolate; |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| 62 void Dart::InitializeIsolate(const Dart_Snapshot* snapshot_buffer, void* data) { | 62 void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { |
| 63 // Initialize the new isolate. | 63 // Initialize the new isolate. |
| 64 Isolate* isolate = Isolate::Current(); | 64 Isolate* isolate = Isolate::Current(); |
| 65 ASSERT(isolate != NULL); | 65 ASSERT(isolate != NULL); |
| 66 Zone zone(isolate); | 66 Zone zone(isolate); |
| 67 HandleScope handle_scope(isolate); | 67 HandleScope handle_scope(isolate); |
| 68 Heap::Init(isolate); | 68 Heap::Init(isolate); |
| 69 ObjectStore::Init(isolate); | 69 ObjectStore::Init(isolate); |
| 70 | 70 |
| 71 if (snapshot_buffer == NULL) { | 71 if (snapshot_buffer == NULL) { |
| 72 Object::Init(isolate); | 72 Object::Init(isolate); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 | 89 |
| 90 void Dart::ShutdownIsolate() { | 90 void Dart::ShutdownIsolate() { |
| 91 Isolate* isolate = Isolate::Current(); | 91 Isolate* isolate = Isolate::Current(); |
| 92 isolate->Shutdown(); | 92 isolate->Shutdown(); |
| 93 delete isolate; | 93 delete isolate; |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace dart | 96 } // namespace dart |
| OLD | NEW |