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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 #endif | 247 #endif |
248 | 248 |
249 class ThreadLocal { | 249 class ThreadLocal { |
250 public: | 250 public: |
251 ThreadLocal() { Clear(); } | 251 ThreadLocal() { Clear(); } |
252 // You should hold the ExecutionAccess lock when you call Initialize or | 252 // You should hold the ExecutionAccess lock when you call Initialize or |
253 // Clear. | 253 // Clear. |
254 void Clear(); | 254 void Clear(); |
255 | 255 |
256 // Returns true if the heap's stack limits should be set, false if not. | 256 // Returns true if the heap's stack limits should be set, false if not. |
257 bool Initialize(); | 257 bool Initialize(Isolate* isolate); |
258 | 258 |
259 // The stack limit is split into a JavaScript and a C++ stack limit. These | 259 // The stack limit is split into a JavaScript and a C++ stack limit. These |
260 // two are the same except when running on a simulator where the C++ and | 260 // two are the same except when running on a simulator where the C++ and |
261 // JavaScript stacks are separate. Each of the two stack limits have two | 261 // JavaScript stacks are separate. Each of the two stack limits have two |
262 // values. The one eith the real_ prefix is the actual stack limit | 262 // values. The one eith the real_ prefix is the actual stack limit |
263 // set for the VM. The one without the real_ prefix has the same value as | 263 // set for the VM. The one without the real_ prefix has the same value as |
264 // the actual stack limit except when there is an interruption (e.g. debug | 264 // the actual stack limit except when there is an interruption (e.g. debug |
265 // break or preemption) in which case it is lowered to make stack checks | 265 // break or preemption) in which case it is lowered to make stack checks |
266 // fail. Both the generated code and the runtime system check against the | 266 // fail. Both the generated code and the runtime system check against the |
267 // one without the real_ prefix. | 267 // one without the real_ prefix. |
(...skipping 16 matching lines...) Expand all Loading... |
284 friend class StackLimitCheck; | 284 friend class StackLimitCheck; |
285 friend class PostponeInterruptsScope; | 285 friend class PostponeInterruptsScope; |
286 | 286 |
287 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 287 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
288 }; | 288 }; |
289 | 289 |
290 | 290 |
291 } } // namespace v8::internal | 291 } } // namespace v8::internal |
292 | 292 |
293 #endif // V8_EXECUTION_H_ | 293 #endif // V8_EXECUTION_H_ |
OLD | NEW |