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

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

Issue 15302004: Convert ToBooleanStub to a HydrogenStub. Currently just using HBranch, which is still fully impleme… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 7 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/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 } else { 671 } else {
672 if (false_label_ != fall_through_) __ b(false_label_); 672 if (false_label_ != fall_through_) __ b(false_label_);
673 } 673 }
674 } 674 }
675 675
676 676
677 void FullCodeGenerator::DoTest(Expression* condition, 677 void FullCodeGenerator::DoTest(Expression* condition,
678 Label* if_true, 678 Label* if_true,
679 Label* if_false, 679 Label* if_false,
680 Label* fall_through) { 680 Label* fall_through) {
681 ToBooleanStub stub(result_register()); 681 Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate());
682 __ CallStub(&stub, condition->test_id()); 682 CallIC(ic, RelocInfo::CODE_TARGET, condition->test_id());
683 __ tst(result_register(), result_register()); 683 __ tst(result_register(), result_register());
684 Split(ne, if_true, if_false, fall_through); 684 Split(ne, if_true, if_false, fall_through);
685 } 685 }
686 686
687 687
688 void FullCodeGenerator::Split(Condition cond, 688 void FullCodeGenerator::Split(Condition cond,
689 Label* if_true, 689 Label* if_true,
690 Label* if_false, 690 Label* if_false,
691 Label* fall_through) { 691 Label* fall_through) {
692 if (if_false == fall_through) { 692 if (if_false == fall_through) {
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 Handle<Code> value_ic = isolate()->builtins()->LoadIC_Initialize(); 2043 Handle<Code> value_ic = isolate()->builtins()->LoadIC_Initialize();
2044 CallIC(value_ic); // result.value in r0 2044 CallIC(value_ic); // result.value in r0
2045 __ pop(r1); // result 2045 __ pop(r1); // result
2046 __ push(r0); // result.value 2046 __ push(r0); // result.value
2047 __ mov(r0, r1); // result 2047 __ mov(r0, r1); // result
2048 __ push(r0); // push LoadIC state 2048 __ push(r0); // push LoadIC state
2049 __ LoadRoot(r2, Heap::kdone_stringRootIndex); // "done" 2049 __ LoadRoot(r2, Heap::kdone_stringRootIndex); // "done"
2050 Handle<Code> done_ic = isolate()->builtins()->LoadIC_Initialize(); 2050 Handle<Code> done_ic = isolate()->builtins()->LoadIC_Initialize();
2051 CallIC(done_ic); // result.done in r0 2051 CallIC(done_ic); // result.done in r0
2052 __ add(sp, sp, Operand(kPointerSize)); // drop LoadIC state 2052 __ add(sp, sp, Operand(kPointerSize)); // drop LoadIC state
2053 ToBooleanStub stub(r0); 2053 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
2054 __ CallStub(&stub); 2054 CallIC(bool_ic);
2055 __ cmp(r0, Operand(0)); 2055 __ cmp(r0, Operand(0));
2056 __ b(eq, &l_try); 2056 __ b(eq, &l_try);
2057 2057
2058 // result.value 2058 // result.value
2059 __ pop(r0); // result.value 2059 __ pop(r0); // result.value
2060 context()->DropAndPlug(2, r0); // drop iter and g 2060 context()->DropAndPlug(2, r0); // drop iter and g
2061 break; 2061 break;
2062 } 2062 }
2063 } 2063 }
2064 } 2064 }
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after
4877 *context_length = 0; 4877 *context_length = 0;
4878 return previous_; 4878 return previous_;
4879 } 4879 }
4880 4880
4881 4881
4882 #undef __ 4882 #undef __
4883 4883
4884 } } // namespace v8::internal 4884 } } // namespace v8::internal
4885 4885
4886 #endif // V8_TARGET_ARCH_ARM 4886 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698