Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index 35b60f7a6fb41e6dc800a7c4369b2f826d55124e..0788d5f09e1fcd2d2a0b6e809cd9a18f72f66d4e 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -1422,6 +1422,34 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
} |
+void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
+ // Return address is in lr. |
+ Label miss; |
+ |
+ Register receiver = LoadDescriptor::ReceiverRegister(); |
+ Register index = LoadDescriptor::NameRegister(); |
+ Register result = x0; |
+ Register scratch = x3; |
+ DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
+ |
+ StringCharAtGenerator char_at_generator(receiver, index, scratch, result, |
+ &miss, // When not a string. |
+ &miss, // When not a number. |
+ &miss, // When index out of range. |
+ STRING_INDEX_IS_ARRAY_INDEX, |
+ RECEIVER_IS_STRING); |
+ char_at_generator.GenerateFast(masm); |
+ __ Ret(); |
+ |
+ StubRuntimeCallHelper call_helper; |
+ char_at_generator.GenerateSlow(masm, call_helper); |
+ |
+ __ Bind(&miss); |
+ PropertyAccessCompiler::TailCallBuiltin( |
+ masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
+} |
+ |
+ |
void InstanceofStub::Generate(MacroAssembler* masm) { |
// Stack on entry: |
// jssp[0]: function. |