OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2808 | 2808 |
2809 Register object = rbx; | 2809 Register object = rbx; |
2810 Register index = rax; | 2810 Register index = rax; |
2811 Register result = rdx; | 2811 Register result = rdx; |
2812 | 2812 |
2813 PopOperand(object); | 2813 PopOperand(object); |
2814 | 2814 |
2815 Label need_conversion; | 2815 Label need_conversion; |
2816 Label index_out_of_range; | 2816 Label index_out_of_range; |
2817 Label done; | 2817 Label done; |
2818 StringCharCodeAtGenerator generator(object, | 2818 StringCharCodeAtGenerator generator(object, index, result, &need_conversion, |
2819 index, | 2819 &need_conversion, &index_out_of_range); |
2820 result, | |
2821 &need_conversion, | |
2822 &need_conversion, | |
2823 &index_out_of_range, | |
2824 STRING_INDEX_IS_NUMBER); | |
2825 generator.GenerateFast(masm_); | 2820 generator.GenerateFast(masm_); |
2826 __ jmp(&done); | 2821 __ jmp(&done); |
2827 | 2822 |
2828 __ bind(&index_out_of_range); | 2823 __ bind(&index_out_of_range); |
2829 // When the index is out of range, the spec requires us to return | 2824 // When the index is out of range, the spec requires us to return |
2830 // NaN. | 2825 // NaN. |
2831 __ LoadRoot(result, Heap::kNanValueRootIndex); | 2826 __ LoadRoot(result, Heap::kNanValueRootIndex); |
2832 __ jmp(&done); | 2827 __ jmp(&done); |
2833 | 2828 |
2834 __ bind(&need_conversion); | 2829 __ bind(&need_conversion); |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3708 DCHECK_EQ( | 3703 DCHECK_EQ( |
3709 isolate->builtins()->OnStackReplacement()->entry(), | 3704 isolate->builtins()->OnStackReplacement()->entry(), |
3710 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3705 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3711 return ON_STACK_REPLACEMENT; | 3706 return ON_STACK_REPLACEMENT; |
3712 } | 3707 } |
3713 | 3708 |
3714 } // namespace internal | 3709 } // namespace internal |
3715 } // namespace v8 | 3710 } // namespace v8 |
3716 | 3711 |
3717 #endif // V8_TARGET_ARCH_X64 | 3712 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |