OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_EXECUTION_H_ | 5 #ifndef V8_EXECUTION_H_ |
6 #define V8_EXECUTION_H_ | 6 #define V8_EXECUTION_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void FreeThreadResources(); | 79 void FreeThreadResources(); |
80 // Sets up the default stack guard for this thread if it has not | 80 // Sets up the default stack guard for this thread if it has not |
81 // already been set up. | 81 // already been set up. |
82 void InitThread(const ExecutionAccess& lock); | 82 void InitThread(const ExecutionAccess& lock); |
83 // Clears the stack guard for this thread so it does not look as if | 83 // Clears the stack guard for this thread so it does not look as if |
84 // it has been set up. | 84 // it has been set up. |
85 void ClearThread(const ExecutionAccess& lock); | 85 void ClearThread(const ExecutionAccess& lock); |
86 | 86 |
87 #define INTERRUPT_LIST(V) \ | 87 #define INTERRUPT_LIST(V) \ |
88 V(DEBUGBREAK, DebugBreak, 0) \ | 88 V(DEBUGBREAK, DebugBreak, 0) \ |
89 V(DEBUGCOMMAND, DebugCommand, 1) \ | 89 V(TERMINATE_EXECUTION, TerminateExecution, 1) \ |
90 V(TERMINATE_EXECUTION, TerminateExecution, 2) \ | 90 V(GC_REQUEST, GC, 2) \ |
91 V(GC_REQUEST, GC, 3) \ | 91 V(INSTALL_CODE, InstallCode, 3) \ |
92 V(INSTALL_CODE, InstallCode, 4) \ | 92 V(API_INTERRUPT, ApiInterrupt, 4) \ |
93 V(API_INTERRUPT, ApiInterrupt, 5) \ | 93 V(DEOPT_MARKED_ALLOCATION_SITES, DeoptMarkedAllocationSites, 5) |
94 V(DEOPT_MARKED_ALLOCATION_SITES, DeoptMarkedAllocationSites, 6) | |
95 | 94 |
96 #define V(NAME, Name, id) \ | 95 #define V(NAME, Name, id) \ |
97 inline bool Check##Name() { return CheckInterrupt(NAME); } \ | 96 inline bool Check##Name() { return CheckInterrupt(NAME); } \ |
98 inline void Request##Name() { RequestInterrupt(NAME); } \ | 97 inline void Request##Name() { RequestInterrupt(NAME); } \ |
99 inline void Clear##Name() { ClearInterrupt(NAME); } | 98 inline void Clear##Name() { ClearInterrupt(NAME); } |
100 INTERRUPT_LIST(V) | 99 INTERRUPT_LIST(V) |
101 #undef V | 100 #undef V |
102 | 101 |
103 // Flag used to set the interrupt causes. | 102 // Flag used to set the interrupt causes. |
104 enum InterruptFlag { | 103 enum InterruptFlag { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 friend class StackLimitCheck; | 222 friend class StackLimitCheck; |
224 friend class PostponeInterruptsScope; | 223 friend class PostponeInterruptsScope; |
225 | 224 |
226 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 225 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
227 }; | 226 }; |
228 | 227 |
229 } // namespace internal | 228 } // namespace internal |
230 } // namespace v8 | 229 } // namespace v8 |
231 | 230 |
232 #endif // V8_EXECUTION_H_ | 231 #endif // V8_EXECUTION_H_ |
OLD | NEW |