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

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

Issue 657413002: MIPS: Eliminate special keyed load string stub in favor of uniform handlers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips64/ic-mips64.cc ('k') | no next file » | 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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 // Restore callee-saved fpu registers. 1398 // Restore callee-saved fpu registers.
1399 __ MultiPopFPU(kCalleeSavedFPU); 1399 __ MultiPopFPU(kCalleeSavedFPU);
1400 1400
1401 // Restore callee saved registers from the stack. 1401 // Restore callee saved registers from the stack.
1402 __ MultiPop(kCalleeSaved | ra.bit()); 1402 __ MultiPop(kCalleeSaved | ra.bit());
1403 // Return. 1403 // Return.
1404 __ Jump(ra); 1404 __ Jump(ra);
1405 } 1405 }
1406 1406
1407 1407
1408 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1409 // Return address is in ra.
1410 Label miss;
1411
1412 Register receiver = LoadDescriptor::ReceiverRegister();
1413 Register index = LoadDescriptor::NameRegister();
1414 Register scratch = a3;
1415 Register result = v0;
1416 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1417
1418 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1419 &miss, // When not a string.
1420 &miss, // When not a number.
1421 &miss, // When index out of range.
1422 STRING_INDEX_IS_ARRAY_INDEX,
1423 RECEIVER_IS_STRING);
1424 char_at_generator.GenerateFast(masm);
1425 __ Ret();
1426
1427 StubRuntimeCallHelper call_helper;
1428 char_at_generator.GenerateSlow(masm, call_helper);
1429
1430 __ bind(&miss);
1431 PropertyAccessCompiler::TailCallBuiltin(
1432 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
1433 }
1434
1435
1408 // Uses registers a0 to a4. 1436 // Uses registers a0 to a4.
1409 // Expected input (depending on whether args are in registers or on the stack): 1437 // Expected input (depending on whether args are in registers or on the stack):
1410 // * object: a0 or at sp + 1 * kPointerSize. 1438 // * object: a0 or at sp + 1 * kPointerSize.
1411 // * function: a1 or at sp. 1439 // * function: a1 or at sp.
1412 // 1440 //
1413 // An inlined call site may have been generated before calling this stub. 1441 // An inlined call site may have been generated before calling this stub.
1414 // In this case the offset to the inline site to patch is passed on the stack, 1442 // In this case the offset to the inline site to patch is passed on the stack,
1415 // in the safepoint slot for register a4. 1443 // in the safepoint slot for register a4.
1416 void InstanceofStub::Generate(MacroAssembler* masm) { 1444 void InstanceofStub::Generate(MacroAssembler* masm) {
1417 // Call site inlining and patching implies arguments in registers. 1445 // Call site inlining and patching implies arguments in registers.
(...skipping 3503 matching lines...) Expand 10 before | Expand all | Expand 10 after
4921 MemOperand(fp, 6 * kPointerSize), 4949 MemOperand(fp, 6 * kPointerSize),
4922 NULL); 4950 NULL);
4923 } 4951 }
4924 4952
4925 4953
4926 #undef __ 4954 #undef __
4927 4955
4928 } } // namespace v8::internal 4956 } } // namespace v8::internal
4929 4957
4930 #endif // V8_TARGET_ARCH_MIPS64 4958 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698