| 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/freelist.h" | 9 #include "vm/freelist.h" |
| 10 #include "vm/handles.h" | 10 #include "vm/handles.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 Isolate* Dart::CreateIsolate() { | 58 Isolate* Dart::CreateIsolate() { |
| 59 // Create a new isolate. | 59 // Create a new isolate. |
| 60 Isolate* isolate = Isolate::Init(); | 60 Isolate* isolate = Isolate::Init(); |
| 61 ASSERT(isolate != NULL); | 61 ASSERT(isolate != NULL); |
| 62 return isolate; | 62 return isolate; |
| 63 } | 63 } |
| 64 | 64 |
| 65 | 65 |
| 66 void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { | 66 void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { |
| 67 // Initialize the new isolate. | 67 // Initialize the new isolate. |
| 68 TIMERSCOPE(time_isolate_initialization); |
| 68 Isolate* isolate = Isolate::Current(); | 69 Isolate* isolate = Isolate::Current(); |
| 69 ASSERT(isolate != NULL); | 70 ASSERT(isolate != NULL); |
| 70 Zone zone(isolate); | 71 Zone zone(isolate); |
| 71 HandleScope handle_scope(isolate); | 72 HandleScope handle_scope(isolate); |
| 72 Heap::Init(isolate); | 73 Heap::Init(isolate); |
| 73 ObjectStore::Init(isolate); | 74 ObjectStore::Init(isolate); |
| 74 | 75 |
| 75 if (snapshot_buffer == NULL) { | 76 if (snapshot_buffer == NULL) { |
| 76 Object::Init(isolate); | 77 Object::Init(isolate); |
| 77 } else { | 78 } else { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 91 } | 92 } |
| 92 | 93 |
| 93 | 94 |
| 94 void Dart::ShutdownIsolate() { | 95 void Dart::ShutdownIsolate() { |
| 95 Isolate* isolate = Isolate::Current(); | 96 Isolate* isolate = Isolate::Current(); |
| 96 isolate->Shutdown(); | 97 isolate->Shutdown(); |
| 97 delete isolate; | 98 delete isolate; |
| 98 } | 99 } |
| 99 | 100 |
| 100 } // namespace dart | 101 } // namespace dart |
| OLD | NEW |