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/globals.h" |
10 #include "src/utils.h" | 11 #include "src/utils.h" |
11 | 12 |
12 namespace v8 { | 13 namespace v8 { |
13 namespace internal { | 14 namespace internal { |
14 | 15 |
15 template <typename T> | 16 template <typename T> |
16 class Handle; | 17 class Handle; |
17 | 18 |
18 class Execution final : public AllStatic { | 19 class Execution final : public AllStatic { |
19 public: | 20 public: |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 }; | 57 }; |
57 | 58 |
58 | 59 |
59 class ExecutionAccess; | 60 class ExecutionAccess; |
60 class PostponeInterruptsScope; | 61 class PostponeInterruptsScope; |
61 | 62 |
62 | 63 |
63 // StackGuard contains the handling of the limits that are used to limit the | 64 // StackGuard contains the handling of the limits that are used to limit the |
64 // number of nested invocations of JavaScript and the stack size used in each | 65 // number of nested invocations of JavaScript and the stack size used in each |
65 // invocation. | 66 // invocation. |
66 class StackGuard final { | 67 class V8_EXPORT_PRIVATE StackGuard final { |
67 public: | 68 public: |
68 // Pass the address beyond which the stack should not grow. The stack | 69 // Pass the address beyond which the stack should not grow. The stack |
69 // is assumed to grow downwards. | 70 // is assumed to grow downwards. |
70 void SetStackLimit(uintptr_t limit); | 71 void SetStackLimit(uintptr_t limit); |
71 | 72 |
72 // The simulator uses a separate JS stack. Limits on the JS stack might have | 73 // The simulator uses a separate JS stack. Limits on the JS stack might have |
73 // to be adjusted in order to reflect overflows of the C stack, because we | 74 // to be adjusted in order to reflect overflows of the C stack, because we |
74 // cannot rely on the interleaving of frames on the simulator. | 75 // cannot rely on the interleaving of frames on the simulator. |
75 void AdjustStackLimitForSimulator(); | 76 void AdjustStackLimitForSimulator(); |
76 | 77 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 friend class StackLimitCheck; | 225 friend class StackLimitCheck; |
225 friend class PostponeInterruptsScope; | 226 friend class PostponeInterruptsScope; |
226 | 227 |
227 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 228 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
228 }; | 229 }; |
229 | 230 |
230 } // namespace internal | 231 } // namespace internal |
231 } // namespace v8 | 232 } // namespace v8 |
232 | 233 |
233 #endif // V8_EXECUTION_H_ | 234 #endif // V8_EXECUTION_H_ |
OLD | NEW |