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 3555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3566 __ bind(&loop); | 3566 __ bind(&loop); |
3567 __ mov(string, FieldOperand(elements, | 3567 __ mov(string, FieldOperand(elements, |
3568 index, | 3568 index, |
3569 times_pointer_size, | 3569 times_pointer_size, |
3570 FixedArray::kHeaderSize)); | 3570 FixedArray::kHeaderSize)); |
3571 __ JumpIfSmi(string, &bailout); | 3571 __ JumpIfSmi(string, &bailout); |
3572 __ mov(scratch, FieldOperand(string, HeapObject::kMapOffset)); | 3572 __ mov(scratch, FieldOperand(string, HeapObject::kMapOffset)); |
3573 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); | 3573 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); |
3574 __ and_(scratch, Immediate( | 3574 __ and_(scratch, Immediate( |
3575 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask)); | 3575 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask)); |
3576 __ cmp(scratch, kStringTag | kAsciiStringTag | kSeqStringTag); | 3576 __ cmp(scratch, kStringTag | kOneByteStringTag | kSeqStringTag); |
3577 __ j(not_equal, &bailout); | 3577 __ j(not_equal, &bailout); |
3578 __ add(string_length, | 3578 __ add(string_length, |
3579 FieldOperand(string, SeqAsciiString::kLengthOffset)); | 3579 FieldOperand(string, SeqAsciiString::kLengthOffset)); |
3580 __ j(overflow, &bailout); | 3580 __ j(overflow, &bailout); |
3581 __ add(index, Immediate(1)); | 3581 __ add(index, Immediate(1)); |
3582 __ cmp(index, array_length); | 3582 __ cmp(index, array_length); |
3583 __ j(less, &loop); | 3583 __ j(less, &loop); |
3584 | 3584 |
3585 // If array_length is 1, return elements[0], a string. | 3585 // If array_length is 1, return elements[0], a string. |
3586 __ cmp(array_length, 1); | 3586 __ cmp(array_length, 1); |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4515 *stack_depth = 0; | 4515 *stack_depth = 0; |
4516 *context_length = 0; | 4516 *context_length = 0; |
4517 return previous_; | 4517 return previous_; |
4518 } | 4518 } |
4519 | 4519 |
4520 #undef __ | 4520 #undef __ |
4521 | 4521 |
4522 } } // namespace v8::internal | 4522 } } // namespace v8::internal |
4523 | 4523 |
4524 #endif // V8_TARGET_ARCH_IA32 | 4524 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |