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 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4470 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); | 4470 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); |
4471 } | 4471 } |
4472 __ cmp(r0, Operand::Zero()); | 4472 __ cmp(r0, Operand::Zero()); |
4473 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); | 4473 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); |
4474 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne); | 4474 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne); |
4475 __ Ret(HasArgsInRegisters() ? 0 : 2); | 4475 __ Ret(HasArgsInRegisters() ? 0 : 2); |
4476 } | 4476 } |
4477 } | 4477 } |
4478 | 4478 |
4479 | 4479 |
4480 void ArrayLengthStub::Generate(MacroAssembler* masm) { | |
4481 Label miss; | |
4482 Register receiver; | |
4483 if (kind() == Code::KEYED_LOAD_IC) { | |
4484 // ----------- S t a t e ------------- | |
4485 // -- lr : return address | |
4486 // -- r0 : key | |
4487 // -- r1 : receiver | |
4488 // ----------------------------------- | |
4489 __ cmp(r0, Operand(masm->isolate()->factory()->length_string())); | |
4490 __ b(ne, &miss); | |
4491 receiver = r1; | |
4492 } else { | |
4493 ASSERT(kind() == Code::LOAD_IC); | |
4494 // ----------- S t a t e ------------- | |
4495 // -- r2 : name | |
4496 // -- lr : return address | |
4497 // -- r0 : receiver | |
4498 // -- sp[0] : receiver | |
4499 // ----------------------------------- | |
4500 receiver = r0; | |
4501 } | |
4502 | |
4503 StubCompiler::GenerateLoadArrayLength(masm, receiver, r3, &miss); | |
4504 __ bind(&miss); | |
4505 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); | |
4506 } | |
4507 | |
4508 | |
4509 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 4480 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
4510 Label miss; | 4481 Label miss; |
4511 Register receiver; | 4482 Register receiver; |
4512 if (kind() == Code::KEYED_LOAD_IC) { | 4483 if (kind() == Code::KEYED_LOAD_IC) { |
4513 // ----------- S t a t e ------------- | 4484 // ----------- S t a t e ------------- |
4514 // -- lr : return address | 4485 // -- lr : return address |
4515 // -- r0 : key | 4486 // -- r0 : key |
4516 // -- r1 : receiver | 4487 // -- r1 : receiver |
4517 // ----------------------------------- | 4488 // ----------------------------------- |
4518 __ cmp(r0, Operand(masm->isolate()->factory()->prototype_string())); | 4489 __ cmp(r0, Operand(masm->isolate()->factory()->prototype_string())); |
(...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8051 | 8022 |
8052 __ Pop(lr, r5, r1); | 8023 __ Pop(lr, r5, r1); |
8053 __ Ret(); | 8024 __ Ret(); |
8054 } | 8025 } |
8055 | 8026 |
8056 #undef __ | 8027 #undef __ |
8057 | 8028 |
8058 } } // namespace v8::internal | 8029 } } // namespace v8::internal |
8059 | 8030 |
8060 #endif // V8_TARGET_ARCH_ARM | 8031 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |