| 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 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3179 __ lea(index_2, CodeGenerator::FixedArrayElementOperand(elements, index_2)); | 3179 __ lea(index_2, CodeGenerator::FixedArrayElementOperand(elements, index_2)); |
| 3180 | 3180 |
| 3181 // Swap elements. Use object and temp as scratch registers. | 3181 // Swap elements. Use object and temp as scratch registers. |
| 3182 __ mov(object, Operand(index_1, 0)); | 3182 __ mov(object, Operand(index_1, 0)); |
| 3183 __ mov(temp, Operand(index_2, 0)); | 3183 __ mov(temp, Operand(index_2, 0)); |
| 3184 __ mov(Operand(index_2, 0), object); | 3184 __ mov(Operand(index_2, 0), object); |
| 3185 __ mov(Operand(index_1, 0), temp); | 3185 __ mov(Operand(index_1, 0), temp); |
| 3186 | 3186 |
| 3187 NearLabel no_remembered_set; | 3187 NearLabel no_remembered_set; |
| 3188 __ InNewSpace(elements, temp, equal, &no_remembered_set); | 3188 __ InNewSpace(elements, temp, equal, &no_remembered_set); |
| 3189 __ HasScanOnScavenge(elements, temp, &no_remembered_set); | 3189 __ CheckPageFlag(elements, |
| 3190 temp, |
| 3191 MemoryChunk::SCAN_ON_SCAVENGE, |
| 3192 not_zero, |
| 3193 &no_remembered_set); |
| 3190 | 3194 |
| 3191 __ mov(object, elements); | 3195 __ mov(object, elements); |
| 3192 // Since we are swapping two objects, the incremental marker is not disturbed, | 3196 // Since we are swapping two objects, the incremental marker is not disturbed, |
| 3193 // so we don't call the stub that handles this. TODO(gc): Optimize by | 3197 // so we don't call the stub that handles this. TODO(gc): Optimize by |
| 3194 // checking the scan_on_scavenge flag, probably by calling the stub. | 3198 // checking the scan_on_scavenge flag, probably by calling the stub. |
| 3195 __ RememberedSetHelper(index_1, temp, kDontSaveFPRegs); | 3199 __ RememberedSetHelper(index_1, temp, kDontSaveFPRegs); |
| 3196 __ RememberedSetHelper(index_2, temp, kDontSaveFPRegs); | 3200 __ RememberedSetHelper(index_2, temp, kDontSaveFPRegs); |
| 3197 | 3201 |
| 3198 __ bind(&no_remembered_set); | 3202 __ bind(&no_remembered_set); |
| 3199 | 3203 |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4331 // And return. | 4335 // And return. |
| 4332 __ ret(0); | 4336 __ ret(0); |
| 4333 } | 4337 } |
| 4334 | 4338 |
| 4335 | 4339 |
| 4336 #undef __ | 4340 #undef __ |
| 4337 | 4341 |
| 4338 } } // namespace v8::internal | 4342 } } // namespace v8::internal |
| 4339 | 4343 |
| 4340 #endif // V8_TARGET_ARCH_IA32 | 4344 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |