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 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3029 not_zero, | 3029 not_zero, |
3030 &no_remembered_set, | 3030 &no_remembered_set, |
3031 Label::kNear); | 3031 Label::kNear); |
3032 // Possible optimization: do a check that both values are Smis | 3032 // Possible optimization: do a check that both values are Smis |
3033 // (or them and test against Smi mask.) | 3033 // (or them and test against Smi mask.) |
3034 | 3034 |
3035 // We are swapping two objects in an array and the incremental marker never | 3035 // We are swapping two objects in an array and the incremental marker never |
3036 // pauses in the middle of scanning a single object. Therefore the | 3036 // pauses in the middle of scanning a single object. Therefore the |
3037 // incremental marker is not disturbed, so we don't need to call the | 3037 // incremental marker is not disturbed, so we don't need to call the |
3038 // RecordWrite stub that notifies the incremental marker. | 3038 // RecordWrite stub that notifies the incremental marker. |
3039 __ RememberedSetHelper( | 3039 __ RememberedSetHelper(elements, |
3040 index_1, temp, kDontSaveFPRegs, MacroAssembler::kFallThroughAtEnd); | 3040 index_1, |
3041 __ RememberedSetHelper( | 3041 temp, |
3042 index_2, temp, kDontSaveFPRegs, MacroAssembler::kFallThroughAtEnd); | 3042 kDontSaveFPRegs, |
| 3043 MacroAssembler::kFallThroughAtEnd); |
| 3044 __ RememberedSetHelper(elements, |
| 3045 index_2, |
| 3046 temp, |
| 3047 kDontSaveFPRegs, |
| 3048 MacroAssembler::kFallThroughAtEnd); |
3043 | 3049 |
3044 __ bind(&no_remembered_set); | 3050 __ bind(&no_remembered_set); |
3045 | 3051 |
3046 // We are done. Drop elements from the stack, and return undefined. | 3052 // We are done. Drop elements from the stack, and return undefined. |
3047 __ addq(rsp, Immediate(3 * kPointerSize)); | 3053 __ addq(rsp, Immediate(3 * kPointerSize)); |
3048 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); | 3054 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
3049 __ jmp(&done); | 3055 __ jmp(&done); |
3050 | 3056 |
3051 __ bind(&slow_case); | 3057 __ bind(&slow_case); |
3052 __ CallRuntime(Runtime::kSwapElements, 3); | 3058 __ CallRuntime(Runtime::kSwapElements, 3); |
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4172 *context_length = 0; | 4178 *context_length = 0; |
4173 return previous_; | 4179 return previous_; |
4174 } | 4180 } |
4175 | 4181 |
4176 | 4182 |
4177 #undef __ | 4183 #undef __ |
4178 | 4184 |
4179 } } // namespace v8::internal | 4185 } } // namespace v8::internal |
4180 | 4186 |
4181 #endif // V8_TARGET_ARCH_X64 | 4187 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |