OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 17 matching lines...) Expand all Loading... |
28 #ifndef V8_EXECUTION_H_ | 28 #ifndef V8_EXECUTION_H_ |
29 #define V8_EXECUTION_H_ | 29 #define V8_EXECUTION_H_ |
30 | 30 |
31 namespace v8 { namespace internal { | 31 namespace v8 { namespace internal { |
32 | 32 |
33 | 33 |
34 // Flag used to set the interrupt causes. | 34 // Flag used to set the interrupt causes. |
35 enum InterruptFlag { | 35 enum InterruptFlag { |
36 INTERRUPT = 1 << 0, | 36 INTERRUPT = 1 << 0, |
37 DEBUGBREAK = 1 << 1, | 37 DEBUGBREAK = 1 << 1, |
38 PREEMPT = 1 << 2 | 38 DEBUGCOMMAND = 1 << 2, |
| 39 PREEMPT = 1 << 3 |
39 }; | 40 }; |
40 | 41 |
41 class Execution : public AllStatic { | 42 class Execution : public AllStatic { |
42 public: | 43 public: |
43 // Call a function, the caller supplies a receiver and an array | 44 // Call a function, the caller supplies a receiver and an array |
44 // of arguments. Arguments are Object* type. After function returns, | 45 // of arguments. Arguments are Object* type. After function returns, |
45 // pointers in 'args' might be invalid. | 46 // pointers in 'args' might be invalid. |
46 // | 47 // |
47 // *pending_exception tells whether the invoke resulted in | 48 // *pending_exception tells whether the invoke resulted in |
48 // a pending exception. | 49 // a pending exception. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 static char* RestoreStackGuard(char* from); | 153 static char* RestoreStackGuard(char* from); |
153 static int ArchiveSpacePerThread(); | 154 static int ArchiveSpacePerThread(); |
154 | 155 |
155 static bool IsStackOverflow(); | 156 static bool IsStackOverflow(); |
156 static bool IsPreempted(); | 157 static bool IsPreempted(); |
157 static void Preempt(); | 158 static void Preempt(); |
158 static bool IsInterrupted(); | 159 static bool IsInterrupted(); |
159 static void Interrupt(); | 160 static void Interrupt(); |
160 static bool IsDebugBreak(); | 161 static bool IsDebugBreak(); |
161 static void DebugBreak(); | 162 static void DebugBreak(); |
| 163 static bool IsDebugCommand(); |
| 164 static void DebugCommand(); |
162 static void Continue(InterruptFlag after_what); | 165 static void Continue(InterruptFlag after_what); |
163 | 166 |
164 private: | 167 private: |
165 // You should hold the ExecutionAccess lock when calling this method. | 168 // You should hold the ExecutionAccess lock when calling this method. |
166 static bool IsSet(const ExecutionAccess& lock); | 169 static bool IsSet(const ExecutionAccess& lock); |
167 | 170 |
168 // This provides an asynchronous read of the stack limit for the current | 171 // This provides an asynchronous read of the stack limit for the current |
169 // thread. There are no locks protecting this, but it is assumed that you | 172 // thread. There are no locks protecting this, but it is assumed that you |
170 // have the global V8 lock if you are using multiple V8 threads. | 173 // have the global V8 lock if you are using multiple V8 threads. |
171 static uintptr_t climit() { | 174 static uintptr_t climit() { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 v8::Handle<v8::String> name); | 267 v8::Handle<v8::String> name); |
265 static v8::Handle<v8::Value> GC(const v8::Arguments& args); | 268 static v8::Handle<v8::Value> GC(const v8::Arguments& args); |
266 private: | 269 private: |
267 static const char* kSource; | 270 static const char* kSource; |
268 }; | 271 }; |
269 | 272 |
270 | 273 |
271 } } // namespace v8::internal | 274 } } // namespace v8::internal |
272 | 275 |
273 #endif // V8_EXECUTION_H_ | 276 #endif // V8_EXECUTION_H_ |
OLD | NEW |