Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 3ce69e034c1722bdff3d2aa044598a4437e67928..25a833eebfd71ec05e49241b8cc29a55419816f2 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -1981,140 +1981,6 @@ Handle<Code> CallStubCompiler::CompileArrayPopCall( |
} |
-Handle<Code> CallStubCompiler::CompileStringCharCodeAtCall( |
- Handle<Object> object, |
- Handle<JSObject> holder, |
- Handle<Cell> cell, |
- Handle<JSFunction> function, |
- Handle<String> name, |
- Code::StubType type) { |
- // If object is not a string, bail out to regular call. |
- if (!object->IsString() || !cell.is_null()) { |
- return Handle<Code>::null(); |
- } |
- |
- const int argc = arguments().immediate(); |
- |
- Label miss; |
- Label name_miss; |
- Label index_out_of_range; |
- Label* index_out_of_range_label = &index_out_of_range; |
- |
- if (kind_ == Code::CALL_IC && |
- (CallICBase::StringStubState::decode(extra_state()) == |
- DEFAULT_STRING_STUB)) { |
- index_out_of_range_label = &miss; |
- } |
- |
- HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); |
- |
- Register receiver = ebx; |
- Register index = edi; |
- Register result = eax; |
- __ mov(receiver, Operand(esp, (argc + 1) * kPointerSize)); |
- if (argc > 0) { |
- __ mov(index, Operand(esp, (argc - 0) * kPointerSize)); |
- } else { |
- __ Set(index, Immediate(factory()->undefined_value())); |
- } |
- |
- StringCharCodeAtGenerator generator(receiver, |
- index, |
- result, |
- &miss, // When not a string. |
- &miss, // When not a number. |
- index_out_of_range_label, |
- STRING_INDEX_IS_NUMBER); |
- generator.GenerateFast(masm()); |
- __ ret((argc + 1) * kPointerSize); |
- |
- StubRuntimeCallHelper call_helper; |
- generator.GenerateSlow(masm(), call_helper); |
- |
- if (index_out_of_range.is_linked()) { |
- __ bind(&index_out_of_range); |
- __ Set(eax, Immediate(factory()->nan_value())); |
- __ ret((argc + 1) * kPointerSize); |
- } |
- |
- __ bind(&miss); |
- // Restore function name in ecx. |
- __ Set(ecx, Immediate(name)); |
- HandlerFrontendFooter(&name_miss); |
- |
- // Return the generated code. |
- return GetCode(type, name); |
-} |
- |
- |
-Handle<Code> CallStubCompiler::CompileStringCharAtCall( |
- Handle<Object> object, |
- Handle<JSObject> holder, |
- Handle<Cell> cell, |
- Handle<JSFunction> function, |
- Handle<String> name, |
- Code::StubType type) { |
- // If object is not a string, bail out to regular call. |
- if (!object->IsString() || !cell.is_null()) { |
- return Handle<Code>::null(); |
- } |
- |
- const int argc = arguments().immediate(); |
- |
- Label miss; |
- Label name_miss; |
- Label index_out_of_range; |
- Label* index_out_of_range_label = &index_out_of_range; |
- |
- if (kind_ == Code::CALL_IC && |
- (CallICBase::StringStubState::decode(extra_state()) == |
- DEFAULT_STRING_STUB)) { |
- index_out_of_range_label = &miss; |
- } |
- |
- HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); |
- |
- Register receiver = eax; |
- Register index = edi; |
- Register scratch = edx; |
- Register result = eax; |
- __ mov(receiver, Operand(esp, (argc + 1) * kPointerSize)); |
- if (argc > 0) { |
- __ mov(index, Operand(esp, (argc - 0) * kPointerSize)); |
- } else { |
- __ Set(index, Immediate(factory()->undefined_value())); |
- } |
- |
- StringCharAtGenerator generator(receiver, |
- index, |
- scratch, |
- result, |
- &miss, // When not a string. |
- &miss, // When not a number. |
- index_out_of_range_label, |
- STRING_INDEX_IS_NUMBER); |
- generator.GenerateFast(masm()); |
- __ ret((argc + 1) * kPointerSize); |
- |
- StubRuntimeCallHelper call_helper; |
- generator.GenerateSlow(masm(), call_helper); |
- |
- if (index_out_of_range.is_linked()) { |
- __ bind(&index_out_of_range); |
- __ Set(eax, Immediate(factory()->empty_string())); |
- __ ret((argc + 1) * kPointerSize); |
- } |
- |
- __ bind(&miss); |
- // Restore function name in ecx. |
- __ Set(ecx, Immediate(name)); |
- HandlerFrontendFooter(&name_miss); |
- |
- // Return the generated code. |
- return GetCode(type, name); |
-} |
- |
- |
Handle<Code> CallStubCompiler::CompileStringFromCharCodeCall( |
Handle<Object> object, |
Handle<JSObject> holder, |