summaryrefslogtreecommitdiff
path: root/deps/v8/src/arm/simulator-arm.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2009-10-07 11:53:03 +0200
committerRyan Dahl <ry@tinyclouds.org>2009-10-07 11:53:45 +0200
commit1f31a7dbfe792fa6eee8a9cdcdfd662aad5cde06 (patch)
treec83b724056517e4bf71f203b74ad1d832d0ca7f0 /deps/v8/src/arm/simulator-arm.h
parent1a2762b78e496dac4cc9fd0fb4ffb1d4f036692b (diff)
downloadnode-new-1f31a7dbfe792fa6eee8a9cdcdfd662aad5cde06.tar.gz
Upgrade v8 to 1.3.14
Diffstat (limited to 'deps/v8/src/arm/simulator-arm.h')
-rw-r--r--deps/v8/src/arm/simulator-arm.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/deps/v8/src/arm/simulator-arm.h b/deps/v8/src/arm/simulator-arm.h
index 3917d6a5af..ff6bbf4302 100644
--- a/deps/v8/src/arm/simulator-arm.h
+++ b/deps/v8/src/arm/simulator-arm.h
@@ -36,18 +36,23 @@
#ifndef V8_ARM_SIMULATOR_ARM_H_
#define V8_ARM_SIMULATOR_ARM_H_
+#include "allocation.h"
+
#if defined(__arm__)
// When running without a simulator we call the entry directly.
#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.
+class SimulatorStack : public v8::internal::AllStatic {
+ public:
+ static inline uintptr_t JsLimitFromCLimit(uintptr_t c_limit) {
+ return c_limit;
+ }
+};
// Call the generated regexp code directly. The entry function pointer should
@@ -64,12 +69,6 @@
assembler::arm::Simulator::current()->Call(FUNCTION_ADDR(entry), 5, \
p0, p1, p2, p3, p4))
-// 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) \
- (assembler::arm::Simulator::current()->StackLimit())
-
-
#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6) \
assembler::arm::Simulator::current()->Call( \
FUNCTION_ADDR(entry), 7, p0, p1, p2, p3, p4, p5, p6)
@@ -219,6 +218,20 @@ class Simulator {
} } // namespace assembler::arm
+
+// The simulator has its own stack. Thus it has a different stack limit from
+// the C-based native code. Setting the c_limit to indicate a very small
+// stack cause stack overflow errors, since the simulator ignores the input.
+// This is unlikely to be an issue in practice, though it might cause testing
+// trouble down the line.
+class SimulatorStack : public v8::internal::AllStatic {
+ public:
+ static inline uintptr_t JsLimitFromCLimit(uintptr_t c_limit) {
+ return assembler::arm::Simulator::current()->StackLimit();
+ }
+};
+
+
#endif // defined(__arm__)
#endif // V8_ARM_SIMULATOR_ARM_H_