Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 2232ecf4999103a36d2a0541af6060c8da123682..48e073dd2ddd5f22fad3c5930b938f150cdc6dbb 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -1905,135 +1905,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 = rbx; |
- Register index = rdi; |
- Register result = rax; |
- const int argc = arguments().immediate(); |
- StackArgumentsAccessor args(rsp, argc); |
- |
- __ movq(receiver, args.GetReceiverOperand()); |
- if (argc > 0) { |
- __ movq(index, args.GetArgumentOperand(1)); |
- } 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()); |
- __ ret((argc + 1) * kPointerSize); |
- |
- StubRuntimeCallHelper call_helper; |
- generator.GenerateSlow(masm(), call_helper); |
- |
- if (index_out_of_range.is_linked()) { |
- __ bind(&index_out_of_range); |
- __ LoadRoot(rax, Heap::kNanValueRootIndex); |
- __ ret((argc + 1) * kPointerSize); |
- } |
- |
- __ bind(&miss); |
- // Restore function name in rcx. |
- __ Move(rcx, 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(); |
- StackArgumentsAccessor args(rsp, argc); |
- |
- 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 = rax; |
- Register index = rdi; |
- Register scratch = rdx; |
- Register result = rax; |
- __ movq(receiver, args.GetReceiverOperand()); |
- if (argc > 0) { |
- __ movq(index, args.GetArgumentOperand(1)); |
- } 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()); |
- __ ret((argc + 1) * kPointerSize); |
- |
- StubRuntimeCallHelper call_helper; |
- generator.GenerateSlow(masm(), call_helper); |
- |
- if (index_out_of_range.is_linked()) { |
- __ bind(&index_out_of_range); |
- __ LoadRoot(rax, Heap::kempty_stringRootIndex); |
- __ ret((argc + 1) * kPointerSize); |
- } |
- __ bind(&miss); |
- // Restore function name in rcx. |
- __ Move(rcx, name); |
- HandlerFrontendFooter(&name_miss); |
- |
- // Return the generated code. |
- return GetCode(type, name); |
-} |
- |
- |
Handle<Code> CallStubCompiler::CompileStringFromCharCodeCall( |
Handle<Object> object, |
Handle<JSObject> holder, |