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

Unified Diff: runtime/vm/isolate.h

Issue 1344993002: Refactor isolate interrupts to use OOB messages instead of interrupt bits. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code review 2 Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index fd303176efebd55419cd3663c827405530c3c1f6..7f59321f13e83b0338066adc027559e9602bb455 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -113,6 +113,27 @@ class IsolateVisitor {
class Isolate : public BaseIsolate {
public:
+ // Keep both these enums in sync with isolate_patch.dart.
+ // The different Isolate API message types.
+ enum LibMsgId {
+ kPauseMsg = 1,
+ kResumeMsg = 2,
+ kPingMsg = 3,
+ kKillMsg = 4,
+ kAddExitMsg = 5,
+ kDelExitMsg = 6,
+ kAddErrorMsg = 7,
+ kDelErrorMsg = 8,
+ kErrorFatalMsg = 9,
+ kInterruptMsg = 10,
+ };
+ // The different Isolate API message priorities for ping and kill messages.
+ enum LibMsgPriority {
+ kImmediateAction = 0,
+ kBeforeNextEventAction = 1,
+ kAsEventAction = 2
+ };
+
~Isolate();
static inline Isolate* Current() {
@@ -185,6 +206,8 @@ class Isolate : public BaseIsolate {
}
uint64_t terminate_capability() const { return terminate_capability_; }
+ void SendInternalLibMessage(LibMsgId msg_id, uint64_t capability);
+
Heap* heap() const { return heap_; }
void set_heap(Heap* value) { heap_ = value; }
static intptr_t heap_offset() { return OFFSET_OF(Isolate, heap_); }
@@ -319,17 +342,14 @@ class Isolate : public BaseIsolate {
// Interrupt bits.
enum {
- kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate.
+ kVMInterrupt = 0x1, // Internal VM checks: safepoints, store buffers, etc.
kMessageInterrupt = 0x2, // An interrupt to process an out of band message.
- kVMInterrupt = 0x4, // Internal VM checks: safepoints, store buffers, etc.
- kInterruptsMask =
- kApiInterrupt |
- kMessageInterrupt |
- kVMInterrupt,
+ kInterruptsMask = (kVMInterrupt | kMessageInterrupt),
};
void ScheduleInterrupts(uword interrupt_bits);
+ RawError* HandleInterrupts();
uword GetAndClearInterrupts();
// Marks all libraries as loaded.
« 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