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

Side by Side Diff: test/cctest/test-compiler.cc

Issue 7284011: Fix build on x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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
« 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 f->code()->PrintLn(); 371 f->code()->PrintLn();
372 #endif 372 #endif
373 Address pc = f->code()->instruction_start(); 373 Address pc = f->code()->instruction_start();
374 int decode_size = 374 int decode_size =
375 Min(f->code()->instruction_size(), 375 Min(f->code()->instruction_size(),
376 static_cast<int>(f->code()->stack_check_table_offset())); 376 static_cast<int>(f->code()->stack_check_table_offset()));
377 Address end = pc + decode_size; 377 Address end = pc + decode_size;
378 378
379 v8::internal::EmbeddedVector<char, 128> decode_buffer; 379 v8::internal::EmbeddedVector<char, 128> decode_buffer;
380 while (pc < end) { 380 while (pc < end) {
381 PrintF("%08x\n", reinterpret_cast<intptr_t>(pc)); 381 PrintF("%08x\n",
382 static_cast<unsigned int>(reinterpret_cast<intptr_t>(pc)));
382 pc += d.InstructionDecode(decode_buffer, pc); 383 pc += d.InstructionDecode(decode_buffer, pc);
383 CHECK(strstr(decode_buffer.start(), "mov eax,0x178c29c") == NULL); 384 CHECK(strstr(decode_buffer.start(), "mov eax,0x178c29c") == NULL);
384 CHECK(strstr(decode_buffer.start(), "push 0x178c29c") == NULL); 385 CHECK(strstr(decode_buffer.start(), "push 0x178c29c") == NULL);
385 CHECK(strstr(decode_buffer.start(), "0x178c29c") == NULL); 386 CHECK(strstr(decode_buffer.start(), "0x178c29c") == NULL);
386 } 387 }
387 } 388 }
388 } 389 }
389 390
390 391
391 TEST(SplitConstantsInFullCompiler) { 392 TEST(SplitConstantsInFullCompiler) {
392 v8::HandleScope scope; 393 v8::HandleScope scope;
393 LocalContext env; 394 LocalContext env;
394 395
395 CompileRun("function f() { a = 12345678 }; f();"); 396 CompileRun("function f() { a = 12345678 }; f();");
396 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 397 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
397 CompileRun("function f(x) { a = 12345678 + x}; f(1);"); 398 CompileRun("function f(x) { a = 12345678 + x}; f(1);");
398 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 399 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
399 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);"); 400 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);");
400 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 401 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
401 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);"); 402 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);");
402 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f")); 403 CheckCodeForUnsafeLiteral(GetJSFunction(env->Global(), "f"));
403 } 404 }
404 #endif 405 #endif
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