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

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

Issue 12700006: Replace ICStub for array.length with hydrogen stub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New patch Created 7 years, 9 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
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 4542 matching lines...) Expand 10 before | Expand all | Expand 10 after
4553 } 4553 }
4554 __ mov(a0, v0); 4554 __ mov(a0, v0);
4555 __ LoadRoot(v0, Heap::kTrueValueRootIndex); 4555 __ LoadRoot(v0, Heap::kTrueValueRootIndex);
4556 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); 4556 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg));
4557 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 4557 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
4558 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); 4558 __ DropAndRet(HasArgsInRegisters() ? 0 : 2);
4559 } 4559 }
4560 } 4560 }
4561 4561
4562 4562
4563 void ArrayLengthStub::Generate(MacroAssembler* masm) {
4564 Label miss;
4565 Register receiver;
4566 if (kind() == Code::KEYED_LOAD_IC) {
4567 // ----------- S t a t e -------------
4568 // -- ra : return address
4569 // -- a0 : key
4570 // -- a1 : receiver
4571 // -----------------------------------
4572 __ Branch(&miss, ne, a0,
4573 Operand(masm->isolate()->factory()->length_string()));
4574 receiver = a1;
4575 } else {
4576 ASSERT(kind() == Code::LOAD_IC);
4577 // ----------- S t a t e -------------
4578 // -- a2 : name
4579 // -- ra : return address
4580 // -- a0 : receiver
4581 // -- sp[0] : receiver
4582 // -----------------------------------
4583 receiver = a0;
4584 }
4585
4586 StubCompiler::GenerateLoadArrayLength(masm, receiver, a3, &miss);
4587 __ bind(&miss);
4588 StubCompiler::GenerateLoadMiss(masm, kind());
4589 }
4590
4591
4592 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 4563 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
4593 Label miss; 4564 Label miss;
4594 Register receiver; 4565 Register receiver;
4595 if (kind() == Code::KEYED_LOAD_IC) { 4566 if (kind() == Code::KEYED_LOAD_IC) {
4596 // ----------- S t a t e ------------- 4567 // ----------- S t a t e -------------
4597 // -- ra : return address 4568 // -- ra : return address
4598 // -- a0 : key 4569 // -- a0 : key
4599 // -- a1 : receiver 4570 // -- a1 : receiver
4600 // ----------------------------------- 4571 // -----------------------------------
4601 __ Branch(&miss, ne, a0, 4572 __ Branch(&miss, ne, a0,
(...skipping 3606 matching lines...) Expand 10 before | Expand all | Expand 10 after
8208 __ Pop(ra, t1, a1); 8179 __ Pop(ra, t1, a1);
8209 __ Ret(); 8180 __ Ret();
8210 } 8181 }
8211 8182
8212 8183
8213 #undef __ 8184 #undef __
8214 8185
8215 } } // namespace v8::internal 8186 } } // namespace v8::internal
8216 8187
8217 #endif // V8_TARGET_ARCH_MIPS 8188 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698