| 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/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
| (...skipping 4026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4037 // to string_length. | 4037 // to string_length. |
| 4038 __ mov(scratch, separator_operand); | 4038 __ mov(scratch, separator_operand); |
| 4039 __ mov(scratch, FieldOperand(scratch, SeqOneByteString::kLengthOffset)); | 4039 __ mov(scratch, FieldOperand(scratch, SeqOneByteString::kLengthOffset)); |
| 4040 __ sub(string_length, scratch); // May be negative, temporarily. | 4040 __ sub(string_length, scratch); // May be negative, temporarily. |
| 4041 __ imul(scratch, array_length_operand); | 4041 __ imul(scratch, array_length_operand); |
| 4042 __ j(overflow, &bailout); | 4042 __ j(overflow, &bailout); |
| 4043 __ add(string_length, scratch); | 4043 __ add(string_length, scratch); |
| 4044 __ j(overflow, &bailout); | 4044 __ j(overflow, &bailout); |
| 4045 | 4045 |
| 4046 __ shr(string_length, 1); | 4046 __ shr(string_length, 1); |
| 4047 |
| 4048 // Bailout for large object allocations. |
| 4049 __ cmp(string_length, Page::kMaxRegularHeapObjectSize); |
| 4050 __ j(greater, &bailout); |
| 4051 |
| 4047 // Live registers and stack values: | 4052 // Live registers and stack values: |
| 4048 // string_length | 4053 // string_length |
| 4049 // elements | 4054 // elements |
| 4050 __ AllocateOneByteString(result_pos, string_length, scratch, index, string, | 4055 __ AllocateOneByteString(result_pos, string_length, scratch, index, string, |
| 4051 &bailout); | 4056 &bailout); |
| 4052 __ mov(result_operand, result_pos); | 4057 __ mov(result_operand, result_pos); |
| 4053 __ lea(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize)); | 4058 __ lea(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize)); |
| 4054 | 4059 |
| 4055 | 4060 |
| 4056 __ mov(string, separator_operand); | 4061 __ mov(string, separator_operand); |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5041 Assembler::target_address_at(call_target_address, | 5046 Assembler::target_address_at(call_target_address, |
| 5042 unoptimized_code)); | 5047 unoptimized_code)); |
| 5043 return OSR_AFTER_STACK_CHECK; | 5048 return OSR_AFTER_STACK_CHECK; |
| 5044 } | 5049 } |
| 5045 | 5050 |
| 5046 | 5051 |
| 5047 } // namespace internal | 5052 } // namespace internal |
| 5048 } // namespace v8 | 5053 } // namespace v8 |
| 5049 | 5054 |
| 5050 #endif // V8_TARGET_ARCH_X87 | 5055 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |