Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 415f8bc4e711c7b3d9726114b0013d513d8d826d..3998a9f3fa888abdb912610ec811c52cd4605474 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -4503,6 +4503,35 @@ void InstanceofStub::Generate(MacroAssembler* masm) { |
} |
+void ArrayLengthStub::Generate(MacroAssembler* masm) { |
+ Label miss; |
+ Register receiver; |
+ if (kind() == Code::KEYED_LOAD_IC) { |
+ // ----------- S t a t e ------------- |
+ // -- lr : return address |
+ // -- r0 : key |
+ // -- r1 : receiver |
+ // ----------------------------------- |
+ __ cmp(r0, Operand(masm->isolate()->factory()->length_symbol())); |
+ __ b(ne, &miss); |
+ receiver = r1; |
+ } else { |
+ ASSERT(kind() == Code::LOAD_IC); |
+ // ----------- S t a t e ------------- |
+ // -- r2 : name |
+ // -- lr : return address |
+ // -- r0 : receiver |
+ // -- sp[0] : receiver |
+ // ----------------------------------- |
+ receiver = r0; |
+ } |
+ |
+ StubCompiler::GenerateLoadArrayLength(masm, receiver, r3, &miss); |
+ __ bind(&miss); |
+ StubCompiler::GenerateLoadMiss(masm, kind()); |
+} |
+ |
+ |
void StringLengthStub::Generate(MacroAssembler* masm) { |
Label miss; |
Register receiver; |