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 4470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4481 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); | 4481 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); |
4482 } | 4482 } |
4483 __ cmp(r0, Operand::Zero()); | 4483 __ cmp(r0, Operand::Zero()); |
4484 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); | 4484 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); |
4485 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne); | 4485 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne); |
4486 __ Ret(HasArgsInRegisters() ? 0 : 2); | 4486 __ Ret(HasArgsInRegisters() ? 0 : 2); |
4487 } | 4487 } |
4488 } | 4488 } |
4489 | 4489 |
4490 | 4490 |
4491 void ArrayLengthStub::Generate(MacroAssembler* masm) { | |
4492 Label miss; | |
4493 Register receiver; | |
4494 if (kind() == Code::KEYED_LOAD_IC) { | |
4495 // ----------- S t a t e ------------- | |
4496 // -- lr : return address | |
4497 // -- r0 : key | |
4498 // -- r1 : receiver | |
4499 // ----------------------------------- | |
4500 __ cmp(r0, Operand(masm->isolate()->factory()->length_string())); | |
4501 __ b(ne, &miss); | |
4502 receiver = r1; | |
4503 } else { | |
4504 ASSERT(kind() == Code::LOAD_IC); | |
4505 // ----------- S t a t e ------------- | |
4506 // -- r2 : name | |
4507 // -- lr : return address | |
4508 // -- r0 : receiver | |
4509 // -- sp[0] : receiver | |
4510 // ----------------------------------- | |
4511 receiver = r0; | |
4512 } | |
4513 | |
4514 StubCompiler::GenerateLoadArrayLength(masm, receiver, r3, &miss); | |
4515 __ bind(&miss); | |
4516 StubCompiler::GenerateLoadMiss(masm, kind()); | |
4517 } | |
4518 | |
4519 | |
4520 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 4491 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
4521 Label miss; | 4492 Label miss; |
4522 Register receiver; | 4493 Register receiver; |
4523 if (kind() == Code::KEYED_LOAD_IC) { | 4494 if (kind() == Code::KEYED_LOAD_IC) { |
4524 // ----------- S t a t e ------------- | 4495 // ----------- S t a t e ------------- |
4525 // -- lr : return address | 4496 // -- lr : return address |
4526 // -- r0 : key | 4497 // -- r0 : key |
4527 // -- r1 : receiver | 4498 // -- r1 : receiver |
4528 // ----------------------------------- | 4499 // ----------------------------------- |
4529 __ cmp(r0, Operand(masm->isolate()->factory()->prototype_string())); | 4500 __ cmp(r0, Operand(masm->isolate()->factory()->prototype_string())); |
(...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8062 | 8033 |
8063 __ Pop(lr, r5, r1); | 8034 __ Pop(lr, r5, r1); |
8064 __ Ret(); | 8035 __ Ret(); |
8065 } | 8036 } |
8066 | 8037 |
8067 #undef __ | 8038 #undef __ |
8068 | 8039 |
8069 } } // namespace v8::internal | 8040 } } // namespace v8::internal |
8070 | 8041 |
8071 #endif // V8_TARGET_ARCH_ARM | 8042 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |