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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 7218012: Make ToBooleanStub more consistent across platforms. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 6 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 | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 } else { 557 } else {
558 if (false_label_ != fall_through_) __ jmp(false_label_); 558 if (false_label_ != fall_through_) __ jmp(false_label_);
559 } 559 }
560 } 560 }
561 561
562 562
563 void FullCodeGenerator::DoTest(Expression* condition, 563 void FullCodeGenerator::DoTest(Expression* condition,
564 Label* if_true, 564 Label* if_true,
565 Label* if_false, 565 Label* if_false,
566 Label* fall_through) { 566 Label* fall_through) {
567 ToBooleanStub stub; 567 ToBooleanStub stub(result_register());
568 __ push(result_register()); 568 __ push(result_register());
569 __ CallStub(&stub); 569 __ CallStub(&stub);
570 __ testq(rax, rax); 570 __ testq(result_register(), result_register());
571 // The stub returns nonzero for true. 571 // The stub returns nonzero for true.
572 Split(not_zero, if_true, if_false, fall_through); 572 Split(not_zero, if_true, if_false, fall_through);
573 } 573 }
574 574
575 575
576 void FullCodeGenerator::Split(Condition cc, 576 void FullCodeGenerator::Split(Condition cc,
577 Label* if_true, 577 Label* if_true,
578 Label* if_false, 578 Label* if_false,
579 Label* fall_through) { 579 Label* fall_through) {
580 if (if_false == fall_through) { 580 if (if_false == fall_through) {
(...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after
4234 __ ret(0); 4234 __ ret(0);
4235 } 4235 }
4236 4236
4237 4237
4238 #undef __ 4238 #undef __
4239 4239
4240 4240
4241 } } // namespace v8::internal 4241 } } // namespace v8::internal
4242 4242
4243 #endif // V8_TARGET_ARCH_X64 4243 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698