| 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 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3156 __ add(scratch1, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 3156 __ add(scratch1, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 3157 __ add(index1, | 3157 __ add(index1, |
| 3158 scratch1, | 3158 scratch1, |
| 3159 Operand(index1, LSL, kPointerSizeLog2 - kSmiTagSize)); | 3159 Operand(index1, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 3160 __ add(index2, | 3160 __ add(index2, |
| 3161 scratch1, | 3161 scratch1, |
| 3162 Operand(index2, LSL, kPointerSizeLog2 - kSmiTagSize)); | 3162 Operand(index2, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 3163 | 3163 |
| 3164 // Swap elements. | 3164 // Swap elements. |
| 3165 __ ldr(scratch1, MemOperand(index1, 0)); | 3165 __ ldr(scratch1, MemOperand(index1, 0)); |
| 3166 __ ldr(scratch2, MemOperand(index2, 0))); | 3166 __ ldr(scratch2, MemOperand(index2, 0)); |
| 3167 __ str(scratch1, MemOperand(index2, 0)); | 3167 __ str(scratch1, MemOperand(index2, 0)); |
| 3168 __ str(scratch2, MemOperand(index1, 0)); | 3168 __ str(scratch2, MemOperand(index1, 0)); |
| 3169 | 3169 |
| 3170 Label new_space; | 3170 Label new_space; |
| 3171 __ InNewSpace(elements, scratch1, eq, &new_space); | 3171 __ InNewSpace(elements, scratch1, eq, &new_space); |
| 3172 // Possible optimization: do a check that both values are Smis | 3172 // Possible optimization: do a check that both values are Smis |
| 3173 // (or them and test against Smi mask.) | 3173 // (or them and test against Smi mask.) |
| 3174 | 3174 |
| 3175 __ mov(scratch1, elements); | 3175 __ mov(scratch1, elements); |
| 3176 __ RecordWriteHelper(elements, index1, scratch2); | 3176 __ RecordWriteHelper(elements, index1, scratch2); |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4297 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4297 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 4298 __ add(pc, r1, Operand(masm_->CodeObject())); | 4298 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 4299 } | 4299 } |
| 4300 | 4300 |
| 4301 | 4301 |
| 4302 #undef __ | 4302 #undef __ |
| 4303 | 4303 |
| 4304 } } // namespace v8::internal | 4304 } } // namespace v8::internal |
| 4305 | 4305 |
| 4306 #endif // V8_TARGET_ARCH_ARM | 4306 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |