Revision: 15485
Author:   [email protected]
Date:     Wed Jul  3 10:26:01 2013
Log:      Fix Mac compilation after r15484

BUG=None
[email protected]

Review URL: https://codereview.chromium.org/18023019
http://code.google.com/p/v8/source/detail?r=15485

Modified:
 /branches/bleeding_edge/src/sampler.cc

=======================================
--- /branches/bleeding_edge/src/sampler.cc      Wed Jul  3 09:20:59 2013
+++ /branches/bleeding_edge/src/sampler.cc      Wed Jul  3 10:26:01 2013
@@ -496,10 +496,10 @@

   void SampleContext(Sampler* sampler) {
thread_act_t profiled_thread = sampler->platform_data()->profiled_thread();
-    Isolate* isolate = sampler->isolate();

 #if defined(USE_SIMULATOR)
     SimulatorHelper helper;
+    Isolate* isolate = sampler->isolate();
     if (!helper.Init(sampler, isolate)) return;
 #endif

@@ -507,7 +507,7 @@

 #if V8_HOST_ARCH_X64
     thread_state_flavor_t flavor = x86_THREAD_STATE64;
-    x86_thread_state64_t state;
+    x86_thread_state64_t thread_state;
     mach_msg_type_number_t count = x86_THREAD_STATE64_COUNT;
 #if __DARWIN_UNIX03
 #define REGISTER_FIELD(name) __r ## name
@@ -516,7 +516,7 @@
 #endif  // __DARWIN_UNIX03
 #elif V8_HOST_ARCH_IA32
     thread_state_flavor_t flavor = i386_THREAD_STATE;
-    i386_thread_state_t state;
+    i386_thread_state_t thread_state;
     mach_msg_type_number_t count = i386_THREAD_STATE_COUNT;
 #if __DARWIN_UNIX03
 #define REGISTER_FIELD(name) __e ## name
@@ -529,15 +529,15 @@

     if (thread_get_state(profiled_thread,
                          flavor,
-                         reinterpret_cast<natural_t*>(&state),
+                         reinterpret_cast<natural_t*>(&thread_state),
                          &count) == KERN_SUCCESS) {
       RegisterState state;
 #if defined(USE_SIMULATOR)
       helper.FillRegisters(&state);
 #else
-      state.pc = reinterpret_cast<Address>(state.REGISTER_FIELD(ip));
-      state.sp = reinterpret_cast<Address>(state.REGISTER_FIELD(sp));
-      state.fp = reinterpret_cast<Address>(state.REGISTER_FIELD(bp));
+ state.pc = reinterpret_cast<Address>(thread_state.REGISTER_FIELD(ip)); + state.sp = reinterpret_cast<Address>(thread_state.REGISTER_FIELD(sp)); + state.fp = reinterpret_cast<Address>(thread_state.REGISTER_FIELD(bp));
 #endif  // USE_SIMULATOR
 #undef REGISTER_FIELD
       sampler->SampleStack(state);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to