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

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

Issue 3573005: New attempt to make the allocation routines 64 bit clean.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 2 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 | Annotate | Revision Log
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<int32_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 uint64_t fp = reinterpret_cast<uint64_t>(calling_frame->fp()); 247 uint64_t fp = reinterpret_cast<uint64_t>(calling_frame->fp());
248 int32_t low_bits = fp & 0xffffffff; 248 int32_t low_bits = static_cast<int32_t>(fp & 0xffffffff);
249 int32_t high_bits = fp >> 32; 249 int32_t high_bits = static_cast<int32_t>(fp >> 32);
250 args.This()->Set(v8_str("low_bits"), v8_num(low_bits)); 250 args.This()->Set(v8_str("low_bits"), v8_num(low_bits));
251 args.This()->Set(v8_str("high_bits"), v8_num(high_bits)); 251 args.This()->Set(v8_str("high_bits"), v8_num(high_bits));
252 #else 252 #else
253 #error Host architecture is neither 32-bit nor 64-bit. 253 #error Host architecture is neither 32-bit nor 64-bit.
254 #endif 254 #endif
255 return args.This(); 255 return args.This();
256 } 256 }
257 257
258 258
259 // 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
414 CHECK_EQ(0, GetJsEntrySp()); 414 CHECK_EQ(0, GetJsEntrySp());
415 CompileRun("a = 1; b = a + 1;"); 415 CompileRun("a = 1; b = a + 1;");
416 CHECK_EQ(0, GetJsEntrySp()); 416 CHECK_EQ(0, GetJsEntrySp());
417 CompileRun("js_entry_sp();"); 417 CompileRun("js_entry_sp();");
418 CHECK_EQ(0, GetJsEntrySp()); 418 CHECK_EQ(0, GetJsEntrySp());
419 CompileRun("js_entry_sp_level2();"); 419 CompileRun("js_entry_sp_level2();");
420 CHECK_EQ(0, GetJsEntrySp()); 420 CHECK_EQ(0, GetJsEntrySp());
421 } 421 }
422 422
423 #endif // ENABLE_LOGGING_AND_PROFILING 423 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« src/spaces.h ('K') | « test/cctest/test-api.cc ('k') | test/cctest/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698