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 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); |
3177 __ RecordWriteHelper(scratch1, index2, scratch2); // scratch1 holds elements. | 3177 __ RecordWriteHelper(scratch1, index2, scratch2); // scratch1 holds elements. |
3178 __ bind(&done); | |
3179 | 3178 |
3180 __ bind(&new_space); | 3179 __ bind(&new_space); |
3181 // We are done. Drop elements from the stack, and return undefined. | 3180 // We are done. Drop elements from the stack, and return undefined. |
3182 __ Drop(3); | 3181 __ Drop(3); |
3183 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 3182 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
3184 __ jmp(&done); | 3183 __ jmp(&done); |
3185 | 3184 |
3186 __ bind(&slow_case); | 3185 __ bind(&slow_case); |
3187 __ CallRuntime(Runtime::kSwapElements, 3); | 3186 __ CallRuntime(Runtime::kSwapElements, 3); |
3188 | 3187 |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4297 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4296 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
4298 __ add(pc, r1, Operand(masm_->CodeObject())); | 4297 __ add(pc, r1, Operand(masm_->CodeObject())); |
4299 } | 4298 } |
4300 | 4299 |
4301 | 4300 |
4302 #undef __ | 4301 #undef __ |
4303 | 4302 |
4304 } } // namespace v8::internal | 4303 } } // namespace v8::internal |
4305 | 4304 |
4306 #endif // V8_TARGET_ARCH_ARM | 4305 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |