Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: test/cctest/test-log-stack-tracer.cc

Issue 3396015: Fix a build for Win64 with VS2008. (Closed)
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 static v8::Handle<Value> construct_call(const v8::Arguments& args) { 234 static v8::Handle<Value> construct_call(const v8::Arguments& args) {
235 i::StackFrameIterator frame_iterator; 235 i::StackFrameIterator frame_iterator;
236 CHECK(frame_iterator.frame()->is_exit()); 236 CHECK(frame_iterator.frame()->is_exit());
237 frame_iterator.Advance(); 237 frame_iterator.Advance();
238 CHECK(frame_iterator.frame()->is_construct()); 238 CHECK(frame_iterator.frame()->is_construct());
239 frame_iterator.Advance(); 239 frame_iterator.Advance();
240 i::StackFrame* calling_frame = frame_iterator.frame(); 240 i::StackFrame* calling_frame = frame_iterator.frame();
241 CHECK(calling_frame->is_java_script()); 241 CHECK(calling_frame->is_java_script());
242 242
243 #if defined(V8_HOST_ARCH_32_BIT) 243 #if defined(V8_HOST_ARCH_32_BIT)
244 int32_t low_bits = reinterpret_cast<intptr_t>(calling_frame->fp()); 244 int32_t low_bits = reinterpret_cast<int32_t>(calling_frame->fp());
245 args.This()->Set(v8_str("low_bits"), v8_num(low_bits >> 1)); 245 args.This()->Set(v8_str("low_bits"), v8_num(low_bits >> 1));
246 #elif defined(V8_HOST_ARCH_64_BIT) 246 #elif defined(V8_HOST_ARCH_64_BIT)
247 int32_t low_bits = reinterpret_cast<uintptr_t>(calling_frame->fp()); 247 uint64_t fp = reinterpret_cast<uint64_t>(calling_frame->fp());
248 int32_t high_bits = reinterpret_cast<uintptr_t>(calling_frame->fp()) >> 32; 248 int32_t low_bits = fp & 0xffffffff;
249 int32_t high_bits = fp >> 32;
249 args.This()->Set(v8_str("low_bits"), v8_num(low_bits)); 250 args.This()->Set(v8_str("low_bits"), v8_num(low_bits));
250 args.This()->Set(v8_str("high_bits"), v8_num(high_bits)); 251 args.This()->Set(v8_str("high_bits"), v8_num(high_bits));
251 #else 252 #else
252 #error Host architecture is neither 32-bit nor 64-bit. 253 #error Host architecture is neither 32-bit nor 64-bit.
253 #endif 254 #endif
254 return args.This(); 255 return args.This();
255 } 256 }
256 257
257 258
258 // Use the API to create a JSFunction object that calls the above C++ function. 259 // Use the API to create a JSFunction object that calls the above C++ function.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 CHECK_EQ(0, GetJsEntrySp()); 414 CHECK_EQ(0, GetJsEntrySp());
414 CompileRun("a = 1; b = a + 1;"); 415 CompileRun("a = 1; b = a + 1;");
415 CHECK_EQ(0, GetJsEntrySp()); 416 CHECK_EQ(0, GetJsEntrySp());
416 CompileRun("js_entry_sp();"); 417 CompileRun("js_entry_sp();");
417 CHECK_EQ(0, GetJsEntrySp()); 418 CHECK_EQ(0, GetJsEntrySp());
418 CompileRun("js_entry_sp_level2();"); 419 CompileRun("js_entry_sp_level2();");
419 CHECK_EQ(0, GetJsEntrySp()); 420 CHECK_EQ(0, GetJsEntrySp());
420 } 421 }
421 422
422 #endif // ENABLE_LOGGING_AND_PROFILING 423 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698