| 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 7457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7468 } | 7468 } |
| 7469 | 7469 |
| 7470 if (FLAG_optimize_constructed_arrays) { | 7470 if (FLAG_optimize_constructed_arrays) { |
| 7471 // Figure out the right elements kind | 7471 // Figure out the right elements kind |
| 7472 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); | 7472 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); |
| 7473 | 7473 |
| 7474 // Load the map's "bit field 2" into |result|. We only need the first byte, | 7474 // Load the map's "bit field 2" into |result|. We only need the first byte, |
| 7475 // but the following bit field extraction takes care of that anyway. | 7475 // but the following bit field extraction takes care of that anyway. |
| 7476 __ ldr(r3, FieldMemOperand(r3, Map::kBitField2Offset)); | 7476 __ ldr(r3, FieldMemOperand(r3, Map::kBitField2Offset)); |
| 7477 // Retrieve elements_kind from bit field 2. | 7477 // Retrieve elements_kind from bit field 2. |
| 7478 __ ubfx(r3, r3, Map::kElementsKindShift, Map::kElementsKindBitCount); | 7478 __ Ubfx(r3, r3, Map::kElementsKindShift, Map::kElementsKindBitCount); |
| 7479 | 7479 |
| 7480 if (FLAG_debug_code) { | 7480 if (FLAG_debug_code) { |
| 7481 Label done; | 7481 Label done; |
| 7482 __ cmp(r3, Operand(FAST_ELEMENTS)); | 7482 __ cmp(r3, Operand(FAST_ELEMENTS)); |
| 7483 __ b(eq, &done); | 7483 __ b(eq, &done); |
| 7484 __ cmp(r3, Operand(FAST_HOLEY_ELEMENTS)); | 7484 __ cmp(r3, Operand(FAST_HOLEY_ELEMENTS)); |
| 7485 __ Assert(eq, | 7485 __ Assert(eq, |
| 7486 "Invalid ElementsKind for InternalArray or InternalPackedArray"); | 7486 "Invalid ElementsKind for InternalArray or InternalPackedArray"); |
| 7487 __ bind(&done); | 7487 __ bind(&done); |
| 7488 } | 7488 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 7507 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7507 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7508 } | 7508 } |
| 7509 } | 7509 } |
| 7510 | 7510 |
| 7511 | 7511 |
| 7512 #undef __ | 7512 #undef __ |
| 7513 | 7513 |
| 7514 } } // namespace v8::internal | 7514 } } // namespace v8::internal |
| 7515 | 7515 |
| 7516 #endif // V8_TARGET_ARCH_ARM | 7516 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |