OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 FixedArray::kHeaderSize + 2 * kPointerSize - kHeapObjectTag; | 385 FixedArray::kHeaderSize + 2 * kPointerSize - kHeapObjectTag; |
386 | 386 |
387 __ Add(scratch1, map, offset); | 387 __ Add(scratch1, map, offset); |
388 __ SmiUntag(scratch2, key); | 388 __ SmiUntag(scratch2, key); |
389 __ Ldr(scratch1, MemOperand(scratch1, scratch2, LSL, kPointerSizeLog2)); | 389 __ Ldr(scratch1, MemOperand(scratch1, scratch2, LSL, kPointerSizeLog2)); |
390 __ JumpIfRoot(scratch1, Heap::kTheHoleValueRootIndex, unmapped_case); | 390 __ JumpIfRoot(scratch1, Heap::kTheHoleValueRootIndex, unmapped_case); |
391 | 391 |
392 // Load value from context and return it. | 392 // Load value from context and return it. |
393 __ Ldr(scratch2, FieldMemOperand(map, FixedArray::kHeaderSize)); | 393 __ Ldr(scratch2, FieldMemOperand(map, FixedArray::kHeaderSize)); |
394 __ SmiUntag(scratch1); | 394 __ SmiUntag(scratch1); |
395 __ Add(scratch2, scratch2, Context::kHeaderSize - kHeapObjectTag); | 395 __ Lsl(scratch1, scratch1, kPointerSizeLog2); |
396 return MemOperand(scratch2, scratch1, LSL, kPointerSizeLog2); | 396 __ Add(scratch1, scratch1, Context::kHeaderSize - kHeapObjectTag); |
| 397 // The base of the result (scratch2) is passed to RecordWrite in |
| 398 // KeyedStoreIC::GenerateSloppyArguments and it must be a HeapObject. |
| 399 return MemOperand(scratch2, scratch1); |
397 } | 400 } |
398 | 401 |
399 | 402 |
400 // The 'parameter_map' register must be loaded with the parameter map of the | 403 // The 'parameter_map' register must be loaded with the parameter map of the |
401 // arguments object and is overwritten. | 404 // arguments object and is overwritten. |
402 static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm, | 405 static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm, |
403 Register key, | 406 Register key, |
404 Register parameter_map, | 407 Register parameter_map, |
405 Register scratch, | 408 Register scratch, |
406 Label* slow_case) { | 409 Label* slow_case) { |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); | 1398 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); |
1396 // This is JumpIfSmi(smi_reg, branch_imm). | 1399 // This is JumpIfSmi(smi_reg, branch_imm). |
1397 patcher.tbz(smi_reg, 0, branch_imm); | 1400 patcher.tbz(smi_reg, 0, branch_imm); |
1398 } | 1401 } |
1399 } | 1402 } |
1400 | 1403 |
1401 | 1404 |
1402 } } // namespace v8::internal | 1405 } } // namespace v8::internal |
1403 | 1406 |
1404 #endif // V8_TARGET_ARCH_A64 | 1407 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |