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

Unified Diff: src/arm/simulator-arm.h

Issue 242014: Adds an API for setting the stack limit per-thread. (Closed)
Patch Set: Leaves the limits of pending interrupts alone instead of reestablishing them." Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/execution.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/simulator-arm.h
diff --git a/src/arm/simulator-arm.h b/src/arm/simulator-arm.h
index 3917d6a5af1bc4c82b68be3e2b07c56cc60741b1..e877bdb8acecf90c0b8b1c7d0576a61055c05846 100644
--- a/src/arm/simulator-arm.h
+++ b/src/arm/simulator-arm.h
@@ -42,12 +42,11 @@
#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
(entry(p0, p1, p2, p3, p4))
-// Calculated the stack limit beyond which we will throw stack overflow errors.
-// This macro must be called from a C++ method. It relies on being able to take
-// the address of "this" to get a value on the current execution stack and then
-// calculates the stack limit based on that value.
-#define GENERATED_CODE_STACK_LIMIT(limit) \
- (reinterpret_cast<uintptr_t>(this) - limit)
+// The stack limit beyond which we will throw stack overflow errors in
+// generated code. Because generated code on arm uses the C stack, we
+// just use the C stack limit.
+#define GENERATED_CODE_STACK_LIMIT(c_limit) \
+ (c_limit)
// Call the generated regexp code directly. The entry function pointer should
@@ -66,7 +65,7 @@
// The simulator has its own stack. Thus it has a different stack limit from
// the C-based native code.
-#define GENERATED_CODE_STACK_LIMIT(limit) \
+#define GENERATED_CODE_STACK_LIMIT(c_limit) \
(assembler::arm::Simulator::current()->StackLimit())
« no previous file with comments | « src/api.cc ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698