Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 4b71af66226ed584b1b719a7cffdba5003bb166e..cfeecf1981938eef431fb48328121da1f3d2eff7 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -3259,6 +3259,26 @@ void MathPowStub::Generate(MacroAssembler* masm) { |
} |
+void StringLengthStub::Generate(MacroAssembler* masm) { |
+ // ----------- S t a t e ------------- |
+ // -- ecx : name |
+ // -- edx : receiver |
+ // -- esp[0] : return address |
+ // ----------------------------------- |
+ Label miss; |
+ |
+ if (kind() == Code::KEYED_LOAD_IC) { |
+ __ cmp(ecx, Immediate(masm->isolate()->factory()->length_symbol())); |
+ __ j(not_equal, &miss); |
+ } |
+ |
+ StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss, |
+ support_wrapper_); |
+ __ bind(&miss); |
+ StubCompiler::GenerateLoadMiss(masm, kind()); |
+} |
+ |
+ |
void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
// The key is in edx and the parameter count is in eax. |