| Index: src/top.h | 
| =================================================================== | 
| --- src/top.h	(revision 5653) | 
| +++ src/top.h	(working copy) | 
| @@ -41,6 +41,7 @@ | 
|  | 
| class SaveContext;  // Forward declaration. | 
| class ThreadVisitor;  // Defined in v8threads.h | 
| +class VMState;  // Defined in vm-state.h | 
|  | 
| class ThreadLocalTop BASE_EMBEDDED { | 
| public: | 
| @@ -101,10 +102,15 @@ | 
| // Stack. | 
| Address c_entry_fp_;  // the frame pointer of the top c entry frame | 
| Address handler_;   // try-blocks are chained through the stack | 
| + | 
| #ifdef ENABLE_LOGGING_AND_PROFILING | 
| Address js_entry_sp_;  // the stack pointer of the bottom js entry frame | 
| #endif | 
|  | 
| +#ifdef ENABLE_VMSTATE_TRACKING | 
| +  VMState* current_vm_state_; | 
| +#endif | 
| + | 
| // Generated code scratch locations. | 
| int32_t formal_count_; | 
|  | 
| @@ -254,6 +260,16 @@ | 
| } | 
| #endif | 
|  | 
| +#ifdef ENABLE_VMSTATE_TRACKING | 
| +  static VMState* current_vm_state() { | 
| +    return thread_local_.current_vm_state_; | 
| +  } | 
| + | 
| +  static void set_current_vm_state(VMState* state) { | 
| +    thread_local_.current_vm_state_ = state; | 
| +  } | 
| +#endif | 
| + | 
| // Generated code scratch locations. | 
| static void* formal_count_address() { return &thread_local_.formal_count_; } | 
|  | 
|  |