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

Side by Side Diff: runtime/vm/isolate.h

Issue 2995723002: - Convert all isolate flags to a bit field. (Closed)
Patch Set: Address build error. Created 3 years, 4 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/debugger.cc ('k') | runtime/vm/isolate.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 #ifndef RUNTIME_VM_ISOLATE_H_ 5 #ifndef RUNTIME_VM_ISOLATE_H_
6 #define RUNTIME_VM_ISOLATE_H_ 6 #define RUNTIME_VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 typedef FixedCache<intptr_t, ExceptionHandlerInfo, 16> HandlerInfoCache; 125 typedef FixedCache<intptr_t, ExceptionHandlerInfo, 16> HandlerInfoCache;
126 // Fixed cache for catch entry state lookup. 126 // Fixed cache for catch entry state lookup.
127 typedef FixedCache<intptr_t, CatchEntryState, 16> CatchEntryStateCache; 127 typedef FixedCache<intptr_t, CatchEntryState, 16> CatchEntryStateCache;
128 128
129 // List of Isolate flags with corresponding members of Dart_IsolateFlags and 129 // List of Isolate flags with corresponding members of Dart_IsolateFlags and
130 // corresponding global command line flags. 130 // corresponding global command line flags.
131 // 131 //
132 // V(name, Dart_IsolateFlags-member-name, command-line-flag-name) 132 // V(name, Dart_IsolateFlags-member-name, command-line-flag-name)
133 // 133 //
134 #define ISOLATE_FLAG_LIST(V) \ 134 #define ISOLATE_FLAG_LIST(V) \
135 V(type_checks, enable_type_checks, FLAG_enable_type_checks) \ 135 V(type_checks, EnableTypeChecks, enable_type_checks, \
136 V(asserts, enable_asserts, FLAG_enable_asserts) \ 136 FLAG_enable_type_checks) \
137 V(error_on_bad_type, enable_error_on_bad_type, FLAG_error_on_bad_type) \ 137 V(asserts, EnableAsserts, enable_asserts, FLAG_enable_asserts) \
138 V(error_on_bad_override, enable_error_on_bad_override, \ 138 V(error_on_bad_type, ErrorOnBadType, enable_error_on_bad_type, \
139 FLAG_error_on_bad_type) \
140 V(error_on_bad_override, ErrorOnBadOverride, enable_error_on_bad_override, \
139 FLAG_error_on_bad_override) \ 141 FLAG_error_on_bad_override) \
140 V(use_field_guards, use_field_guards, FLAG_use_field_guards) \ 142 V(use_field_guards, UseFieldGuards, use_field_guards, FLAG_use_field_guards) \
141 V(use_osr, use_osr, FLAG_use_osr) 143 V(use_osr, UseOsr, use_osr, FLAG_use_osr)
142 144
143 class Isolate : public BaseIsolate { 145 class Isolate : public BaseIsolate {
144 public: 146 public:
145 // Keep both these enums in sync with isolate_patch.dart. 147 // Keep both these enums in sync with isolate_patch.dart.
146 // The different Isolate API message types. 148 // The different Isolate API message types.
147 enum LibMsgId { 149 enum LibMsgId {
148 kPauseMsg = 1, 150 kPauseMsg = 1,
149 kResumeMsg = 2, 151 kResumeMsg = 2,
150 kPingMsg = 3, 152 kPingMsg = 3,
151 kKillMsg = 4, 153 kKillMsg = 4,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 const char* root_script_url = NULL, 288 const char* root_script_url = NULL,
287 const char* packages_url = NULL, 289 const char* packages_url = NULL,
288 bool dont_delete_reload_context = false); 290 bool dont_delete_reload_context = false);
289 291
290 bool MakeRunnable(); 292 bool MakeRunnable();
291 void Run(); 293 void Run();
292 294
293 MessageHandler* message_handler() const { return message_handler_; } 295 MessageHandler* message_handler() const { return message_handler_; }
294 void set_message_handler(MessageHandler* value) { message_handler_ = value; } 296 void set_message_handler(MessageHandler* value) { message_handler_ = value; }
295 297
296 bool is_runnable() const { return is_runnable_; } 298 bool is_runnable() const { return RunnableBit::decode(isolate_flags_); }
297 void set_is_runnable(bool value) { 299 void set_is_runnable(bool value) {
298 is_runnable_ = value; 300 isolate_flags_ = RunnableBit::update(value, isolate_flags_);
299 #if !defined(PRODUCT) 301 #if !defined(PRODUCT)
300 if (is_runnable_) { 302 if (is_runnable()) {
301 set_last_resume_timestamp(); 303 set_last_resume_timestamp();
302 } 304 }
303 #endif 305 #endif
304 } 306 }
305 307
306 IsolateSpawnState* spawn_state() const { return spawn_state_; } 308 IsolateSpawnState* spawn_state() const { return spawn_state_; }
307 void set_spawn_state(IsolateSpawnState* value) { spawn_state_ = value; } 309 void set_spawn_state(IsolateSpawnState* value) { spawn_state_ = value; }
308 310
309 Mutex* mutex() const { return mutex_; } 311 Mutex* mutex() const { return mutex_; }
310 Mutex* symbols_mutex() const { return symbols_mutex_; } 312 Mutex* symbols_mutex() const { return symbols_mutex_; }
(...skipping 12 matching lines...) Expand all
323 } 325 }
324 #endif 326 #endif
325 327
326 void set_single_step(bool value) { single_step_ = value; } 328 void set_single_step(bool value) { single_step_ = value; }
327 bool single_step() const { return single_step_; } 329 bool single_step() const { return single_step_; }
328 static intptr_t single_step_offset() { 330 static intptr_t single_step_offset() {
329 return OFFSET_OF(Isolate, single_step_); 331 return OFFSET_OF(Isolate, single_step_);
330 } 332 }
331 333
332 #if !defined(PRODUCT) 334 #if !defined(PRODUCT)
335 bool ResumeRequest() const {
336 return ResumeRequestBit::decode(isolate_flags_);
337 }
333 // Lets the embedder know that a service message resulted in a resume request. 338 // Lets the embedder know that a service message resulted in a resume request.
334 void SetResumeRequest() { 339 void SetResumeRequest() {
335 resume_request_ = true; 340 isolate_flags_ = ResumeRequestBit::update(true, isolate_flags_);
336 set_last_resume_timestamp(); 341 set_last_resume_timestamp();
337 } 342 }
338 343
339 void set_last_resume_timestamp() { 344 void set_last_resume_timestamp() {
340 last_resume_timestamp_ = OS::GetCurrentTimeMillis(); 345 last_resume_timestamp_ = OS::GetCurrentTimeMillis();
341 } 346 }
342 347
343 int64_t last_resume_timestamp() const { return last_resume_timestamp_; } 348 int64_t last_resume_timestamp() const { return last_resume_timestamp_; }
344 349
345 // Returns whether the vm service has requested that the debugger 350 // Returns whether the vm service has requested that the debugger
346 // resume execution. 351 // resume execution.
347 bool GetAndClearResumeRequest() { 352 bool GetAndClearResumeRequest() {
348 bool resume_request = resume_request_; 353 bool resume_request = ResumeRequestBit::decode(isolate_flags_);
349 resume_request_ = false; 354 isolate_flags_ = ResumeRequestBit::update(false, isolate_flags_);
350 return resume_request; 355 return resume_request;
351 } 356 }
352 #endif 357 #endif
353 358
354 // Verify that the sender has the capability to pause or terminate the 359 // Verify that the sender has the capability to pause or terminate the
355 // isolate. 360 // isolate.
356 bool VerifyPauseCapability(const Object& capability) const; 361 bool VerifyPauseCapability(const Object& capability) const;
357 bool VerifyTerminateCapability(const Object& capability) const; 362 bool VerifyTerminateCapability(const Object& capability) const;
358 363
359 // Returns true if the capability was added or removed from this isolate's 364 // Returns true if the capability was added or removed from this isolate's
360 // list of pause events. 365 // list of pause events.
361 bool AddResumeCapability(const Capability& capability); 366 bool AddResumeCapability(const Capability& capability);
362 bool RemoveResumeCapability(const Capability& capability); 367 bool RemoveResumeCapability(const Capability& capability);
363 368
364 void AddExitListener(const SendPort& listener, const Instance& response); 369 void AddExitListener(const SendPort& listener, const Instance& response);
365 void RemoveExitListener(const SendPort& listener); 370 void RemoveExitListener(const SendPort& listener);
366 void NotifyExitListeners(); 371 void NotifyExitListeners();
367 372
368 void AddErrorListener(const SendPort& listener); 373 void AddErrorListener(const SendPort& listener);
369 void RemoveErrorListener(const SendPort& listener); 374 void RemoveErrorListener(const SendPort& listener);
370 bool NotifyErrorListeners(const String& msg, const String& stacktrace); 375 bool NotifyErrorListeners(const String& msg, const String& stacktrace);
371 376
372 bool ErrorsFatal() const { return errors_fatal_; } 377 bool ErrorsFatal() const { return ErrorsFatalBit::decode(isolate_flags_); }
373 void SetErrorsFatal(bool val) { errors_fatal_ = val; } 378 void SetErrorsFatal(bool val) {
379 isolate_flags_ = ErrorsFatalBit::update(val, isolate_flags_);
380 }
374 381
375 Random* random() { return &random_; } 382 Random* random() { return &random_; }
376 383
377 Simulator* simulator() const { return simulator_; } 384 Simulator* simulator() const { return simulator_; }
378 void set_simulator(Simulator* value) { simulator_ = value; } 385 void set_simulator(Simulator* value) { simulator_ = value; }
379 386
380 Dart_GcPrologueCallback gc_prologue_callback() const { 387 Dart_GcPrologueCallback gc_prologue_callback() const {
381 return gc_prologue_callback_; 388 return gc_prologue_callback_;
382 } 389 }
383 390
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 514
508 #if !defined(PRODUCT) 515 #if !defined(PRODUCT)
509 VMTagCounters* vm_tag_counters() { return &vm_tag_counters_; } 516 VMTagCounters* vm_tag_counters() { return &vm_tag_counters_; }
510 517
511 bool IsReloading() const { return reload_context_ != NULL; } 518 bool IsReloading() const { return reload_context_ != NULL; }
512 519
513 IsolateReloadContext* reload_context() { return reload_context_; } 520 IsolateReloadContext* reload_context() { return reload_context_; }
514 521
515 void DeleteReloadContext(); 522 void DeleteReloadContext();
516 523
517 bool HasAttemptedReload() const { return has_attempted_reload_; } 524 bool HasAttemptedReload() const {
525 return HasAttemptedReloadBit::decode(isolate_flags_);
526 }
527 void SetHasAttemptedReload(bool value) {
528 isolate_flags_ = HasAttemptedReloadBit::update(value, isolate_flags_);
529 }
518 530
519 bool CanReload() const; 531 bool CanReload() const;
520 532
521 void set_last_reload_timestamp(int64_t value) { 533 void set_last_reload_timestamp(int64_t value) {
522 last_reload_timestamp_ = value; 534 last_reload_timestamp_ = value;
523 } 535 }
524 int64_t last_reload_timestamp() const { return last_reload_timestamp_; } 536 int64_t last_reload_timestamp() const { return last_reload_timestamp_; }
525 #endif // !defined(PRODUCT) 537 #endif // !defined(PRODUCT)
526 538
527 bool IsPaused() const; 539 bool IsPaused() const;
528 540
529 #if !defined(PRODUCT) 541 #if !defined(PRODUCT)
530 bool should_pause_post_service_request() const { 542 bool should_pause_post_service_request() const {
531 return should_pause_post_service_request_; 543 return ShouldPausePostServiceRequestBit::decode(isolate_flags_);
532 } 544 }
533 void set_should_pause_post_service_request( 545 void set_should_pause_post_service_request(bool value) {
534 bool should_pause_post_service_request) { 546 isolate_flags_ =
535 should_pause_post_service_request_ = should_pause_post_service_request; 547 ShouldPausePostServiceRequestBit::update(value, isolate_flags_);
536 } 548 }
537 #endif // !defined(PRODUCT) 549 #endif // !defined(PRODUCT)
538 550
551 bool use_dart_frontend() const {
552 return UseDartFrontEndBit::decode(isolate_flags_);
553 }
554 void set_use_dart_frontend(bool value) {
555 isolate_flags_ = UseDartFrontEndBit::update(value, isolate_flags_);
556 }
557
539 RawError* PausePostRequest(); 558 RawError* PausePostRequest();
540 559
541 uword user_tag() const { return user_tag_; } 560 uword user_tag() const { return user_tag_; }
542 static intptr_t user_tag_offset() { return OFFSET_OF(Isolate, user_tag_); } 561 static intptr_t user_tag_offset() { return OFFSET_OF(Isolate, user_tag_); }
543 static intptr_t current_tag_offset() { 562 static intptr_t current_tag_offset() {
544 return OFFSET_OF(Isolate, current_tag_); 563 return OFFSET_OF(Isolate, current_tag_);
545 } 564 }
546 static intptr_t default_tag_offset() { 565 static intptr_t default_tag_offset() {
547 return OFFSET_OF(Isolate, default_tag_); 566 return OFFSET_OF(Isolate, default_tag_);
548 } 567 }
(...skipping 28 matching lines...) Expand all
577 } 596 }
578 void set_deoptimized_code_array(const GrowableObjectArray& value); 597 void set_deoptimized_code_array(const GrowableObjectArray& value);
579 void TrackDeoptimizedCode(const Code& code); 598 void TrackDeoptimizedCode(const Code& code);
580 599
581 // Also sends a paused at exit event over the service protocol. 600 // Also sends a paused at exit event over the service protocol.
582 void SetStickyError(RawError* sticky_error); 601 void SetStickyError(RawError* sticky_error);
583 602
584 RawError* sticky_error() const { return sticky_error_; } 603 RawError* sticky_error() const { return sticky_error_; }
585 void clear_sticky_error(); 604 void clear_sticky_error();
586 605
587 bool compilation_allowed() const { return compilation_allowed_; } 606 bool compilation_allowed() const {
588 void set_compilation_allowed(bool allowed) { compilation_allowed_ = allowed; } 607 return CompilationAllowedBit::decode(isolate_flags_);
608 }
609 void set_compilation_allowed(bool allowed) {
610 isolate_flags_ = CompilationAllowedBit::update(allowed, isolate_flags_);
611 }
589 612
590 // In precompilation we finalize all regular classes before compiling. 613 // In precompilation we finalize all regular classes before compiling.
591 bool all_classes_finalized() const { return all_classes_finalized_; } 614 bool all_classes_finalized() const {
592 void set_all_classes_finalized(bool value) { all_classes_finalized_ = value; } 615 return AllClassesFinalizedBit::decode(isolate_flags_);
616 }
617 void set_all_classes_finalized(bool value) {
618 isolate_flags_ = AllClassesFinalizedBit::update(value, isolate_flags_);
619 }
593 620
594 void set_remapping_cids(bool value) { remapping_cids_ = value; } 621 bool remapping_cids() const {
622 return RemappingCidsBit::decode(isolate_flags_);
623 }
624 void set_remapping_cids(bool value) {
625 isolate_flags_ = RemappingCidsBit::update(value, isolate_flags_);
626 }
595 627
596 // True during top level parsing. 628 // True during top level parsing.
597 bool IsTopLevelParsing() { 629 bool IsTopLevelParsing() {
598 const intptr_t value = 630 const intptr_t value =
599 AtomicOperations::LoadRelaxed(&top_level_parsing_count_); 631 AtomicOperations::LoadRelaxed(&top_level_parsing_count_);
600 ASSERT(value >= 0); 632 ASSERT(value >= 0);
601 return value > 0; 633 return value > 0;
602 } 634 }
603 635
604 void IncrTopLevelParsingCount() { 636 void IncrTopLevelParsingCount() {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // Handle service messages until we are told to resume execution. 677 // Handle service messages until we are told to resume execution.
646 void PauseEventHandler(); 678 void PauseEventHandler();
647 #endif 679 #endif
648 680
649 void AddClosureFunction(const Function& function) const; 681 void AddClosureFunction(const Function& function) const;
650 RawFunction* LookupClosureFunction(const Function& parent, 682 RawFunction* LookupClosureFunction(const Function& parent,
651 TokenPosition token_pos) const; 683 TokenPosition token_pos) const;
652 intptr_t FindClosureIndex(const Function& needle) const; 684 intptr_t FindClosureIndex(const Function& needle) const;
653 RawFunction* ClosureFunctionFromIndex(intptr_t idx) const; 685 RawFunction* ClosureFunctionFromIndex(intptr_t idx) const;
654 686
655 bool is_service_isolate() const { return is_service_isolate_; } 687 bool is_service_isolate() const {
688 return ServiceIsolateBit::decode(isolate_flags_);
689 }
690 void set_is_service_isolate(bool value) {
691 isolate_flags_ = ServiceIsolateBit::update(value, isolate_flags_);
692 }
656 693
657 // Isolate-specific flag handling. 694 // Isolate-specific flag handling.
658 static void FlagsInitialize(Dart_IsolateFlags* api_flags); 695 static void FlagsInitialize(Dart_IsolateFlags* api_flags);
659 void FlagsCopyTo(Dart_IsolateFlags* api_flags) const; 696 void FlagsCopyTo(Dart_IsolateFlags* api_flags) const;
660 void FlagsCopyFrom(const Dart_IsolateFlags& api_flags); 697 void FlagsCopyFrom(const Dart_IsolateFlags& api_flags);
661 698
662 #if defined(PRODUCT) 699 #if defined(PRODUCT)
663 #define DECLARE_GETTER(name, isolate_flag_name, flag_name) \ 700 #define DECLARE_GETTER(name, bitname, isolate_flag_name, flag_name) \
664 bool name() const { return flag_name; } 701 bool name() const { return flag_name; }
665 ISOLATE_FLAG_LIST(DECLARE_GETTER) 702 ISOLATE_FLAG_LIST(DECLARE_GETTER)
666 #undef DECLARE_GETTER 703 #undef DECLARE_GETTER
667 void set_use_osr(bool use_osr) { ASSERT(!use_osr); } 704 void set_use_osr(bool use_osr) { ASSERT(!use_osr); }
668 #else // defined(PRODUCT) 705 #else // defined(PRODUCT)
669 #define DECLARE_GETTER(name, isolate_flag_name, flag_name) \ 706 #define DECLARE_GETTER(name, bitname, isolate_flag_name, flag_name) \
670 bool name() const { return name##_; } 707 bool name() const { return bitname##Bit::decode(isolate_flags_); }
671 ISOLATE_FLAG_LIST(DECLARE_GETTER) 708 ISOLATE_FLAG_LIST(DECLARE_GETTER)
672 #undef DECLARE_GETTER 709 #undef DECLARE_GETTER
673 void set_use_osr(bool use_osr) { use_osr_ = use_osr; } 710 void set_use_osr(bool use_osr) {
711 isolate_flags_ = UseOsrBit::update(use_osr, isolate_flags_);
712 }
674 #endif // defined(PRODUCT) 713 #endif // defined(PRODUCT)
675 714
676 static void KillAllIsolates(LibMsgId msg_id); 715 static void KillAllIsolates(LibMsgId msg_id);
677 static void KillIfExists(Isolate* isolate, LibMsgId msg_id); 716 static void KillIfExists(Isolate* isolate, LibMsgId msg_id);
678 717
679 static void DisableIsolateCreation(); 718 static void DisableIsolateCreation();
680 static void EnableIsolateCreation(); 719 static void EnableIsolateCreation();
681 static bool IsolateCreationEnabled(); 720 static bool IsolateCreationEnabled();
682 721
683 void StopBackgroundCompiler(); 722 void StopBackgroundCompiler();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 StoreBuffer* store_buffer_; 798 StoreBuffer* store_buffer_;
760 Heap* heap_; 799 Heap* heap_;
761 uword user_tag_; 800 uword user_tag_;
762 RawUserTag* current_tag_; 801 RawUserTag* current_tag_;
763 RawUserTag* default_tag_; 802 RawUserTag* default_tag_;
764 RawCode* ic_miss_code_; 803 RawCode* ic_miss_code_;
765 ObjectStore* object_store_; 804 ObjectStore* object_store_;
766 ClassTable class_table_; 805 ClassTable class_table_;
767 bool single_step_; 806 bool single_step_;
768 807
769 // Try to keep boolean fields together. 808 // Isolate specific flags.
770 bool errors_fatal_; 809 enum FlagBits {
771 bool is_runnable_; 810 kErrorsFatalBit = 0,
772 bool is_service_isolate_; 811 kIsRunnableBit = 1,
773 bool compilation_allowed_; 812 kIsServiceIsolateBit = 2,
774 bool all_classes_finalized_; 813 kCompilationAllowedBit = 3,
775 bool remapping_cids_; 814 kAllClassesFinalizedBit = 4,
815 kRemappingCidsBit = 5,
816 kResumeRequestBit = 6,
817 kHasAttemptedReloadBit = 7,
818 kShouldPausePostServiceRequestBit = 8,
819 kUseDartFrontEndBit = 9,
820 kEnableTypeChecksBit = 10,
821 kEnableAssertsBit = 11,
822 kErrorOnBadTypeBit = 12,
823 kErrorOnBadOverrideBit = 13,
824 kUseFieldGuardsBit = 14,
825 kUseOsrBit = 15,
826 };
827 class ErrorsFatalBit : public BitField<uint32_t, bool, kErrorsFatalBit, 1> {};
828 class RunnableBit : public BitField<uint32_t, bool, kIsRunnableBit, 1> {};
829 class ServiceIsolateBit
830 : public BitField<uint32_t, bool, kIsServiceIsolateBit, 1> {};
831 class CompilationAllowedBit
832 : public BitField<uint32_t, bool, kCompilationAllowedBit, 1> {};
833 class AllClassesFinalizedBit
834 : public BitField<uint32_t, bool, kAllClassesFinalizedBit, 1> {};
835 class RemappingCidsBit
836 : public BitField<uint32_t, bool, kRemappingCidsBit, 1> {};
837 class ResumeRequestBit
838 : public BitField<uint32_t, bool, kResumeRequestBit, 1> {};
839 class HasAttemptedReloadBit
840 : public BitField<uint32_t, bool, kHasAttemptedReloadBit, 1> {};
841 class ShouldPausePostServiceRequestBit
842 : public BitField<uint32_t, bool, kShouldPausePostServiceRequestBit, 1> {
843 };
844 class UseDartFrontEndBit
845 : public BitField<uint32_t, bool, kUseDartFrontEndBit, 1> {};
846 class EnableTypeChecksBit
847 : public BitField<uint32_t, bool, kEnableTypeChecksBit, 1> {};
848 class EnableAssertsBit
849 : public BitField<uint32_t, bool, kEnableAssertsBit, 1> {};
850 class ErrorOnBadTypeBit
851 : public BitField<uint32_t, bool, kErrorOnBadTypeBit, 1> {};
852 class ErrorOnBadOverrideBit
853 : public BitField<uint32_t, bool, kErrorOnBadOverrideBit, 1> {};
854 class UseFieldGuardsBit
855 : public BitField<uint32_t, bool, kUseFieldGuardsBit, 1> {};
856 class UseOsrBit : public BitField<uint32_t, bool, kUseOsrBit, 1> {};
857 uint32_t isolate_flags_;
858
859 // Background compilation.
860 int16_t background_compiler_disabled_depth_;
861 BackgroundCompiler* background_compiler_;
776 862
777 // Fields that aren't needed in a product build go here with boolean flags at 863 // Fields that aren't needed in a product build go here with boolean flags at
778 // the top. 864 // the top.
779 #if !defined(PRODUCT) 865 #if !defined(PRODUCT)
780 bool resume_request_;
781 bool has_attempted_reload_; // Has a reload ever been attempted?
782 // Should we pause in the debug message loop after this request?
783 bool should_pause_post_service_request_;
784
785 char* debugger_name_; 866 char* debugger_name_;
786 Debugger* debugger_; 867 Debugger* debugger_;
787 int64_t last_resume_timestamp_; 868 int64_t last_resume_timestamp_;
788 869
789 // Isolate-specific flags.
790 #define DECLARE_FIELD(name, isolate_flag_name, flag_name) bool name##_;
791 ISOLATE_FLAG_LIST(DECLARE_FIELD)
792 #undef DECLARE_FIELD
793
794 // Timestamps of last operation via service. 870 // Timestamps of last operation via service.
795 int64_t last_allocationprofile_accumulator_reset_timestamp_; 871 int64_t last_allocationprofile_accumulator_reset_timestamp_;
796 int64_t last_allocationprofile_gc_timestamp_; 872 int64_t last_allocationprofile_gc_timestamp_;
797 873
798 VMTagCounters vm_tag_counters_; 874 VMTagCounters vm_tag_counters_;
799 875
800 // We use 6 list entries for each pending service extension calls. 876 // We use 6 list entries for each pending service extension calls.
801 enum { 877 enum {
802 kPendingHandlerIndex = 0, 878 kPendingHandlerIndex = 0,
803 kPendingMethodNameIndex, 879 kPendingMethodNameIndex,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 intptr_t defer_finalization_count_; 940 intptr_t defer_finalization_count_;
865 MallocGrowableArray<PendingLazyDeopt>* pending_deopts_; 941 MallocGrowableArray<PendingLazyDeopt>* pending_deopts_;
866 DeoptContext* deopt_context_; 942 DeoptContext* deopt_context_;
867 943
868 RawGrowableObjectArray* tag_table_; 944 RawGrowableObjectArray* tag_table_;
869 945
870 RawGrowableObjectArray* deoptimized_code_array_; 946 RawGrowableObjectArray* deoptimized_code_array_;
871 947
872 RawError* sticky_error_; 948 RawError* sticky_error_;
873 949
874 // Background compilation.
875 BackgroundCompiler* background_compiler_;
876 intptr_t background_compiler_disabled_depth_;
877
878 // Isolate list next pointer. 950 // Isolate list next pointer.
879 Isolate* next_; 951 Isolate* next_;
880 952
881 // Invalidation generations; used to track events occurring in parallel 953 // Invalidation generations; used to track events occurring in parallel
882 // to background compilation. The counters may overflow, which is OK 954 // to background compilation. The counters may overflow, which is OK
883 // since we check for equality to detect if an event occured. 955 // since we check for equality to detect if an event occured.
884 intptr_t loading_invalidation_gen_; 956 intptr_t loading_invalidation_gen_;
885 intptr_t top_level_parsing_count_; 957 intptr_t top_level_parsing_count_;
886 958
887 // Protect access to boxed_field_list_. 959 // Protect access to boxed_field_list_.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 intptr_t* spawn_count_; 1126 intptr_t* spawn_count_;
1055 1127
1056 Dart_IsolateFlags isolate_flags_; 1128 Dart_IsolateFlags isolate_flags_;
1057 bool paused_; 1129 bool paused_;
1058 bool errors_are_fatal_; 1130 bool errors_are_fatal_;
1059 }; 1131 };
1060 1132
1061 } // namespace dart 1133 } // namespace dart
1062 1134
1063 #endif // RUNTIME_VM_ISOLATE_H_ 1135 #endif // RUNTIME_VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698