Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: runtime/vm/dart.cc

Issue 2981173002: Remove the debugger_ field from Isolate in a PRODUCT build (Closed)
Patch Set: Remove flag support_debugger Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 is_kernel_isolate = KernelIsolate::IsKernelIsolate(I); 610 is_kernel_isolate = KernelIsolate::IsKernelIsolate(I);
611 #endif 611 #endif
612 ServiceIsolate::MaybeMakeServiceIsolate(I); 612 ServiceIsolate::MaybeMakeServiceIsolate(I);
613 if (!ServiceIsolate::IsServiceIsolate(I) && !is_kernel_isolate) { 613 if (!ServiceIsolate::IsServiceIsolate(I) && !is_kernel_isolate) {
614 I->message_handler()->set_should_pause_on_start( 614 I->message_handler()->set_should_pause_on_start(
615 FLAG_pause_isolates_on_start); 615 FLAG_pause_isolates_on_start);
616 I->message_handler()->set_should_pause_on_exit(FLAG_pause_isolates_on_exit); 616 I->message_handler()->set_should_pause_on_exit(FLAG_pause_isolates_on_exit);
617 } 617 }
618 618
619 ServiceIsolate::SendIsolateStartupMessage(); 619 ServiceIsolate::SendIsolateStartupMessage();
620 if (FLAG_support_debugger) { 620 #if !defined(PRODUCT)
621 I->debugger()->NotifyIsolateCreated(); 621 I->debugger()->NotifyIsolateCreated();
622 } 622 #endif
623
623 // Create tag table. 624 // Create tag table.
624 I->set_tag_table(GrowableObjectArray::Handle(GrowableObjectArray::New())); 625 I->set_tag_table(GrowableObjectArray::Handle(GrowableObjectArray::New()));
625 // Set up default UserTag. 626 // Set up default UserTag.
626 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); 627 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag());
627 I->set_current_tag(default_tag); 628 I->set_current_tag(default_tag);
628 629
629 if (FLAG_keep_code) { 630 if (FLAG_keep_code) {
630 I->set_deoptimized_code_array( 631 I->set_deoptimized_code_array(
631 GrowableObjectArray::Handle(GrowableObjectArray::New())); 632 GrowableObjectArray::Handle(GrowableObjectArray::New()));
632 } 633 }
633 return Error::null(); 634 return Error::null();
634 } 635 }
635 636
636 const char* Dart::FeaturesString(Isolate* isolate, Snapshot::Kind kind) { 637 const char* Dart::FeaturesString(Isolate* isolate, Snapshot::Kind kind) {
637 TextBuffer buffer(64); 638 TextBuffer buffer(64);
638 639
639 // Different fields are included for DEBUG/RELEASE/PRODUCT. 640 // Different fields are included for DEBUG/RELEASE/PRODUCT.
640 #if defined(DEBUG) 641 #if defined(DEBUG)
641 buffer.AddString("debug"); 642 buffer.AddString("debug");
642 #elif defined(PRODUCT) 643 #elif defined(PRODUCT)
643 buffer.AddString("product"); 644 buffer.AddString("product");
644 #else 645 #else
645 buffer.AddString("release"); 646 buffer.AddString("release");
646 #endif 647 #endif
647 648
648 if (Snapshot::IncludesCode(kind)) { 649 if (Snapshot::IncludesCode(kind)) {
649 if (FLAG_support_debugger) {
650 buffer.AddString(" support-debugger");
651 }
652
653 // Checked mode affects deopt ids. 650 // Checked mode affects deopt ids.
654 #define ADD_FLAG(name, isolate_flag, flag) \ 651 #define ADD_FLAG(name, isolate_flag, flag) \
655 do { \ 652 do { \
656 const bool name = (isolate != NULL) ? isolate->name() : flag; \ 653 const bool name = (isolate != NULL) ? isolate->name() : flag; \
657 buffer.AddString(name ? (" " #name) : (" no-" #name)); \ 654 buffer.AddString(name ? (" " #name) : (" no-" #name)); \
658 } while (0); 655 } while (0);
659 ADD_FLAG(type_checks, enable_type_checks, FLAG_enable_type_checks); 656 ADD_FLAG(type_checks, enable_type_checks, FLAG_enable_type_checks);
660 ADD_FLAG(asserts, enable_asserts, FLAG_enable_asserts); 657 ADD_FLAG(asserts, enable_asserts, FLAG_enable_asserts);
661 ADD_FLAG(error_on_bad_type, enable_error_on_bad_type, 658 ADD_FLAG(error_on_bad_type, enable_error_on_bad_type,
662 FLAG_error_on_bad_type); 659 FLAG_error_on_bad_type);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 ASSERT(predefined_handles_ != NULL); 744 ASSERT(predefined_handles_ != NULL);
748 return predefined_handles_->handles_.IsValidScopedHandle(address); 745 return predefined_handles_->handles_.IsValidScopedHandle(address);
749 } 746 }
750 747
751 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 748 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
752 ASSERT(predefined_handles_ != NULL); 749 ASSERT(predefined_handles_ != NULL);
753 return predefined_handles_->api_handles_.IsValidHandle(handle); 750 return predefined_handles_->api_handles_.IsValidHandle(handle);
754 } 751 }
755 752
756 } // namespace dart 753 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698