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

Unified Diff: src/ia32/full-codegen-ia32.cc

Issue 7042004: Handle all kind of arguments in the ToBooleanStub. While this is not very (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/full-codegen-ia32.cc
===================================================================
--- src/ia32/full-codegen-ia32.cc (revision 7918)
+++ src/ia32/full-codegen-ia32.cc (working copy)
@@ -548,25 +548,10 @@
void FullCodeGenerator::DoTest(Label* if_true,
Label* if_false,
Label* fall_through) {
- // Emit the inlined tests assumed by the stub.
- __ cmp(result_register(), isolate()->factory()->undefined_value());
- __ j(equal, if_false);
- __ cmp(result_register(), isolate()->factory()->true_value());
- __ j(equal, if_true);
- __ cmp(result_register(), isolate()->factory()->false_value());
- __ j(equal, if_false);
- STATIC_ASSERT(kSmiTag == 0);
- __ test(result_register(), Operand(result_register()));
- __ j(zero, if_false);
- __ test(result_register(), Immediate(kSmiTagMask));
- __ j(zero, if_true);
-
- // Call the ToBoolean stub for all other cases.
ToBooleanStub stub;
__ push(result_register());
__ CallStub(&stub);
__ test(eax, Operand(eax));
-
// The stub returns nonzero for true.
Split(not_zero, if_true, if_false, fall_through);
}
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698