| 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 // Scratch points at the cell payload. Calculate the start of the object. | |
| 1330 __ sub(map_load_offset, map_load_offset, Operand(Cell::kValueOffset - 1)); | |
| 1331 __ RecordWriteField(map_load_offset, Cell::kValueOffset, r8, function, | |
| 1332 kLRHasNotBeenSaved, kDontSaveFPRegs, | |
| 1333 OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | |
| 1334 } | 1327 } |
| 1335 | 1328 |
| 1336 // Register mapping: r3 is object map and r4 is function prototype. | 1329 // Register mapping: r3 is object map and r4 is function prototype. |
| 1337 // Get prototype of object into r2. | 1330 // Get prototype of object into r2. |
| 1338 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); | 1331 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); |
| 1339 | 1332 |
| 1340 // We don't need map any more. Use it as a scratch register. | 1333 // We don't need map any more. Use it as a scratch register. |
| 1341 Register scratch2 = map; | 1334 Register scratch2 = map; |
| 1342 map = no_reg; | 1335 map = no_reg; |
| 1343 | 1336 |
| (...skipping 3938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5282 kStackUnwindSpace, NULL, | 5275 kStackUnwindSpace, NULL, |
| 5283 MemOperand(fp, 6 * kPointerSize), NULL); | 5276 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5284 } | 5277 } |
| 5285 | 5278 |
| 5286 | 5279 |
| 5287 #undef __ | 5280 #undef __ |
| 5288 | 5281 |
| 5289 } } // namespace v8::internal | 5282 } } // namespace v8::internal |
| 5290 | 5283 |
| 5291 #endif // V8_TARGET_ARCH_ARM | 5284 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |