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

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

Issue 12052011: MIPS: Migrate ArrayLength (Keyed|Named)LoadIC to CodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips/ic-mips.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 4526 matching lines...) Expand 10 before | Expand all | Expand 10 after
4537 } 4537 }
4538 __ mov(a0, v0); 4538 __ mov(a0, v0);
4539 __ LoadRoot(v0, Heap::kTrueValueRootIndex); 4539 __ LoadRoot(v0, Heap::kTrueValueRootIndex);
4540 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); 4540 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg));
4541 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 4541 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
4542 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); 4542 __ DropAndRet(HasArgsInRegisters() ? 0 : 2);
4543 } 4543 }
4544 } 4544 }
4545 4545
4546 4546
4547 void ArrayLengthStub::Generate(MacroAssembler* masm) {
4548 Label miss;
4549 Register receiver;
4550 if (kind() == Code::KEYED_LOAD_IC) {
4551 // ----------- S t a t e -------------
4552 // -- ra : return address
4553 // -- a0 : key
4554 // -- a1 : receiver
4555 // -----------------------------------
4556 __ Branch(&miss, ne, a0,
4557 Operand(masm->isolate()->factory()->length_symbol()));
4558 receiver = a1;
4559 } else {
4560 ASSERT(kind() == Code::LOAD_IC);
4561 // ----------- S t a t e -------------
4562 // -- a2 : name
4563 // -- ra : return address
4564 // -- a0 : receiver
4565 // -- sp[0] : receiver
4566 // -----------------------------------
4567 receiver = a0;
4568 }
4569
4570 StubCompiler::GenerateLoadArrayLength(masm, receiver, a3, &miss);
4571 __ bind(&miss);
4572 StubCompiler::GenerateLoadMiss(masm, kind());
4573 }
4574
4575
4547 void StringLengthStub::Generate(MacroAssembler* masm) { 4576 void StringLengthStub::Generate(MacroAssembler* masm) {
4548 Label miss; 4577 Label miss;
4549 Register receiver; 4578 Register receiver;
4550 if (kind() == Code::KEYED_LOAD_IC) { 4579 if (kind() == Code::KEYED_LOAD_IC) {
4551 // ----------- S t a t e ------------- 4580 // ----------- S t a t e -------------
4552 // -- ra : return address 4581 // -- ra : return address
4553 // -- a0 : key 4582 // -- a0 : key
4554 // -- a1 : receiver 4583 // -- a1 : receiver
4555 // ----------------------------------- 4584 // -----------------------------------
4556 __ Branch(&miss, ne, a0, 4585 __ Branch(&miss, ne, a0,
(...skipping 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after
7907 __ Pop(ra, t1, a1); 7936 __ Pop(ra, t1, a1);
7908 __ Ret(); 7937 __ Ret();
7909 } 7938 }
7910 7939
7911 7940
7912 #undef __ 7941 #undef __
7913 7942
7914 } } // namespace v8::internal 7943 } } // namespace v8::internal
7915 7944
7916 #endif // V8_TARGET_ARCH_MIPS 7945 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698