Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 11973008: Replace special IC builtins and stubs in the map's cache by codestubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/ic-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 {
4519 ASSERT(kind() == Code::LOAD_IC);
4520 // ----------- S t a t e -------------
4521 // -- r2 : name
4522 // -- lr : return address
4523 // -- r0 : receiver
4524 // -- sp[0] : receiver
4525 // -----------------------------------
4526 receiver = r0;
4527 }
4528
4529 StubCompiler::GenerateLoadStringLength(masm, receiver, r3, r4, &miss,
4530 support_wrapper_);
4531
4532 __ bind(&miss);
4533 StubCompiler::GenerateLoadMiss(masm, kind());
4534 }
4535
4536
4505 Register InstanceofStub::left() { return r0; } 4537 Register InstanceofStub::left() { return r0; }
4506 4538
4507 4539
4508 Register InstanceofStub::right() { return r1; } 4540 Register InstanceofStub::right() { return r1; }
4509 4541
4510 4542
4511 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 4543 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
4512 // The displacement is the offset of the last parameter (if any) 4544 // The displacement is the offset of the last parameter (if any)
4513 // relative to the frame pointer. 4545 // relative to the frame pointer.
4514 const int kDisplacement = 4546 const int kDisplacement =
(...skipping 3235 matching lines...) Expand 10 before | Expand all | Expand 10 after
7750 7782
7751 __ Pop(lr, r5, r1); 7783 __ Pop(lr, r5, r1);
7752 __ Ret(); 7784 __ Ret();
7753 } 7785 }
7754 7786
7755 #undef __ 7787 #undef __
7756 7788
7757 } } // namespace v8::internal 7789 } } // namespace v8::internal
7758 7790
7759 #endif // V8_TARGET_ARCH_ARM 7791 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698