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(TERMINATE_EXECUTION, TerminateExecution, 1) \ | 89 V(DEBUGCOMMAND, DebugCommand, 1) \ |
90 V(GC_REQUEST, GC, 2) \ | 90 V(TERMINATE_EXECUTION, TerminateExecution, 2) \ |
91 V(INSTALL_CODE, InstallCode, 3) \ | 91 V(GC_REQUEST, GC, 3) \ |
92 V(API_INTERRUPT, ApiInterrupt, 4) \ | 92 V(INSTALL_CODE, InstallCode, 4) \ |
93 V(DEOPT_MARKED_ALLOCATION_SITES, DeoptMarkedAllocationSites, 5) | 93 V(API_INTERRUPT, ApiInterrupt, 5) \ |
| 94 V(DEOPT_MARKED_ALLOCATION_SITES, DeoptMarkedAllocationSites, 6) |
94 | 95 |
95 #define V(NAME, Name, id) \ | 96 #define V(NAME, Name, id) \ |
96 inline bool Check##Name() { return CheckInterrupt(NAME); } \ | 97 inline bool Check##Name() { return CheckInterrupt(NAME); } \ |
97 inline void Request##Name() { RequestInterrupt(NAME); } \ | 98 inline void Request##Name() { RequestInterrupt(NAME); } \ |
98 inline void Clear##Name() { ClearInterrupt(NAME); } | 99 inline void Clear##Name() { ClearInterrupt(NAME); } |
99 INTERRUPT_LIST(V) | 100 INTERRUPT_LIST(V) |
100 #undef V | 101 #undef V |
101 | 102 |
102 // Flag used to set the interrupt causes. | 103 // Flag used to set the interrupt causes. |
103 enum InterruptFlag { | 104 enum InterruptFlag { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 friend class StackLimitCheck; | 223 friend class StackLimitCheck; |
223 friend class PostponeInterruptsScope; | 224 friend class PostponeInterruptsScope; |
224 | 225 |
225 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 226 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
226 }; | 227 }; |
227 | 228 |
228 } // namespace internal | 229 } // namespace internal |
229 } // namespace v8 | 230 } // namespace v8 |
230 | 231 |
231 #endif // V8_EXECUTION_H_ | 232 #endif // V8_EXECUTION_H_ |
OLD | NEW |