Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: src/execution.h

Issue 6960009: Version 3.3.5 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/disassembler.h ('k') | src/execution.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10 matching lines...) Expand all
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_EXECUTION_H_ 28 #ifndef V8_EXECUTION_H_
29 #define V8_EXECUTION_H_ 29 #define V8_EXECUTION_H_
30 30
31 #include "allocation.h"
32
31 namespace v8 { 33 namespace v8 {
32 namespace internal { 34 namespace internal {
33 35
34 36
35 // Flag used to set the interrupt causes. 37 // Flag used to set the interrupt causes.
36 enum InterruptFlag { 38 enum InterruptFlag {
37 INTERRUPT = 1 << 0, 39 INTERRUPT = 1 << 0,
38 DEBUGBREAK = 1 << 1, 40 DEBUGBREAK = 1 << 1,
39 DEBUGCOMMAND = 1 << 2, 41 DEBUGCOMMAND = 1 << 2,
40 PREEMPT = 1 << 3, 42 PREEMPT = 1 << 3,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 static void ProcessDebugMesssages(bool debug_command_only); 133 static void ProcessDebugMesssages(bool debug_command_only);
132 #endif 134 #endif
133 135
134 // If the stack guard is triggered, but it is not an actual 136 // If the stack guard is triggered, but it is not an actual
135 // stack overflow, then handle the interruption accordingly. 137 // stack overflow, then handle the interruption accordingly.
136 MUST_USE_RESULT static MaybeObject* HandleStackGuardInterrupt(); 138 MUST_USE_RESULT static MaybeObject* HandleStackGuardInterrupt();
137 139
138 // Get a function delegate (or undefined) for the given non-function 140 // Get a function delegate (or undefined) for the given non-function
139 // object. Used for support calling objects as functions. 141 // object. Used for support calling objects as functions.
140 static Handle<Object> GetFunctionDelegate(Handle<Object> object); 142 static Handle<Object> GetFunctionDelegate(Handle<Object> object);
143 static Handle<Object> TryGetFunctionDelegate(Handle<Object> object,
144 bool* has_pending_exception);
141 145
142 // Get a function delegate (or undefined) for the given non-function 146 // Get a function delegate (or undefined) for the given non-function
143 // object. Used for support calling objects as constructors. 147 // object. Used for support calling objects as constructors.
144 static Handle<Object> GetConstructorDelegate(Handle<Object> object); 148 static Handle<Object> GetConstructorDelegate(Handle<Object> object);
149 static Handle<Object> TryGetConstructorDelegate(Handle<Object> object,
150 bool* has_pending_exception);
145 }; 151 };
146 152
147 153
148 class ExecutionAccess; 154 class ExecutionAccess;
149 class Isolate; 155 class Isolate;
150 156
151 157
152 // StackGuard contains the handling of the limits that are used to limit the 158 // StackGuard contains the handling of the limits that are used to limit the
153 // number of nested invocations of JavaScript and the stack size used in each 159 // number of nested invocations of JavaScript and the stack size used in each
154 // invocation. 160 // invocation.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 #endif 251 #endif
246 252
247 class ThreadLocal { 253 class ThreadLocal {
248 public: 254 public:
249 ThreadLocal() { Clear(); } 255 ThreadLocal() { Clear(); }
250 // You should hold the ExecutionAccess lock when you call Initialize or 256 // You should hold the ExecutionAccess lock when you call Initialize or
251 // Clear. 257 // Clear.
252 void Clear(); 258 void Clear();
253 259
254 // Returns true if the heap's stack limits should be set, false if not. 260 // Returns true if the heap's stack limits should be set, false if not.
255 bool Initialize(); 261 bool Initialize(Isolate* isolate);
256 262
257 // The stack limit is split into a JavaScript and a C++ stack limit. These 263 // The stack limit is split into a JavaScript and a C++ stack limit. These
258 // two are the same except when running on a simulator where the C++ and 264 // two are the same except when running on a simulator where the C++ and
259 // JavaScript stacks are separate. Each of the two stack limits have two 265 // JavaScript stacks are separate. Each of the two stack limits have two
260 // values. The one eith the real_ prefix is the actual stack limit 266 // values. The one eith the real_ prefix is the actual stack limit
261 // set for the VM. The one without the real_ prefix has the same value as 267 // set for the VM. The one without the real_ prefix has the same value as
262 // the actual stack limit except when there is an interruption (e.g. debug 268 // the actual stack limit except when there is an interruption (e.g. debug
263 // break or preemption) in which case it is lowered to make stack checks 269 // break or preemption) in which case it is lowered to make stack checks
264 // fail. Both the generated code and the runtime system check against the 270 // fail. Both the generated code and the runtime system check against the
265 // one without the real_ prefix. 271 // one without the real_ prefix.
(...skipping 16 matching lines...) Expand all
282 friend class StackLimitCheck; 288 friend class StackLimitCheck;
283 friend class PostponeInterruptsScope; 289 friend class PostponeInterruptsScope;
284 290
285 DISALLOW_COPY_AND_ASSIGN(StackGuard); 291 DISALLOW_COPY_AND_ASSIGN(StackGuard);
286 }; 292 };
287 293
288 294
289 } } // namespace v8::internal 295 } } // namespace v8::internal
290 296
291 #endif // V8_EXECUTION_H_ 297 #endif // V8_EXECUTION_H_
OLDNEW
« no previous file with comments | « src/disassembler.h ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698