OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 // Patch the (relocated) inlined map check. | 1317 // Patch the (relocated) inlined map check. |
1318 | 1318 |
1319 // The map_load_offset was stored in r5 | 1319 // The map_load_offset was stored in r5 |
1320 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal). | 1320 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal). |
1321 const Register map_load_offset = r5; | 1321 const Register map_load_offset = r5; |
1322 __ sub(r9, lr, map_load_offset); | 1322 __ sub(r9, lr, map_load_offset); |
1323 // Get the map location in r5 and patch it. | 1323 // Get the map location in r5 and patch it. |
1324 __ GetRelocatedValueLocation(r9, map_load_offset, scratch); | 1324 __ GetRelocatedValueLocation(r9, map_load_offset, scratch); |
1325 __ ldr(map_load_offset, MemOperand(map_load_offset)); | 1325 __ ldr(map_load_offset, MemOperand(map_load_offset)); |
1326 __ str(map, FieldMemOperand(map_load_offset, Cell::kValueOffset)); | 1326 __ str(map, FieldMemOperand(map_load_offset, Cell::kValueOffset)); |
| 1327 |
| 1328 __ mov(r8, map); |
| 1329 // |map_load_offset| points at the beginning of the cell. Calculate the |
| 1330 // field containing the map. |
| 1331 __ add(function, map_load_offset, Operand(Cell::kValueOffset - 1)); |
| 1332 __ RecordWriteField(map_load_offset, Cell::kValueOffset, r8, function, |
| 1333 kLRHasNotBeenSaved, kDontSaveFPRegs, |
| 1334 OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
1327 } | 1335 } |
1328 | 1336 |
1329 // Register mapping: r3 is object map and r4 is function prototype. | 1337 // Register mapping: r3 is object map and r4 is function prototype. |
1330 // Get prototype of object into r2. | 1338 // Get prototype of object into r2. |
1331 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); | 1339 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); |
1332 | 1340 |
1333 // We don't need map any more. Use it as a scratch register. | 1341 // We don't need map any more. Use it as a scratch register. |
1334 Register scratch2 = map; | 1342 Register scratch2 = map; |
1335 map = no_reg; | 1343 map = no_reg; |
1336 | 1344 |
(...skipping 3938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5275 kStackUnwindSpace, NULL, | 5283 kStackUnwindSpace, NULL, |
5276 MemOperand(fp, 6 * kPointerSize), NULL); | 5284 MemOperand(fp, 6 * kPointerSize), NULL); |
5277 } | 5285 } |
5278 | 5286 |
5279 | 5287 |
5280 #undef __ | 5288 #undef __ |
5281 | 5289 |
5282 } } // namespace v8::internal | 5290 } } // namespace v8::internal |
5283 | 5291 |
5284 #endif // V8_TARGET_ARCH_ARM | 5292 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |