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 14 matching lines...) Expand all Loading... | |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #if defined(V8_TARGET_ARCH_ARM) | 30 #if defined(V8_TARGET_ARCH_ARM) |
31 | 31 |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
33 #include "code-stubs.h" | 33 #include "code-stubs.h" |
34 #include "regexp-macro-assembler.h" | 34 #include "regexp-macro-assembler.h" |
35 #include "stub-cache.h" | |
35 | 36 |
36 namespace v8 { | 37 namespace v8 { |
37 namespace internal { | 38 namespace internal { |
38 | 39 |
39 | 40 |
40 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( | 41 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( |
41 Isolate* isolate, | 42 Isolate* isolate, |
42 CodeStubInterfaceDescriptor* descriptor) { | 43 CodeStubInterfaceDescriptor* descriptor) { |
43 static Register registers[] = { r1, r0 }; | 44 static Register registers[] = { r1, r0 }; |
44 descriptor->register_param_count_ = 2; | 45 descriptor->register_param_count_ = 2; |
(...skipping 4450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4495 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); | 4496 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); |
4496 } | 4497 } |
4497 __ cmp(r0, Operand::Zero()); | 4498 __ cmp(r0, Operand::Zero()); |
4498 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); | 4499 __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); |
4499 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne); | 4500 __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne); |
4500 __ Ret(HasArgsInRegisters() ? 0 : 2); | 4501 __ Ret(HasArgsInRegisters() ? 0 : 2); |
4501 } | 4502 } |
4502 } | 4503 } |
4503 | 4504 |
4504 | 4505 |
4506 void StringLengthStub::Generate(MacroAssembler* masm) { | |
4507 Label miss; | |
4508 Register receiver; | |
4509 if (kind_ == Code::KEYED_LOAD_IC) { | |
4510 // ----------- S t a t e ------------- | |
4511 // -- lr : return address | |
4512 // -- r0 : key | |
4513 // -- r1 : receiver | |
4514 // ----------------------------------- | |
4515 __ cmp(r0, Operand(masm->isolate()->factory()->length_symbol())); | |
4516 __ b(ne, &miss); | |
4517 receiver = r1; | |
4518 } else { | |
Jakob Kummerow
2013/01/21 14:41:39
Please add an ASSERT(kind_ == Code::LOAD_IC) for d
Toon Verwaest
2013/01/21 14:51:17
Done.
| |
4519 // ----------- S t a t e ------------- | |
4520 // -- r2 : name | |
4521 // -- lr : return address | |
4522 // -- r0 : receiver | |
4523 // -- sp[0] : receiver | |
4524 // ----------------------------------- | |
4525 receiver = r0; | |
4526 } | |
4527 | |
4528 StubCompiler::GenerateLoadStringLength(masm, receiver, r3, r4, &miss, | |
4529 support_wrapper_); | |
4530 | |
4531 __ bind(&miss); | |
4532 StubCompiler::GenerateLoadMiss(masm, kind_); | |
4533 } | |
4534 | |
4535 | |
4505 Register InstanceofStub::left() { return r0; } | 4536 Register InstanceofStub::left() { return r0; } |
4506 | 4537 |
4507 | 4538 |
4508 Register InstanceofStub::right() { return r1; } | 4539 Register InstanceofStub::right() { return r1; } |
4509 | 4540 |
4510 | 4541 |
4511 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 4542 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
4512 // The displacement is the offset of the last parameter (if any) | 4543 // The displacement is the offset of the last parameter (if any) |
4513 // relative to the frame pointer. | 4544 // relative to the frame pointer. |
4514 const int kDisplacement = | 4545 const int kDisplacement = |
(...skipping 3235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7750 | 7781 |
7751 __ Pop(lr, r5, r1); | 7782 __ Pop(lr, r5, r1); |
7752 __ Ret(); | 7783 __ Ret(); |
7753 } | 7784 } |
7754 | 7785 |
7755 #undef __ | 7786 #undef __ |
7756 | 7787 |
7757 } } // namespace v8::internal | 7788 } } // namespace v8::internal |
7758 | 7789 |
7759 #endif // V8_TARGET_ARCH_ARM | 7790 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |