| Index: runtime/vm/dart.cc
|
| diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
|
| index 33ca87bf6baab486d5b9ce714e7088bc5030b332..90b0e2d4b04367297681b0c154ab78173f121bba 100644
|
| --- a/runtime/vm/dart.cc
|
| +++ b/runtime/vm/dart.cc
|
| @@ -21,8 +21,8 @@
|
| #include "vm/message_handler.h"
|
| #include "vm/metrics.h"
|
| #include "vm/object.h"
|
| -#include "vm/object_store.h"
|
| #include "vm/object_id_ring.h"
|
| +#include "vm/object_store.h"
|
| #include "vm/port.h"
|
| #include "vm/profiler.h"
|
| #include "vm/service_isolate.h"
|
| @@ -80,7 +80,6 @@ class ReadOnlyHandles {
|
| DISALLOW_COPY_AND_ASSIGN(ReadOnlyHandles);
|
| };
|
|
|
| -
|
| static void CheckOffsets() {
|
| #define CHECK_OFFSET(expr, offset) \
|
| if ((expr) != (offset)) { \
|
| @@ -110,7 +109,6 @@ static void CheckOffsets() {
|
| #undef CHECK_OFFSET
|
| }
|
|
|
| -
|
| char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
|
| const uint8_t* instructions_snapshot,
|
| Dart_IsolateCreateCallback create,
|
| @@ -319,7 +317,6 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
|
| return NULL;
|
| }
|
|
|
| -
|
| // This waits until only the VM isolate and the service isolate remains in the
|
| // list, i.e. list length == 2.
|
| void Dart::WaitForApplicationIsolateShutdown() {
|
| @@ -337,7 +334,6 @@ void Dart::WaitForApplicationIsolateShutdown() {
|
| ServiceIsolate::IsServiceIsolate(Isolate::isolates_list_head_)));
|
| }
|
|
|
| -
|
| // This waits until only the VM isolate remains in the list.
|
| void Dart::WaitForIsolateShutdown() {
|
| ASSERT(!Isolate::creation_enabled_);
|
| @@ -349,7 +345,6 @@ void Dart::WaitForIsolateShutdown() {
|
| ASSERT(Isolate::isolates_list_head_ == Dart::vm_isolate());
|
| }
|
|
|
| -
|
| const char* Dart::Cleanup() {
|
| ASSERT(Isolate::Current() == NULL);
|
| if (vm_isolate_ == NULL) {
|
| @@ -370,7 +365,6 @@ const char* Dart::Cleanup() {
|
| Profiler::Shutdown();
|
| }
|
|
|
| -
|
| {
|
| // Set the VM isolate as current isolate when shutting down
|
| // Metrics so that we can use a StackZone.
|
| @@ -488,7 +482,6 @@ const char* Dart::Cleanup() {
|
| return NULL;
|
| }
|
|
|
| -
|
| Isolate* Dart::CreateIsolate(const char* name_prefix,
|
| const Dart_IsolateFlags& api_flags) {
|
| // Create a new isolate.
|
| @@ -496,7 +489,6 @@ Isolate* Dart::CreateIsolate(const char* name_prefix,
|
| return isolate;
|
| }
|
|
|
| -
|
| static bool IsSnapshotCompatible(Snapshot::Kind vm_kind,
|
| Snapshot::Kind isolate_kind) {
|
| if (vm_kind == isolate_kind) return true;
|
| @@ -505,7 +497,6 @@ static bool IsSnapshotCompatible(Snapshot::Kind vm_kind,
|
| return Snapshot::IsFull(isolate_kind);
|
| }
|
|
|
| -
|
| RawError* Dart::InitializeIsolate(const uint8_t* snapshot_data,
|
| const uint8_t* snapshot_instructions,
|
| intptr_t snapshot_length,
|
| @@ -644,7 +635,6 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_data,
|
| return Error::null();
|
| }
|
|
|
| -
|
| const char* Dart::FeaturesString(Isolate* isolate, Snapshot::Kind kind) {
|
| TextBuffer buffer(64);
|
|
|
| @@ -662,7 +652,7 @@ const char* Dart::FeaturesString(Isolate* isolate, Snapshot::Kind kind) {
|
| buffer.AddString(" support-debugger");
|
| }
|
|
|
| - // Checked mode affects deopt ids.
|
| +// Checked mode affects deopt ids.
|
| #define ADD_FLAG(name, isolate_flag, flag) \
|
| do { \
|
| const bool name = (isolate != NULL) ? isolate->name() : flag; \
|
| @@ -713,7 +703,6 @@ const char* Dart::FeaturesString(Isolate* isolate, Snapshot::Kind kind) {
|
| return buffer.Steal();
|
| }
|
|
|
| -
|
| void Dart::RunShutdownCallback() {
|
| Isolate* isolate = Isolate::Current();
|
| void* callback_data = isolate->init_callback_data();
|
| @@ -723,7 +712,6 @@ void Dart::RunShutdownCallback() {
|
| }
|
| }
|
|
|
| -
|
| void Dart::ShutdownIsolate(Isolate* isolate) {
|
| ASSERT(Isolate::Current() == NULL);
|
| // We need to enter the isolate in order to shut it down.
|
| @@ -735,39 +723,33 @@ void Dart::ShutdownIsolate(Isolate* isolate) {
|
| ASSERT(Isolate::Current() == NULL);
|
| }
|
|
|
| -
|
| void Dart::ShutdownIsolate() {
|
| Isolate* isolate = Isolate::Current();
|
| isolate->Shutdown();
|
| delete isolate;
|
| }
|
|
|
| -
|
| int64_t Dart::UptimeMicros() {
|
| return OS::GetCurrentMonotonicMicros() - Dart::start_time_micros_;
|
| }
|
|
|
| -
|
| uword Dart::AllocateReadOnlyHandle() {
|
| ASSERT(Isolate::Current() == Dart::vm_isolate());
|
| ASSERT(predefined_handles_ != NULL);
|
| return predefined_handles_->handles_.AllocateScopedHandle();
|
| }
|
|
|
| -
|
| LocalHandle* Dart::AllocateReadOnlyApiHandle() {
|
| ASSERT(Isolate::Current() == Dart::vm_isolate());
|
| ASSERT(predefined_handles_ != NULL);
|
| return predefined_handles_->api_handles_.AllocateHandle();
|
| }
|
|
|
| -
|
| bool Dart::IsReadOnlyHandle(uword address) {
|
| ASSERT(predefined_handles_ != NULL);
|
| return predefined_handles_->handles_.IsValidScopedHandle(address);
|
| }
|
|
|
| -
|
| bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
|
| ASSERT(predefined_handles_ != NULL);
|
| return predefined_handles_->api_handles_.IsValidHandle(handle);
|
|
|