| 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())
 | 
|  
 | 
|  
 | 
| 
 |