OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3099 | 3099 |
3100 // Just jump to runtime to create the sub string. | 3100 // Just jump to runtime to create the sub string. |
3101 __ bind(&runtime); | 3101 __ bind(&runtime); |
3102 __ TailCallRuntime(Runtime::kSubString, 3, 1); | 3102 __ TailCallRuntime(Runtime::kSubString, 3, 1); |
3103 | 3103 |
3104 __ bind(&single_char); | 3104 __ bind(&single_char); |
3105 // rax: string | 3105 // rax: string |
3106 // rbx: instance type | 3106 // rbx: instance type |
3107 // rcx: sub string length (smi) | 3107 // rcx: sub string length (smi) |
3108 // rdx: from index (smi) | 3108 // rdx: from index (smi) |
3109 StringCharAtGenerator generator( | 3109 StringCharAtGenerator generator(rax, rdx, rcx, rax, &runtime, &runtime, |
3110 rax, rdx, rcx, rax, &runtime, &runtime, &runtime, STRING_INDEX_IS_NUMBER); | 3110 &runtime, STRING_INDEX_IS_NUMBER, |
| 3111 RECEIVER_IS_STRING); |
3111 generator.GenerateFast(masm); | 3112 generator.GenerateFast(masm); |
3112 __ ret(SUB_STRING_ARGUMENT_COUNT * kPointerSize); | 3113 __ ret(SUB_STRING_ARGUMENT_COUNT * kPointerSize); |
3113 generator.SkipSlow(masm, &runtime); | 3114 generator.SkipSlow(masm, &runtime); |
3114 } | 3115 } |
3115 | 3116 |
3116 | 3117 |
3117 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, | 3118 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, |
3118 Register left, | 3119 Register left, |
3119 Register right, | 3120 Register right, |
3120 Register scratch1, | 3121 Register scratch1, |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4699 return_value_operand, | 4700 return_value_operand, |
4700 NULL); | 4701 NULL); |
4701 } | 4702 } |
4702 | 4703 |
4703 | 4704 |
4704 #undef __ | 4705 #undef __ |
4705 | 4706 |
4706 } } // namespace v8::internal | 4707 } } // namespace v8::internal |
4707 | 4708 |
4708 #endif // V8_TARGET_ARCH_X64 | 4709 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |