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

Side by Side Diff: src/ia32/full-codegen-ia32.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/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } else { 559 } else {
560 if (false_label_ != fall_through_) __ jmp(false_label_); 560 if (false_label_ != fall_through_) __ jmp(false_label_);
561 } 561 }
562 } 562 }
563 563
564 564
565 void FullCodeGenerator::DoTest(Expression* condition, 565 void FullCodeGenerator::DoTest(Expression* condition,
566 Label* if_true, 566 Label* if_true,
567 Label* if_false, 567 Label* if_false,
568 Label* fall_through) { 568 Label* fall_through) {
569 ToBooleanStub stub; 569 ToBooleanStub stub(result_register());
570 __ push(result_register()); 570 __ push(result_register());
571 __ CallStub(&stub); 571 __ CallStub(&stub);
572 __ test(eax, Operand(eax)); 572 __ test(result_register(), Operand(result_register()));
573 // The stub returns nonzero for true. 573 // The stub returns nonzero for true.
574 Split(not_zero, if_true, if_false, fall_through); 574 Split(not_zero, if_true, if_false, fall_through);
575 } 575 }
576 576
577 577
578 void FullCodeGenerator::Split(Condition cc, 578 void FullCodeGenerator::Split(Condition cc,
579 Label* if_true, 579 Label* if_true,
580 Label* if_false, 580 Label* if_false,
581 Label* fall_through) { 581 Label* fall_through) {
582 if (if_false == fall_through) { 582 if (if_false == fall_through) {
(...skipping 3669 matching lines...) Expand 10 before | Expand all | Expand 10 after
4252 // And return. 4252 // And return.
4253 __ ret(0); 4253 __ ret(0);
4254 } 4254 }
4255 4255
4256 4256
4257 #undef __ 4257 #undef __
4258 4258
4259 } } // namespace v8::internal 4259 } } // namespace v8::internal
4260 4260
4261 #endif // V8_TARGET_ARCH_IA32 4261 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698