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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4153 // to string_length. | 4153 // to string_length. |
4154 __ mov(scratch, separator_operand); | 4154 __ mov(scratch, separator_operand); |
4155 __ mov(scratch, FieldOperand(scratch, SeqOneByteString::kLengthOffset)); | 4155 __ mov(scratch, FieldOperand(scratch, SeqOneByteString::kLengthOffset)); |
4156 __ sub(string_length, scratch); // May be negative, temporarily. | 4156 __ sub(string_length, scratch); // May be negative, temporarily. |
4157 __ imul(scratch, array_length_operand); | 4157 __ imul(scratch, array_length_operand); |
4158 __ j(overflow, &bailout); | 4158 __ j(overflow, &bailout); |
4159 __ add(string_length, scratch); | 4159 __ add(string_length, scratch); |
4160 __ j(overflow, &bailout); | 4160 __ j(overflow, &bailout); |
4161 | 4161 |
4162 __ shr(string_length, 1); | 4162 __ shr(string_length, 1); |
| 4163 |
| 4164 // Bailout for large object allocations. |
| 4165 __ cmp(string_length, Page::kMaxRegularHeapObjectSize); |
| 4166 __ j(greater, &bailout); |
| 4167 |
4163 // Live registers and stack values: | 4168 // Live registers and stack values: |
4164 // string_length | 4169 // string_length |
4165 // elements | 4170 // elements |
4166 __ AllocateOneByteString(result_pos, string_length, scratch, index, string, | 4171 __ AllocateOneByteString(result_pos, string_length, scratch, index, string, |
4167 &bailout); | 4172 &bailout); |
4168 __ mov(result_operand, result_pos); | 4173 __ mov(result_operand, result_pos); |
4169 __ lea(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize)); | 4174 __ lea(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize)); |
4170 | 4175 |
4171 | 4176 |
4172 __ mov(string, separator_operand); | 4177 __ mov(string, separator_operand); |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5157 Assembler::target_address_at(call_target_address, | 5162 Assembler::target_address_at(call_target_address, |
5158 unoptimized_code)); | 5163 unoptimized_code)); |
5159 return OSR_AFTER_STACK_CHECK; | 5164 return OSR_AFTER_STACK_CHECK; |
5160 } | 5165 } |
5161 | 5166 |
5162 | 5167 |
5163 } // namespace internal | 5168 } // namespace internal |
5164 } // namespace v8 | 5169 } // namespace v8 |
5165 | 5170 |
5166 #endif // V8_TARGET_ARCH_IA32 | 5171 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |