Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/become.h" | 7 #include "vm/become.h" |
| 8 #include "vm/clustered_snapshot.h" | 8 #include "vm/clustered_snapshot.h" |
| 9 #include "vm/code_observers.h" | 9 #include "vm/code_observers.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 598 } | 598 } |
| 599 | 599 |
| 600 I->heap()->InitGrowthControl(); | 600 I->heap()->InitGrowthControl(); |
| 601 I->set_init_callback_data(data); | 601 I->set_init_callback_data(data); |
| 602 Api::SetupAcquiredError(I); | 602 Api::SetupAcquiredError(I); |
| 603 if (FLAG_print_class_table) { | 603 if (FLAG_print_class_table) { |
| 604 I->class_table()->Print(); | 604 I->class_table()->Print(); |
| 605 } | 605 } |
| 606 | 606 |
| 607 bool is_kernel_isolate = false; | 607 bool is_kernel_isolate = false; |
| 608 USE(is_kernel_isolate); | |
| 609 | |
| 608 #ifndef DART_PRECOMPILED_RUNTIME | 610 #ifndef DART_PRECOMPILED_RUNTIME |
| 609 KernelIsolate::InitCallback(I); | 611 KernelIsolate::InitCallback(I); |
| 610 is_kernel_isolate = KernelIsolate::IsKernelIsolate(I); | 612 is_kernel_isolate = KernelIsolate::IsKernelIsolate(I); |
| 611 #endif | 613 #endif |
| 614 | |
| 615 #if !defined(PRODUCT) | |
| 612 ServiceIsolate::MaybeMakeServiceIsolate(I); | 616 ServiceIsolate::MaybeMakeServiceIsolate(I); |
|
rmacnak
2017/07/19 16:56:36
I would leave this line in. The standalone embedde
| |
| 613 #if !defined(PRODUCT) | |
| 614 if (!ServiceIsolate::IsServiceIsolate(I) && !is_kernel_isolate) { | 617 if (!ServiceIsolate::IsServiceIsolate(I) && !is_kernel_isolate) { |
| 615 I->message_handler()->set_should_pause_on_start( | 618 I->message_handler()->set_should_pause_on_start( |
| 616 FLAG_pause_isolates_on_start); | 619 FLAG_pause_isolates_on_start); |
| 617 I->message_handler()->set_should_pause_on_exit(FLAG_pause_isolates_on_exit); | 620 I->message_handler()->set_should_pause_on_exit(FLAG_pause_isolates_on_exit); |
| 618 } | 621 } |
| 622 ServiceIsolate::SendIsolateStartupMessage(); | |
| 623 I->debugger()->NotifyIsolateCreated(); | |
| 619 #endif // !defined(PRODUCT) | 624 #endif // !defined(PRODUCT) |
| 620 | 625 |
| 621 ServiceIsolate::SendIsolateStartupMessage(); | |
| 622 #if !defined(PRODUCT) | |
| 623 I->debugger()->NotifyIsolateCreated(); | |
| 624 #endif | |
| 625 | |
| 626 // Create tag table. | 626 // Create tag table. |
| 627 I->set_tag_table(GrowableObjectArray::Handle(GrowableObjectArray::New())); | 627 I->set_tag_table(GrowableObjectArray::Handle(GrowableObjectArray::New())); |
| 628 // Set up default UserTag. | 628 // Set up default UserTag. |
| 629 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); | 629 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); |
| 630 I->set_current_tag(default_tag); | 630 I->set_current_tag(default_tag); |
| 631 | 631 |
| 632 if (FLAG_keep_code) { | 632 if (FLAG_keep_code) { |
| 633 I->set_deoptimized_code_array( | 633 I->set_deoptimized_code_array( |
| 634 GrowableObjectArray::Handle(GrowableObjectArray::New())); | 634 GrowableObjectArray::Handle(GrowableObjectArray::New())); |
| 635 } | 635 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 746 ASSERT(predefined_handles_ != NULL); | 746 ASSERT(predefined_handles_ != NULL); |
| 747 return predefined_handles_->handles_.IsValidScopedHandle(address); | 747 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 748 } | 748 } |
| 749 | 749 |
| 750 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 750 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 751 ASSERT(predefined_handles_ != NULL); | 751 ASSERT(predefined_handles_ != NULL); |
| 752 return predefined_handles_->api_handles_.IsValidHandle(handle); | 752 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 753 } | 753 } |
| 754 | 754 |
| 755 } // namespace dart | 755 } // namespace dart |
| OLD | NEW |