| OLD | NEW |
| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 } else { | 670 } else { |
| 671 if (false_label_ != fall_through_) __ Branch(false_label_); | 671 if (false_label_ != fall_through_) __ Branch(false_label_); |
| 672 } | 672 } |
| 673 } | 673 } |
| 674 | 674 |
| 675 | 675 |
| 676 void FullCodeGenerator::DoTest(Expression* condition, | 676 void FullCodeGenerator::DoTest(Expression* condition, |
| 677 Label* if_true, | 677 Label* if_true, |
| 678 Label* if_false, | 678 Label* if_false, |
| 679 Label* fall_through) { | 679 Label* fall_through) { |
| 680 ToBooleanStub stub(result_register()); | 680 __ mov(a0, result_register()); |
| 681 __ CallStub(&stub, condition->test_id()); | 681 Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate()); |
| 682 CallIC(ic, RelocInfo::CODE_TARGET, condition->test_id()); |
| 682 __ mov(at, zero_reg); | 683 __ mov(at, zero_reg); |
| 683 Split(ne, v0, Operand(at), if_true, if_false, fall_through); | 684 Split(ne, v0, Operand(at), if_true, if_false, fall_through); |
| 684 } | 685 } |
| 685 | 686 |
| 686 | 687 |
| 687 void FullCodeGenerator::Split(Condition cc, | 688 void FullCodeGenerator::Split(Condition cc, |
| 688 Register lhs, | 689 Register lhs, |
| 689 const Operand& rhs, | 690 const Operand& rhs, |
| 690 Label* if_true, | 691 Label* if_true, |
| 691 Label* if_false, | 692 Label* if_false, |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2054 CallIC(value_ic); // result.value in a0 | 2055 CallIC(value_ic); // result.value in a0 |
| 2055 __ mov(a0, v0); | 2056 __ mov(a0, v0); |
| 2056 __ pop(a1); // result | 2057 __ pop(a1); // result |
| 2057 __ push(a0); // result.value | 2058 __ push(a0); // result.value |
| 2058 __ mov(a0, a1); // result | 2059 __ mov(a0, a1); // result |
| 2059 __ push(a0); // push LoadIC state | 2060 __ push(a0); // push LoadIC state |
| 2060 __ LoadRoot(a2, Heap::kdone_stringRootIndex); // "done" | 2061 __ LoadRoot(a2, Heap::kdone_stringRootIndex); // "done" |
| 2061 Handle<Code> done_ic = isolate()->builtins()->LoadIC_Initialize(); | 2062 Handle<Code> done_ic = isolate()->builtins()->LoadIC_Initialize(); |
| 2062 CallIC(done_ic); // result.done in v0 | 2063 CallIC(done_ic); // result.done in v0 |
| 2063 __ Addu(sp, sp, Operand(kPointerSize)); // drop LoadIC state | 2064 __ Addu(sp, sp, Operand(kPointerSize)); // drop LoadIC state |
| 2064 ToBooleanStub stub(v0); | 2065 __ mov(a0, v0); |
| 2065 __ CallStub(&stub); | 2066 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
| 2067 CallIC(bool_ic); |
| 2066 __ Branch(&l_try, eq, v0, Operand(zero_reg)); | 2068 __ Branch(&l_try, eq, v0, Operand(zero_reg)); |
| 2067 | 2069 |
| 2068 // result.value | 2070 // result.value |
| 2069 __ pop(v0); // result.value | 2071 __ pop(v0); // result.value |
| 2070 context()->DropAndPlug(2, v0); // drop iter and g | 2072 context()->DropAndPlug(2, v0); // drop iter and g |
| 2071 break; | 2073 break; |
| 2072 } | 2074 } |
| 2073 } | 2075 } |
| 2074 } | 2076 } |
| 2075 | 2077 |
| (...skipping 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4910 *context_length = 0; | 4912 *context_length = 0; |
| 4911 return previous_; | 4913 return previous_; |
| 4912 } | 4914 } |
| 4913 | 4915 |
| 4914 | 4916 |
| 4915 #undef __ | 4917 #undef __ |
| 4916 | 4918 |
| 4917 } } // namespace v8::internal | 4919 } } // namespace v8::internal |
| 4918 | 4920 |
| 4919 #endif // V8_TARGET_ARCH_MIPS | 4921 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |