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 3426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3437 | 3437 |
3438 // Separator operand is on the stack. | 3438 // Separator operand is on the stack. |
3439 __ pop(separator); | 3439 __ pop(separator); |
3440 | 3440 |
3441 // Check that the array is a JSArray. | 3441 // Check that the array is a JSArray. |
3442 __ JumpIfSmi(array, &bailout); | 3442 __ JumpIfSmi(array, &bailout); |
3443 __ GetObjectType(array, scratch1, scratch2); | 3443 __ GetObjectType(array, scratch1, scratch2); |
3444 __ Branch(&bailout, ne, scratch2, Operand(JS_ARRAY_TYPE)); | 3444 __ Branch(&bailout, ne, scratch2, Operand(JS_ARRAY_TYPE)); |
3445 | 3445 |
3446 // Check that the array has fast elements. | 3446 // Check that the array has fast elements. |
3447 __ lbu(scratch2, FieldMemOperand(scratch1, Map::kBitField2Offset)); | 3447 __ CheckFastElements(scratch1, scratch2, &bailout); |
3448 __ And(scratch3, scratch2, Operand(1 << Map::kHasFastElements)); | |
3449 __ Branch(&bailout, eq, scratch3, Operand(zero_reg)); | |
3450 | 3448 |
3451 // If the array has length zero, return the empty string. | 3449 // If the array has length zero, return the empty string. |
3452 __ lw(array_length, FieldMemOperand(array, JSArray::kLengthOffset)); | 3450 __ lw(array_length, FieldMemOperand(array, JSArray::kLengthOffset)); |
3453 __ SmiUntag(array_length); | 3451 __ SmiUntag(array_length); |
3454 __ Branch(&non_trivial_array, ne, array_length, Operand(zero_reg)); | 3452 __ Branch(&non_trivial_array, ne, array_length, Operand(zero_reg)); |
3455 __ LoadRoot(v0, Heap::kEmptyStringRootIndex); | 3453 __ LoadRoot(v0, Heap::kEmptyStringRootIndex); |
3456 __ Branch(&done); | 3454 __ Branch(&done); |
3457 | 3455 |
3458 __ bind(&non_trivial_array); | 3456 __ bind(&non_trivial_array); |
3459 | 3457 |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4380 __ Addu(at, a1, Operand(masm_->CodeObject())); | 4378 __ Addu(at, a1, Operand(masm_->CodeObject())); |
4381 __ Jump(at); | 4379 __ Jump(at); |
4382 } | 4380 } |
4383 | 4381 |
4384 | 4382 |
4385 #undef __ | 4383 #undef __ |
4386 | 4384 |
4387 } } // namespace v8::internal | 4385 } } // namespace v8::internal |
4388 | 4386 |
4389 #endif // V8_TARGET_ARCH_MIPS | 4387 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |