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

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

Issue 602773003: Eliminate special keyed load string stub in favor of uniform handlers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and ports. Created 6 years, 2 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 | « src/ic/x64/ic-x64.cc ('k') | src/objects.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 // Restore callee-saved fpu registers. 1396 // Restore callee-saved fpu registers.
1397 __ MultiPopFPU(kCalleeSavedFPU); 1397 __ MultiPopFPU(kCalleeSavedFPU);
1398 1398
1399 // Restore callee saved registers from the stack. 1399 // Restore callee saved registers from the stack.
1400 __ MultiPop(kCalleeSaved | ra.bit()); 1400 __ MultiPop(kCalleeSaved | ra.bit());
1401 // Return. 1401 // Return.
1402 __ Jump(ra); 1402 __ Jump(ra);
1403 } 1403 }
1404 1404
1405 1405
1406 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1407 // Return address is in ra.
1408 Label miss;
1409
1410 Register receiver = LoadDescriptor::ReceiverRegister();
1411 Register index = LoadDescriptor::NameRegister();
1412 Register scratch = a3;
1413 Register result = v0;
1414 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1415
1416 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1417 &miss, // When not a string.
1418 &miss, // When not a number.
1419 &miss, // When index out of range.
1420 STRING_INDEX_IS_ARRAY_INDEX,
1421 RECEIVER_IS_STRING);
1422 char_at_generator.GenerateFast(masm);
1423 __ Ret();
1424
1425 StubRuntimeCallHelper call_helper;
1426 char_at_generator.GenerateSlow(masm, call_helper);
1427
1428 __ bind(&miss);
1429 PropertyAccessCompiler::TailCallBuiltin(
1430 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
1431 }
1432
1433
1406 // Uses registers a0 to t0. 1434 // Uses registers a0 to t0.
1407 // Expected input (depending on whether args are in registers or on the stack): 1435 // Expected input (depending on whether args are in registers or on the stack):
1408 // * object: a0 or at sp + 1 * kPointerSize. 1436 // * object: a0 or at sp + 1 * kPointerSize.
1409 // * function: a1 or at sp. 1437 // * function: a1 or at sp.
1410 // 1438 //
1411 // An inlined call site may have been generated before calling this stub. 1439 // An inlined call site may have been generated before calling this stub.
1412 // In this case the offset to the inline site to patch is passed on the stack, 1440 // In this case the offset to the inline site to patch is passed on the stack,
1413 // in the safepoint slot for register t0. 1441 // in the safepoint slot for register t0.
1414 void InstanceofStub::Generate(MacroAssembler* masm) { 1442 void InstanceofStub::Generate(MacroAssembler* masm) {
1415 // Call site inlining and patching implies arguments in registers. 1443 // Call site inlining and patching implies arguments in registers.
(...skipping 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after
4898 MemOperand(fp, 6 * kPointerSize), 4926 MemOperand(fp, 6 * kPointerSize),
4899 NULL); 4927 NULL);
4900 } 4928 }
4901 4929
4902 4930
4903 #undef __ 4931 #undef __
4904 4932
4905 } } // namespace v8::internal 4933 } } // namespace v8::internal
4906 4934
4907 #endif // V8_TARGET_ARCH_MIPS 4935 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698