Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index a8c268a0502d758c518404f111092d81786882d9..ec5f4a3cbfcafb241fdd42ca94334e23ffe00188 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -1889,138 +1889,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(); |
- |
- 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 = r0; |
- Register index = r4; |
- Register result = r1; |
- const int argc = arguments().immediate(); |
- __ ldr(receiver, MemOperand(sp, argc * kPointerSize)); |
- if (argc > 0) { |
- __ ldr(index, MemOperand(sp, (argc - 1) * kPointerSize)); |
- } else { |
- __ LoadRoot(index, Heap::kUndefinedValueRootIndex); |
- } |
- |
- 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()); |
- __ Drop(argc + 1); |
- __ mov(r0, result); |
- __ Ret(); |
- |
- StubRuntimeCallHelper call_helper; |
- generator.GenerateSlow(masm(), call_helper); |
- |
- if (index_out_of_range.is_linked()) { |
- __ bind(&index_out_of_range); |
- __ LoadRoot(r0, Heap::kNanValueRootIndex); |
- __ Drop(argc + 1); |
- __ Ret(); |
- } |
- |
- __ bind(&miss); |
- // Restore function name in r2. |
- __ Move(r2, 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 = r0; |
- Register index = r4; |
- Register scratch = r3; |
- Register result = r1; |
- if (argc > 0) { |
- __ ldr(index, MemOperand(sp, (argc - 1) * kPointerSize)); |
- } else { |
- __ LoadRoot(index, Heap::kUndefinedValueRootIndex); |
- } |
- |
- 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()); |
- __ Drop(argc + 1); |
- __ mov(r0, result); |
- __ Ret(); |
- |
- StubRuntimeCallHelper call_helper; |
- generator.GenerateSlow(masm(), call_helper); |
- |
- if (index_out_of_range.is_linked()) { |
- __ bind(&index_out_of_range); |
- __ LoadRoot(r0, Heap::kempty_stringRootIndex); |
- __ Drop(argc + 1); |
- __ Ret(); |
- } |
- |
- __ bind(&miss); |
- // Restore function name in r2. |
- __ Move(r2, name); |
- HandlerFrontendFooter(&name_miss); |
- |
- // Return the generated code. |
- return GetCode(type, name); |
-} |
- |
- |
Handle<Code> CallStubCompiler::CompileStringFromCharCodeCall( |
Handle<Object> object, |
Handle<JSObject> holder, |