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 3181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3192 | 3192 |
3193 // Swap elements. Use object and temp as scratch registers. | 3193 // Swap elements. Use object and temp as scratch registers. |
3194 __ mov(object, Operand(index_1, 0)); | 3194 __ mov(object, Operand(index_1, 0)); |
3195 __ mov(temp, Operand(index_2, 0)); | 3195 __ mov(temp, Operand(index_2, 0)); |
3196 __ mov(Operand(index_2, 0), object); | 3196 __ mov(Operand(index_2, 0), object); |
3197 __ mov(Operand(index_1, 0), temp); | 3197 __ mov(Operand(index_1, 0), temp); |
3198 | 3198 |
3199 Label no_remembered_set; | 3199 Label no_remembered_set; |
3200 __ CheckPageFlag(elements, | 3200 __ CheckPageFlag(elements, |
3201 temp, | 3201 temp, |
3202 MemoryChunk::SCAN_ON_SCAVENGE, | 3202 1 << MemoryChunk::SCAN_ON_SCAVENGE, |
3203 not_zero, | 3203 not_zero, |
3204 &no_remembered_set, | 3204 &no_remembered_set, |
3205 Label::kNear); | 3205 Label::kNear); |
3206 // Possible optimization: do a check that both values are Smis | 3206 // Possible optimization: do a check that both values are Smis |
3207 // (or them and test against Smi mask.) | 3207 // (or them and test against Smi mask.) |
3208 | 3208 |
3209 // We are swapping two objects in an array and the incremental marker never | 3209 // We are swapping two objects in an array and the incremental marker never |
3210 // pauses in the middle of scanning a single object. Therefore the | 3210 // pauses in the middle of scanning a single object. Therefore the |
3211 // incremental marker is not disturbed, so we don't need to call the | 3211 // incremental marker is not disturbed, so we don't need to call the |
3212 // RecordWrite stub that notifies the incremental marker. | 3212 // RecordWrite stub that notifies the incremental marker. |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4352 // And return. | 4352 // And return. |
4353 __ ret(0); | 4353 __ ret(0); |
4354 } | 4354 } |
4355 | 4355 |
4356 | 4356 |
4357 #undef __ | 4357 #undef __ |
4358 | 4358 |
4359 } } // namespace v8::internal | 4359 } } // namespace v8::internal |
4360 | 4360 |
4361 #endif // V8_TARGET_ARCH_IA32 | 4361 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |