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 4567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4578 // -- a2 : name | 4578 // -- a2 : name |
4579 // -- ra : return address | 4579 // -- ra : return address |
4580 // -- a0 : receiver | 4580 // -- a0 : receiver |
4581 // -- sp[0] : receiver | 4581 // -- sp[0] : receiver |
4582 // ----------------------------------- | 4582 // ----------------------------------- |
4583 receiver = a0; | 4583 receiver = a0; |
4584 } | 4584 } |
4585 | 4585 |
4586 StubCompiler::GenerateLoadArrayLength(masm, receiver, a3, &miss); | 4586 StubCompiler::GenerateLoadArrayLength(masm, receiver, a3, &miss); |
4587 __ bind(&miss); | 4587 __ bind(&miss); |
4588 StubCompiler::GenerateLoadMiss(masm, kind()); | 4588 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
4589 } | 4589 } |
4590 | 4590 |
4591 | 4591 |
4592 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 4592 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
4593 Label miss; | 4593 Label miss; |
4594 Register receiver; | 4594 Register receiver; |
4595 if (kind() == Code::KEYED_LOAD_IC) { | 4595 if (kind() == Code::KEYED_LOAD_IC) { |
4596 // ----------- S t a t e ------------- | 4596 // ----------- S t a t e ------------- |
4597 // -- ra : return address | 4597 // -- ra : return address |
4598 // -- a0 : key | 4598 // -- a0 : key |
4599 // -- a1 : receiver | 4599 // -- a1 : receiver |
4600 // ----------------------------------- | 4600 // ----------------------------------- |
4601 __ Branch(&miss, ne, a0, | 4601 __ Branch(&miss, ne, a0, |
4602 Operand(masm->isolate()->factory()->prototype_string())); | 4602 Operand(masm->isolate()->factory()->prototype_string())); |
4603 receiver = a1; | 4603 receiver = a1; |
4604 } else { | 4604 } else { |
4605 ASSERT(kind() == Code::LOAD_IC); | 4605 ASSERT(kind() == Code::LOAD_IC); |
4606 // ----------- S t a t e ------------- | 4606 // ----------- S t a t e ------------- |
4607 // -- a2 : name | 4607 // -- a2 : name |
4608 // -- ra : return address | 4608 // -- ra : return address |
4609 // -- a0 : receiver | 4609 // -- a0 : receiver |
4610 // -- sp[0] : receiver | 4610 // -- sp[0] : receiver |
4611 // ----------------------------------- | 4611 // ----------------------------------- |
4612 receiver = a0; | 4612 receiver = a0; |
4613 } | 4613 } |
4614 | 4614 |
4615 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3, t0, &miss); | 4615 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3, t0, &miss); |
4616 __ bind(&miss); | 4616 __ bind(&miss); |
4617 StubCompiler::GenerateLoadMiss(masm, kind()); | 4617 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
4618 } | 4618 } |
4619 | 4619 |
4620 | 4620 |
4621 void StringLengthStub::Generate(MacroAssembler* masm) { | 4621 void StringLengthStub::Generate(MacroAssembler* masm) { |
4622 Label miss; | 4622 Label miss; |
4623 Register receiver; | 4623 Register receiver; |
4624 if (kind() == Code::KEYED_LOAD_IC) { | 4624 if (kind() == Code::KEYED_LOAD_IC) { |
4625 // ----------- S t a t e ------------- | 4625 // ----------- S t a t e ------------- |
4626 // -- ra : return address | 4626 // -- ra : return address |
4627 // -- a0 : key | 4627 // -- a0 : key |
(...skipping 10 matching lines...) Expand all Loading... |
4638 // -- a0 : receiver | 4638 // -- a0 : receiver |
4639 // -- sp[0] : receiver | 4639 // -- sp[0] : receiver |
4640 // ----------------------------------- | 4640 // ----------------------------------- |
4641 receiver = a0; | 4641 receiver = a0; |
4642 } | 4642 } |
4643 | 4643 |
4644 StubCompiler::GenerateLoadStringLength(masm, receiver, a3, t0, &miss, | 4644 StubCompiler::GenerateLoadStringLength(masm, receiver, a3, t0, &miss, |
4645 support_wrapper_); | 4645 support_wrapper_); |
4646 | 4646 |
4647 __ bind(&miss); | 4647 __ bind(&miss); |
4648 StubCompiler::GenerateLoadMiss(masm, kind()); | 4648 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
4649 } | 4649 } |
4650 | 4650 |
4651 | 4651 |
4652 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { | 4652 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { |
4653 // This accepts as a receiver anything JSArray::SetElementsLength accepts | 4653 // This accepts as a receiver anything JSArray::SetElementsLength accepts |
4654 // (currently anything except for external arrays which means anything with | 4654 // (currently anything except for external arrays which means anything with |
4655 // elements of FixedArray type). Value must be a number, but only smis are | 4655 // elements of FixedArray type). Value must be a number, but only smis are |
4656 // accepted as the most common case. | 4656 // accepted as the most common case. |
4657 Label miss; | 4657 Label miss; |
4658 | 4658 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4708 | 4708 |
4709 // Prepare tail call to StoreIC_ArrayLength. | 4709 // Prepare tail call to StoreIC_ArrayLength. |
4710 __ Push(receiver, value); | 4710 __ Push(receiver, value); |
4711 | 4711 |
4712 ExternalReference ref = | 4712 ExternalReference ref = |
4713 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); | 4713 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); |
4714 __ TailCallExternalReference(ref, 2, 1); | 4714 __ TailCallExternalReference(ref, 2, 1); |
4715 | 4715 |
4716 __ bind(&miss); | 4716 __ bind(&miss); |
4717 | 4717 |
4718 StubCompiler::GenerateStoreMiss(masm, kind()); | 4718 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); |
4719 } | 4719 } |
4720 | 4720 |
4721 | 4721 |
4722 Register InstanceofStub::left() { return a0; } | 4722 Register InstanceofStub::left() { return a0; } |
4723 | 4723 |
4724 | 4724 |
4725 Register InstanceofStub::right() { return a1; } | 4725 Register InstanceofStub::right() { return a1; } |
4726 | 4726 |
4727 | 4727 |
4728 void LoadFieldStub::Generate(MacroAssembler* masm) { | 4728 void LoadFieldStub::Generate(MacroAssembler* masm) { |
(...skipping 3479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8208 __ Pop(ra, t1, a1); | 8208 __ Pop(ra, t1, a1); |
8209 __ Ret(); | 8209 __ Ret(); |
8210 } | 8210 } |
8211 | 8211 |
8212 | 8212 |
8213 #undef __ | 8213 #undef __ |
8214 | 8214 |
8215 } } // namespace v8::internal | 8215 } } // namespace v8::internal |
8216 | 8216 |
8217 #endif // V8_TARGET_ARCH_MIPS | 8217 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |