| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2811 | 2811 |
| 2812 Register object = ebx; | 2812 Register object = ebx; |
| 2813 Register index = eax; | 2813 Register index = eax; |
| 2814 Register result = edx; | 2814 Register result = edx; |
| 2815 | 2815 |
| 2816 PopOperand(object); | 2816 PopOperand(object); |
| 2817 | 2817 |
| 2818 Label need_conversion; | 2818 Label need_conversion; |
| 2819 Label index_out_of_range; | 2819 Label index_out_of_range; |
| 2820 Label done; | 2820 Label done; |
| 2821 StringCharCodeAtGenerator generator(object, | 2821 StringCharCodeAtGenerator generator(object, index, result, &need_conversion, |
| 2822 index, | 2822 &need_conversion, &index_out_of_range); |
| 2823 result, | |
| 2824 &need_conversion, | |
| 2825 &need_conversion, | |
| 2826 &index_out_of_range, | |
| 2827 STRING_INDEX_IS_NUMBER); | |
| 2828 generator.GenerateFast(masm_); | 2823 generator.GenerateFast(masm_); |
| 2829 __ jmp(&done); | 2824 __ jmp(&done); |
| 2830 | 2825 |
| 2831 __ bind(&index_out_of_range); | 2826 __ bind(&index_out_of_range); |
| 2832 // When the index is out of range, the spec requires us to return | 2827 // When the index is out of range, the spec requires us to return |
| 2833 // NaN. | 2828 // NaN. |
| 2834 __ Move(result, Immediate(isolate()->factory()->nan_value())); | 2829 __ Move(result, Immediate(isolate()->factory()->nan_value())); |
| 2835 __ jmp(&done); | 2830 __ jmp(&done); |
| 2836 | 2831 |
| 2837 __ bind(&need_conversion); | 2832 __ bind(&need_conversion); |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3714 isolate->builtins()->OnStackReplacement()->entry(), | 3709 isolate->builtins()->OnStackReplacement()->entry(), |
| 3715 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3710 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3716 return ON_STACK_REPLACEMENT; | 3711 return ON_STACK_REPLACEMENT; |
| 3717 } | 3712 } |
| 3718 | 3713 |
| 3719 | 3714 |
| 3720 } // namespace internal | 3715 } // namespace internal |
| 3721 } // namespace v8 | 3716 } // namespace v8 |
| 3722 | 3717 |
| 3723 #endif // V8_TARGET_ARCH_X87 | 3718 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |