OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3602 // Live registers: | 3602 // Live registers: |
3603 // string_length: Sum of string lengths, as a smi. | 3603 // string_length: Sum of string lengths, as a smi. |
3604 // elements: FixedArray of strings. | 3604 // elements: FixedArray of strings. |
3605 | 3605 |
3606 // Check that the separator is a flat ASCII string. | 3606 // Check that the separator is a flat ASCII string. |
3607 __ mov(string, separator_operand); | 3607 __ mov(string, separator_operand); |
3608 __ JumpIfSmi(string, &bailout); | 3608 __ JumpIfSmi(string, &bailout); |
3609 __ mov(scratch, FieldOperand(string, HeapObject::kMapOffset)); | 3609 __ mov(scratch, FieldOperand(string, HeapObject::kMapOffset)); |
3610 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); | 3610 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); |
3611 __ and_(scratch, Immediate( | 3611 __ and_(scratch, Immediate( |
3612 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask)); | 3612 kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask | |
| 3613 kStringRepresentationMask)); |
3613 __ cmp(scratch, ASCII_STRING_TYPE); | 3614 __ cmp(scratch, ASCII_STRING_TYPE); |
3614 __ j(not_equal, &bailout); | 3615 __ j(not_equal, &bailout); |
3615 | 3616 |
3616 // Add (separator length times array_length) - separator length | 3617 // Add (separator length times array_length) - separator length |
3617 // to string_length. | 3618 // to string_length. |
3618 __ mov(scratch, separator_operand); | 3619 __ mov(scratch, separator_operand); |
3619 __ mov(scratch, FieldOperand(scratch, SeqAsciiString::kLengthOffset)); | 3620 __ mov(scratch, FieldOperand(scratch, SeqAsciiString::kLengthOffset)); |
3620 __ sub(string_length, scratch); // May be negative, temporarily. | 3621 __ sub(string_length, scratch); // May be negative, temporarily. |
3621 __ imul(scratch, array_length_operand); | 3622 __ imul(scratch, array_length_operand); |
3622 __ j(overflow, &bailout); | 3623 __ j(overflow, &bailout); |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4519 *stack_depth = 0; | 4520 *stack_depth = 0; |
4520 *context_length = 0; | 4521 *context_length = 0; |
4521 return previous_; | 4522 return previous_; |
4522 } | 4523 } |
4523 | 4524 |
4524 #undef __ | 4525 #undef __ |
4525 | 4526 |
4526 } } // namespace v8::internal | 4527 } } // namespace v8::internal |
4527 | 4528 |
4528 #endif // V8_TARGET_ARCH_IA32 | 4529 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |