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

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

Issue 1666323002: Don't allow oob message interrupts while executing constant expressions in the parser. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
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 VM_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 kVMInterrupt = 0x1, // Internal VM checks: safepoints, store buffers, etc. 279 kVMInterrupt = 0x1, // Internal VM checks: safepoints, store buffers, etc.
280 kMessageInterrupt = 0x2, // An interrupt to process an out of band message. 280 kMessageInterrupt = 0x2, // An interrupt to process an out of band message.
281 281
282 kInterruptsMask = (kVMInterrupt | kMessageInterrupt), 282 kInterruptsMask = (kVMInterrupt | kMessageInterrupt),
283 }; 283 };
284 284
285 void ScheduleInterrupts(uword interrupt_bits); 285 void ScheduleInterrupts(uword interrupt_bits);
286 RawError* HandleInterrupts(); 286 RawError* HandleInterrupts();
287 uword GetAndClearInterrupts(); 287 uword GetAndClearInterrupts();
288 288
289 void DeferMessageInterrupts();
290 void RestoreMessageInterrupts();
291
289 // Marks all libraries as loaded. 292 // Marks all libraries as loaded.
290 void DoneLoading(); 293 void DoneLoading();
291 294
292 bool MakeRunnable(); 295 bool MakeRunnable();
293 void Run(); 296 void Run();
294 297
295 MessageHandler* message_handler() const { return message_handler_; } 298 MessageHandler* message_handler() const { return message_handler_; }
296 void set_message_handler(MessageHandler* value) { message_handler_ = value; } 299 void set_message_handler(MessageHandler* value) { message_handler_ = value; }
297 300
298 bool is_runnable() const { return is_runnable_; } 301 bool is_runnable() const { return is_runnable_; }
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 ApiState* api_state_; 740 ApiState* api_state_;
738 Debugger* debugger_; 741 Debugger* debugger_;
739 bool resume_request_; 742 bool resume_request_;
740 int64_t last_resume_timestamp_; 743 int64_t last_resume_timestamp_;
741 bool has_compiled_code_; // Can check that no compilation occured. 744 bool has_compiled_code_; // Can check that no compilation occured.
742 Flags flags_; 745 Flags flags_;
743 Random random_; 746 Random random_;
744 Simulator* simulator_; 747 Simulator* simulator_;
745 Mutex* mutex_; // protects stack_limit_, saved_stack_limit_, compiler stats. 748 Mutex* mutex_; // protects stack_limit_, saved_stack_limit_, compiler stats.
746 uword saved_stack_limit_; 749 uword saved_stack_limit_;
750 uword deferred_interrupts_mask_;
751 uword deferred_interrupts_;
747 uword stack_overflow_flags_; 752 uword stack_overflow_flags_;
748 int32_t stack_overflow_count_; 753 int32_t stack_overflow_count_;
749 MessageHandler* message_handler_; 754 MessageHandler* message_handler_;
750 IsolateSpawnState* spawn_state_; 755 IsolateSpawnState* spawn_state_;
751 bool is_runnable_; 756 bool is_runnable_;
752 Dart_GcPrologueCallback gc_prologue_callback_; 757 Dart_GcPrologueCallback gc_prologue_callback_;
753 Dart_GcEpilogueCallback gc_epilogue_callback_; 758 Dart_GcEpilogueCallback gc_epilogue_callback_;
754 intptr_t defer_finalization_count_; 759 intptr_t defer_finalization_count_;
755 DeoptContext* deopt_context_; 760 DeoptContext* deopt_context_;
756 761
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 friend class Reusable##name##HandleScope; 862 friend class Reusable##name##HandleScope;
858 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) 863 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION)
859 #undef REUSABLE_FRIEND_DECLARATION 864 #undef REUSABLE_FRIEND_DECLARATION
860 865
861 friend class GCMarker; // VisitObjectPointers 866 friend class GCMarker; // VisitObjectPointers
862 friend class SafepointHandler; 867 friend class SafepointHandler;
863 friend class Scavenger; // VisitObjectPointers 868 friend class Scavenger; // VisitObjectPointers
864 friend class ServiceIsolate; 869 friend class ServiceIsolate;
865 friend class Thread; 870 friend class Thread;
866 friend class Timeline; 871 friend class Timeline;
872 friend class IsolateTestHelper;
867 873
868 DISALLOW_COPY_AND_ASSIGN(Isolate); 874 DISALLOW_COPY_AND_ASSIGN(Isolate);
869 }; 875 };
870 876
871 877
872 // When we need to execute code in an isolate, we use the 878 // When we need to execute code in an isolate, we use the
873 // StartIsolateScope. 879 // StartIsolateScope.
874 class StartIsolateScope { 880 class StartIsolateScope {
875 public: 881 public:
876 explicit StartIsolateScope(Isolate* new_isolate) 882 explicit StartIsolateScope(Isolate* new_isolate)
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 intptr_t* spawn_count_; 997 intptr_t* spawn_count_;
992 998
993 Isolate::Flags isolate_flags_; 999 Isolate::Flags isolate_flags_;
994 bool paused_; 1000 bool paused_;
995 bool errors_are_fatal_; 1001 bool errors_are_fatal_;
996 }; 1002 };
997 1003
998 } // namespace dart 1004 } // namespace dart
999 1005
1000 #endif // VM_ISOLATE_H_ 1006 #endif // VM_ISOLATE_H_
OLDNEW
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698