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 4526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4537 } | 4537 } |
4538 __ mov(a0, v0); | 4538 __ mov(a0, v0); |
4539 __ LoadRoot(v0, Heap::kTrueValueRootIndex); | 4539 __ LoadRoot(v0, Heap::kTrueValueRootIndex); |
4540 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); | 4540 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); |
4541 __ LoadRoot(v0, Heap::kFalseValueRootIndex); | 4541 __ LoadRoot(v0, Heap::kFalseValueRootIndex); |
4542 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); | 4542 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); |
4543 } | 4543 } |
4544 } | 4544 } |
4545 | 4545 |
4546 | 4546 |
4547 void ArrayLengthStub::Generate(MacroAssembler* masm) { | |
4548 Label miss; | |
4549 Register receiver; | |
4550 if (kind() == Code::KEYED_LOAD_IC) { | |
4551 // ----------- S t a t e ------------- | |
4552 // -- ra : return address | |
4553 // -- a0 : key | |
4554 // -- a1 : receiver | |
4555 // ----------------------------------- | |
4556 __ Branch(&miss, ne, a0, | |
4557 Operand(masm->isolate()->factory()->length_string())); | |
4558 receiver = a1; | |
4559 } else { | |
4560 ASSERT(kind() == Code::LOAD_IC); | |
4561 // ----------- S t a t e ------------- | |
4562 // -- a2 : name | |
4563 // -- ra : return address | |
4564 // -- a0 : receiver | |
4565 // -- sp[0] : receiver | |
4566 // ----------------------------------- | |
4567 receiver = a0; | |
4568 } | |
4569 | |
4570 StubCompiler::GenerateLoadArrayLength(masm, receiver, a3, &miss); | |
4571 __ bind(&miss); | |
4572 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); | |
4573 } | |
4574 | |
4575 | |
4576 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 4547 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
4577 Label miss; | 4548 Label miss; |
4578 Register receiver; | 4549 Register receiver; |
4579 if (kind() == Code::KEYED_LOAD_IC) { | 4550 if (kind() == Code::KEYED_LOAD_IC) { |
4580 // ----------- S t a t e ------------- | 4551 // ----------- S t a t e ------------- |
4581 // -- ra : return address | 4552 // -- ra : return address |
4582 // -- a0 : key | 4553 // -- a0 : key |
4583 // -- a1 : receiver | 4554 // -- a1 : receiver |
4584 // ----------------------------------- | 4555 // ----------------------------------- |
4585 __ Branch(&miss, ne, a0, | 4556 __ Branch(&miss, ne, a0, |
(...skipping 3606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8192 __ Pop(ra, t1, a1); | 8163 __ Pop(ra, t1, a1); |
8193 __ Ret(); | 8164 __ Ret(); |
8194 } | 8165 } |
8195 | 8166 |
8196 | 8167 |
8197 #undef __ | 8168 #undef __ |
8198 | 8169 |
8199 } } // namespace v8::internal | 8170 } } // namespace v8::internal |
8200 | 8171 |
8201 #endif // V8_TARGET_ARCH_MIPS | 8172 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |