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 "handles.h" | 8 #include "handles.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 INTERRUPT_LIST(V) | 205 INTERRUPT_LIST(V) |
206 #undef V | 206 #undef V |
207 NUMBER_OF_INTERRUPTS | 207 NUMBER_OF_INTERRUPTS |
208 }; | 208 }; |
209 | 209 |
210 bool CheckInterrupt(int flagbit); | 210 bool CheckInterrupt(int flagbit); |
211 void RequestInterrupt(int flagbit); | 211 void RequestInterrupt(int flagbit); |
212 void ClearInterrupt(int flagbit); | 212 void ClearInterrupt(int flagbit); |
213 bool CheckAndClearInterrupt(InterruptFlag flag, const ExecutionAccess& lock); | 213 bool CheckAndClearInterrupt(InterruptFlag flag, const ExecutionAccess& lock); |
214 | 214 |
215 void InvokeApiInterruptCallback(); | |
216 | |
217 // You should hold the ExecutionAccess lock when calling this method. | 215 // You should hold the ExecutionAccess lock when calling this method. |
218 bool has_pending_interrupts(const ExecutionAccess& lock) { | 216 bool has_pending_interrupts(const ExecutionAccess& lock) { |
219 // Sanity check: We shouldn't be asking about pending interrupts | 217 // Sanity check: We shouldn't be asking about pending interrupts |
220 // unless we're not postponing them anymore. | 218 // unless we're not postponing them anymore. |
221 ASSERT(!should_postpone_interrupts(lock)); | 219 ASSERT(!should_postpone_interrupts(lock)); |
222 return thread_local_.interrupt_flags_ != 0; | 220 return thread_local_.interrupt_flags_ != 0; |
223 } | 221 } |
224 | 222 |
225 // You should hold the ExecutionAccess lock when calling this method. | 223 // You should hold the ExecutionAccess lock when calling this method. |
226 bool should_postpone_interrupts(const ExecutionAccess& lock) { | 224 bool should_postpone_interrupts(const ExecutionAccess& lock) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 friend class Isolate; | 281 friend class Isolate; |
284 friend class StackLimitCheck; | 282 friend class StackLimitCheck; |
285 friend class PostponeInterruptsScope; | 283 friend class PostponeInterruptsScope; |
286 | 284 |
287 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 285 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
288 }; | 286 }; |
289 | 287 |
290 } } // namespace v8::internal | 288 } } // namespace v8::internal |
291 | 289 |
292 #endif // V8_EXECUTION_H_ | 290 #endif // V8_EXECUTION_H_ |
OLD | NEW |