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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm64/code-stubs-arm64.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 // 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_ARM 7 #if V8_TARGET_ARCH_ARM
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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 Register receiver = LoadDescriptor::ReceiverRegister(); 1496 Register receiver = LoadDescriptor::ReceiverRegister();
1497 1497
1498 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, 1498 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3,
1499 r4, &miss); 1499 r4, &miss);
1500 __ bind(&miss); 1500 __ bind(&miss);
1501 PropertyAccessCompiler::TailCallBuiltin( 1501 PropertyAccessCompiler::TailCallBuiltin(
1502 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1502 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1503 } 1503 }
1504 1504
1505 1505
1506 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1507 // Return address is in lr.
1508 Label miss;
1509
1510 Register receiver = LoadDescriptor::ReceiverRegister();
1511 Register index = LoadDescriptor::NameRegister();
1512 Register scratch = r3;
1513 Register result = r0;
1514 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1515
1516 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1517 &miss, // When not a string.
1518 &miss, // When not a number.
1519 &miss, // When index out of range.
1520 STRING_INDEX_IS_ARRAY_INDEX,
1521 RECEIVER_IS_STRING);
1522 char_at_generator.GenerateFast(masm);
1523 __ Ret();
1524
1525 StubRuntimeCallHelper call_helper;
1526 char_at_generator.GenerateSlow(masm, call_helper);
1527
1528 __ bind(&miss);
1529 PropertyAccessCompiler::TailCallBuiltin(
1530 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
1531 }
1532
1533
1506 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 1534 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
1507 // The displacement is the offset of the last parameter (if any) 1535 // The displacement is the offset of the last parameter (if any)
1508 // relative to the frame pointer. 1536 // relative to the frame pointer.
1509 const int kDisplacement = 1537 const int kDisplacement =
1510 StandardFrameConstants::kCallerSPOffset - kPointerSize; 1538 StandardFrameConstants::kCallerSPOffset - kPointerSize;
1511 DCHECK(r1.is(ArgumentsAccessReadDescriptor::index())); 1539 DCHECK(r1.is(ArgumentsAccessReadDescriptor::index()));
1512 DCHECK(r0.is(ArgumentsAccessReadDescriptor::parameter_count())); 1540 DCHECK(r0.is(ArgumentsAccessReadDescriptor::parameter_count()));
1513 1541
1514 // Check that the key is a smi. 1542 // Check that the key is a smi.
1515 Label slow; 1543 Label slow;
(...skipping 3162 matching lines...) Expand 10 before | Expand all | Expand 10 after
4678 MemOperand(fp, 6 * kPointerSize), 4706 MemOperand(fp, 6 * kPointerSize),
4679 NULL); 4707 NULL);
4680 } 4708 }
4681 4709
4682 4710
4683 #undef __ 4711 #undef __
4684 4712
4685 } } // namespace v8::internal 4713 } } // namespace v8::internal
4686 4714
4687 #endif // V8_TARGET_ARCH_ARM 4715 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698