| Index: src/x64/simulator-x64.h
 | 
| ===================================================================
 | 
| --- src/x64/simulator-x64.h	(revision 2982)
 | 
| +++ src/x64/simulator-x64.h	(working copy)
 | 
| @@ -28,6 +28,7 @@
 | 
|  #ifndef V8_X64_SIMULATOR_X64_H_
 | 
|  #define V8_X64_SIMULATOR_X64_H_
 | 
|  
 | 
| +#include "allocation.h"
 | 
|  
 | 
|  // Since there is no simulator for the ia32 architecture the only thing we can
 | 
|  // do is to call the entry directly.
 | 
| @@ -35,15 +36,15 @@
 | 
|  #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.
 | 
| -// NOTE: The check for overflow is not safe as there is no guarantee that the
 | 
| -// running thread has its stack in all memory up to address 0x00000000.
 | 
| -#define GENERATED_CODE_STACK_LIMIT(limit) \
 | 
| -  (reinterpret_cast<uintptr_t>(this) >= limit ? \
 | 
| -      reinterpret_cast<uintptr_t>(this) - limit : 0)
 | 
| +// The stack limit beyond which we will throw stack overflow errors in
 | 
| +// generated code. Because generated code on x64 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
 | 
|  // expect seven int/pointer sized arguments and return an int.
 | 
| 
 |