OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3426 | 3426 |
3427 // Separator operand is on the stack. | 3427 // Separator operand is on the stack. |
3428 __ pop(separator); | 3428 __ pop(separator); |
3429 | 3429 |
3430 // Check that the array is a JSArray. | 3430 // Check that the array is a JSArray. |
3431 __ JumpIfSmi(array, &bailout); | 3431 __ JumpIfSmi(array, &bailout); |
3432 __ CompareObjectType(array, scratch1, scratch2, JS_ARRAY_TYPE); | 3432 __ CompareObjectType(array, scratch1, scratch2, JS_ARRAY_TYPE); |
3433 __ b(ne, &bailout); | 3433 __ b(ne, &bailout); |
3434 | 3434 |
3435 // Check that the array has fast elements. | 3435 // Check that the array has fast elements. |
3436 __ ldrb(scratch2, FieldMemOperand(scratch1, Map::kBitField2Offset)); | 3436 __ CheckFastElements(scratch1, scratch2, &bailout); |
3437 __ tst(scratch2, Operand(1 << Map::kHasFastElements)); | |
3438 __ b(eq, &bailout); | |
3439 | 3437 |
3440 // If the array has length zero, return the empty string. | 3438 // If the array has length zero, return the empty string. |
3441 __ ldr(array_length, FieldMemOperand(array, JSArray::kLengthOffset)); | 3439 __ ldr(array_length, FieldMemOperand(array, JSArray::kLengthOffset)); |
3442 __ SmiUntag(array_length, SetCC); | 3440 __ SmiUntag(array_length, SetCC); |
3443 __ b(ne, &non_trivial_array); | 3441 __ b(ne, &non_trivial_array); |
3444 __ LoadRoot(r0, Heap::kEmptyStringRootIndex); | 3442 __ LoadRoot(r0, Heap::kEmptyStringRootIndex); |
3445 __ b(&done); | 3443 __ b(&done); |
3446 | 3444 |
3447 __ bind(&non_trivial_array); | 3445 __ bind(&non_trivial_array); |
3448 | 3446 |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4366 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4364 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
4367 __ add(pc, r1, Operand(masm_->CodeObject())); | 4365 __ add(pc, r1, Operand(masm_->CodeObject())); |
4368 } | 4366 } |
4369 | 4367 |
4370 | 4368 |
4371 #undef __ | 4369 #undef __ |
4372 | 4370 |
4373 } } // namespace v8::internal | 4371 } } // namespace v8::internal |
4374 | 4372 |
4375 #endif // V8_TARGET_ARCH_ARM | 4373 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |