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

Side by Side Diff: src/execution.h

Issue 339883002: Interrupts must not mask stack overflow. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/arm64/regexp-macro-assembler-arm64.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 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/handles.h" 8 #include "src/handles.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 char* RestoreStackGuard(char* from); 138 char* RestoreStackGuard(char* from);
139 static int ArchiveSpacePerThread() { return sizeof(ThreadLocal); } 139 static int ArchiveSpacePerThread() { return sizeof(ThreadLocal); }
140 void FreeThreadResources(); 140 void FreeThreadResources();
141 // Sets up the default stack guard for this thread if it has not 141 // Sets up the default stack guard for this thread if it has not
142 // already been set up. 142 // already been set up.
143 void InitThread(const ExecutionAccess& lock); 143 void InitThread(const ExecutionAccess& lock);
144 // Clears the stack guard for this thread so it does not look as if 144 // Clears the stack guard for this thread so it does not look as if
145 // it has been set up. 145 // it has been set up.
146 void ClearThread(const ExecutionAccess& lock); 146 void ClearThread(const ExecutionAccess& lock);
147 147
148 bool IsStackOverflow();
149
150 #define INTERRUPT_LIST(V) \ 148 #define INTERRUPT_LIST(V) \
151 V(DEBUGBREAK, DebugBreak) \ 149 V(DEBUGBREAK, DebugBreak) \
152 V(DEBUGCOMMAND, DebugCommand) \ 150 V(DEBUGCOMMAND, DebugCommand) \
153 V(TERMINATE_EXECUTION, TerminateExecution) \ 151 V(TERMINATE_EXECUTION, TerminateExecution) \
154 V(GC_REQUEST, GC) \ 152 V(GC_REQUEST, GC) \
155 V(INSTALL_CODE, InstallCode) \ 153 V(INSTALL_CODE, InstallCode) \
156 V(API_INTERRUPT, ApiInterrupt) \ 154 V(API_INTERRUPT, ApiInterrupt) \
157 V(DEOPT_MARKED_ALLOCATION_SITES, DeoptMarkedAllocationSites) 155 V(DEOPT_MARKED_ALLOCATION_SITES, DeoptMarkedAllocationSites)
158 156
159 #define V(NAME, Name) \ 157 #define V(NAME, Name) \
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 uintptr_t real_jslimit_; // Actual JavaScript stack limit set for the VM. 257 uintptr_t real_jslimit_; // Actual JavaScript stack limit set for the VM.
260 uintptr_t jslimit_; 258 uintptr_t jslimit_;
261 uintptr_t real_climit_; // Actual C++ stack limit set for the VM. 259 uintptr_t real_climit_; // Actual C++ stack limit set for the VM.
262 uintptr_t climit_; 260 uintptr_t climit_;
263 261
264 int nesting_; 262 int nesting_;
265 int postpone_interrupts_nesting_; 263 int postpone_interrupts_nesting_;
266 int interrupt_flags_; 264 int interrupt_flags_;
267 }; 265 };
268 266
267 class StackPointer {
268 public:
269 inline uintptr_t address() { return reinterpret_cast<uintptr_t>(this); }
270 };
271
269 // TODO(isolates): Technically this could be calculated directly from a 272 // TODO(isolates): Technically this could be calculated directly from a
270 // pointer to StackGuard. 273 // pointer to StackGuard.
271 Isolate* isolate_; 274 Isolate* isolate_;
272 ThreadLocal thread_local_; 275 ThreadLocal thread_local_;
273 276
274 friend class Isolate; 277 friend class Isolate;
275 friend class StackLimitCheck; 278 friend class StackLimitCheck;
276 friend class PostponeInterruptsScope; 279 friend class PostponeInterruptsScope;
277 280
278 DISALLOW_COPY_AND_ASSIGN(StackGuard); 281 DISALLOW_COPY_AND_ASSIGN(StackGuard);
279 }; 282 };
280 283
281 } } // namespace v8::internal 284 } } // namespace v8::internal
282 285
283 #endif // V8_EXECUTION_H_ 286 #endif // V8_EXECUTION_H_
OLDNEW
« no previous file with comments | « src/arm64/regexp-macro-assembler-arm64.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698