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/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 4148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4159 // string: Separator string. | 4159 // string: Separator string. |
4160 | 4160 |
4161 // Add (separator length times (array_length - 1)) to string_length. | 4161 // Add (separator length times (array_length - 1)) to string_length. |
4162 __ SmiToInteger32(scratch, | 4162 __ SmiToInteger32(scratch, |
4163 FieldOperand(string, SeqOneByteString::kLengthOffset)); | 4163 FieldOperand(string, SeqOneByteString::kLengthOffset)); |
4164 __ decl(index); | 4164 __ decl(index); |
4165 __ imull(scratch, index); | 4165 __ imull(scratch, index); |
4166 __ j(overflow, &bailout); | 4166 __ j(overflow, &bailout); |
4167 __ addl(string_length, scratch); | 4167 __ addl(string_length, scratch); |
4168 __ j(overflow, &bailout); | 4168 __ j(overflow, &bailout); |
| 4169 __ jmp(&bailout); |
| 4170 |
| 4171 // Bailout for large object allocations. |
| 4172 __ cmpl(string_length, Immediate(Page::kMaxRegularHeapObjectSize)); |
| 4173 __ j(greater, &bailout); |
4169 | 4174 |
4170 // Live registers and stack values: | 4175 // Live registers and stack values: |
4171 // string_length: Total length of result string. | 4176 // string_length: Total length of result string. |
4172 // elements: FixedArray of strings. | 4177 // elements: FixedArray of strings. |
4173 __ AllocateOneByteString(result_pos, string_length, scratch, index, string, | 4178 __ AllocateOneByteString(result_pos, string_length, scratch, index, string, |
4174 &bailout); | 4179 &bailout); |
4175 __ movp(result_operand, result_pos); | 4180 __ movp(result_operand, result_pos); |
4176 __ leap(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize)); | 4181 __ leap(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize)); |
4177 | 4182 |
4178 __ movp(string, separator_operand); | 4183 __ movp(string, separator_operand); |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5172 Assembler::target_address_at(call_target_address, | 5177 Assembler::target_address_at(call_target_address, |
5173 unoptimized_code)); | 5178 unoptimized_code)); |
5174 return OSR_AFTER_STACK_CHECK; | 5179 return OSR_AFTER_STACK_CHECK; |
5175 } | 5180 } |
5176 | 5181 |
5177 | 5182 |
5178 } // namespace internal | 5183 } // namespace internal |
5179 } // namespace v8 | 5184 } // namespace v8 |
5180 | 5185 |
5181 #endif // V8_TARGET_ARCH_X64 | 5186 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |