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

Side by Side Diff: src/execution.h

Issue 9490004: Thread the current isolate through a few places, avoiding Isolate::Current(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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/arm/regexp-macro-assembler-arm.cc ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 27 matching lines...) Expand all
38 enum InterruptFlag { 38 enum InterruptFlag {
39 INTERRUPT = 1 << 0, 39 INTERRUPT = 1 << 0,
40 DEBUGBREAK = 1 << 1, 40 DEBUGBREAK = 1 << 1,
41 DEBUGCOMMAND = 1 << 2, 41 DEBUGCOMMAND = 1 << 2,
42 PREEMPT = 1 << 3, 42 PREEMPT = 1 << 3,
43 TERMINATE = 1 << 4, 43 TERMINATE = 1 << 4,
44 RUNTIME_PROFILER_TICK = 1 << 5, 44 RUNTIME_PROFILER_TICK = 1 << 5,
45 GC_REQUEST = 1 << 6 45 GC_REQUEST = 1 << 6
46 }; 46 };
47 47
48
49 class Isolate;
50
51
48 class Execution : public AllStatic { 52 class Execution : public AllStatic {
49 public: 53 public:
50 // Call a function, the caller supplies a receiver and an array 54 // Call a function, the caller supplies a receiver and an array
51 // of arguments. Arguments are Object* type. After function returns, 55 // of arguments. Arguments are Object* type. After function returns,
52 // pointers in 'args' might be invalid. 56 // pointers in 'args' might be invalid.
53 // 57 //
54 // *pending_exception tells whether the invoke resulted in 58 // *pending_exception tells whether the invoke resulted in
55 // a pending exception. 59 // a pending exception.
56 // 60 //
57 // When convert_receiver is set, and the receiver is not an object, 61 // When convert_receiver is set, and the receiver is not an object,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 Handle<JSFunction> fun, 138 Handle<JSFunction> fun,
135 Handle<Object> pos, 139 Handle<Object> pos,
136 Handle<Object> is_global); 140 Handle<Object> is_global);
137 #ifdef ENABLE_DEBUGGER_SUPPORT 141 #ifdef ENABLE_DEBUGGER_SUPPORT
138 static Object* DebugBreakHelper(); 142 static Object* DebugBreakHelper();
139 static void ProcessDebugMessages(bool debug_command_only); 143 static void ProcessDebugMessages(bool debug_command_only);
140 #endif 144 #endif
141 145
142 // If the stack guard is triggered, but it is not an actual 146 // If the stack guard is triggered, but it is not an actual
143 // stack overflow, then handle the interruption accordingly. 147 // stack overflow, then handle the interruption accordingly.
144 MUST_USE_RESULT static MaybeObject* HandleStackGuardInterrupt(); 148 MUST_USE_RESULT static MaybeObject* HandleStackGuardInterrupt(
149 Isolate* isolate);
145 150
146 // Get a function delegate (or undefined) for the given non-function 151 // Get a function delegate (or undefined) for the given non-function
147 // object. Used for support calling objects as functions. 152 // object. Used for support calling objects as functions.
148 static Handle<Object> GetFunctionDelegate(Handle<Object> object); 153 static Handle<Object> GetFunctionDelegate(Handle<Object> object);
149 static Handle<Object> TryGetFunctionDelegate(Handle<Object> object, 154 static Handle<Object> TryGetFunctionDelegate(Handle<Object> object,
150 bool* has_pending_exception); 155 bool* has_pending_exception);
151 156
152 // Get a function delegate (or undefined) for the given non-function 157 // Get a function delegate (or undefined) for the given non-function
153 // object. Used for support calling objects as constructors. 158 // object. Used for support calling objects as constructors.
154 static Handle<Object> GetConstructorDelegate(Handle<Object> object); 159 static Handle<Object> GetConstructorDelegate(Handle<Object> object);
155 static Handle<Object> TryGetConstructorDelegate(Handle<Object> object, 160 static Handle<Object> TryGetConstructorDelegate(Handle<Object> object,
156 bool* has_pending_exception); 161 bool* has_pending_exception);
157 }; 162 };
158 163
159 164
160 class ExecutionAccess; 165 class ExecutionAccess;
161 class Isolate;
162 166
163 167
164 // StackGuard contains the handling of the limits that are used to limit the 168 // StackGuard contains the handling of the limits that are used to limit the
165 // number of nested invocations of JavaScript and the stack size used in each 169 // number of nested invocations of JavaScript and the stack size used in each
166 // invocation. 170 // invocation.
167 class StackGuard { 171 class StackGuard {
168 public: 172 public:
169 // Pass the address beyond which the stack should not grow. The stack 173 // Pass the address beyond which the stack should not grow. The stack
170 // is assumed to grow downwards. 174 // is assumed to grow downwards.
171 void SetStackLimit(uintptr_t limit); 175 void SetStackLimit(uintptr_t limit);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 friend class StackLimitCheck; 300 friend class StackLimitCheck;
297 friend class PostponeInterruptsScope; 301 friend class PostponeInterruptsScope;
298 302
299 DISALLOW_COPY_AND_ASSIGN(StackGuard); 303 DISALLOW_COPY_AND_ASSIGN(StackGuard);
300 }; 304 };
301 305
302 306
303 } } // namespace v8::internal 307 } } // namespace v8::internal
304 308
305 #endif // V8_EXECUTION_H_ 309 #endif // V8_EXECUTION_H_
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698