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

Side by Side Diff: src/execution.h

Issue 1314623002: Make Simulator respect C stack limits as well. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Architecture ports.wq Created 5 years, 3 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
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/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // StackGuard contains the handling of the limits that are used to limit the 130 // StackGuard contains the handling of the limits that are used to limit the
131 // number of nested invocations of JavaScript and the stack size used in each 131 // number of nested invocations of JavaScript and the stack size used in each
132 // invocation. 132 // invocation.
133 class StackGuard final { 133 class StackGuard final {
134 public: 134 public:
135 // Pass the address beyond which the stack should not grow. The stack 135 // Pass the address beyond which the stack should not grow. The stack
136 // is assumed to grow downwards. 136 // is assumed to grow downwards.
137 void SetStackLimit(uintptr_t limit); 137 void SetStackLimit(uintptr_t limit);
138 138
139 // The simulator uses a separate JS stack. Limits on the JS stack might have
140 // to be adjusted in order to reflect overflows of the C stack, because we
141 // cannot rely on the interleaving of frames on the simulator.
142 void AdjustStackLimitForSimulator();
143
139 // Threading support. 144 // Threading support.
140 char* ArchiveStackGuard(char* to); 145 char* ArchiveStackGuard(char* to);
141 char* RestoreStackGuard(char* from); 146 char* RestoreStackGuard(char* from);
142 static int ArchiveSpacePerThread() { return sizeof(ThreadLocal); } 147 static int ArchiveSpacePerThread() { return sizeof(ThreadLocal); }
143 void FreeThreadResources(); 148 void FreeThreadResources();
144 // Sets up the default stack guard for this thread if it has not 149 // Sets up the default stack guard for this thread if it has not
145 // already been set up. 150 // already been set up.
146 void InitThread(const ExecutionAccess& lock); 151 void InitThread(const ExecutionAccess& lock);
147 // Clears the stack guard for this thread so it does not look as if 152 // Clears the stack guard for this thread so it does not look as if
148 // it has been set up. 153 // it has been set up.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 friend class Isolate; 294 friend class Isolate;
290 friend class StackLimitCheck; 295 friend class StackLimitCheck;
291 friend class PostponeInterruptsScope; 296 friend class PostponeInterruptsScope;
292 297
293 DISALLOW_COPY_AND_ASSIGN(StackGuard); 298 DISALLOW_COPY_AND_ASSIGN(StackGuard);
294 }; 299 };
295 300
296 } } // namespace v8::internal 301 } } // namespace v8::internal
297 302
298 #endif // V8_EXECUTION_H_ 303 #endif // V8_EXECUTION_H_
OLDNEW
« src/arm/simulator-arm.h ('K') | « src/arm64/simulator-arm64.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698