| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 enum InterruptFlag { | 203 enum InterruptFlag { |
| 204 #define V(NAME, Name) NAME, | 204 #define V(NAME, Name) NAME, |
| 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); | |
| 214 | 213 |
| 215 void InvokeApiInterruptCallback(); | 214 void InvokeApiInterruptCallback(); |
| 216 | 215 |
| 217 // You should hold the ExecutionAccess lock when calling this method. | 216 // You should hold the ExecutionAccess lock when calling this method. |
| 218 bool has_pending_interrupts(const ExecutionAccess& lock) { | 217 bool has_pending_interrupts(const ExecutionAccess& lock) { |
| 219 // Sanity check: We shouldn't be asking about pending interrupts | 218 // Sanity check: We shouldn't be asking about pending interrupts |
| 220 // unless we're not postponing them anymore. | 219 // unless we're not postponing them anymore. |
| 221 ASSERT(!should_postpone_interrupts(lock)); | 220 ASSERT(!should_postpone_interrupts(lock)); |
| 222 return thread_local_.interrupt_flags_ != 0; | 221 return thread_local_.interrupt_flags_ != 0; |
| 223 } | 222 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 friend class Isolate; | 282 friend class Isolate; |
| 284 friend class StackLimitCheck; | 283 friend class StackLimitCheck; |
| 285 friend class PostponeInterruptsScope; | 284 friend class PostponeInterruptsScope; |
| 286 | 285 |
| 287 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 286 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
| 288 }; | 287 }; |
| 289 | 288 |
| 290 } } // namespace v8::internal | 289 } } // namespace v8::internal |
| 291 | 290 |
| 292 #endif // V8_EXECUTION_H_ | 291 #endif // V8_EXECUTION_H_ |
| OLD | NEW |