Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 1231463002: Don't bother trying to reuse object pool entries for ICs, type test caches, or edge counters as the… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 CodeSize() + Instr::kPCReadOffset; 1556 CodeSize() + Instr::kPCReadOffset;
1557 LoadFromOffset(kWord, PP, PC, -object_pool_pc_dist); 1557 LoadFromOffset(kWord, PP, PC, -object_pool_pc_dist);
1558 } 1558 }
1559 1559
1560 1560
1561 void Assembler::LoadIsolate(Register rd) { 1561 void Assembler::LoadIsolate(Register rd) {
1562 ldr(rd, Address(THR, Thread::isolate_offset())); 1562 ldr(rd, Address(THR, Thread::isolate_offset()));
1563 } 1563 }
1564 1564
1565 1565
1566 void Assembler::LoadObject(Register rd, const Object& object, Condition cond) { 1566 void Assembler::LoadObjectHelper(Register rd,
1567 const Object& object,
1568 Condition cond,
1569 bool is_unique) {
1567 // Smis and VM heap objects are never relocated; do not use object pool. 1570 // Smis and VM heap objects are never relocated; do not use object pool.
1568 if (object.IsSmi()) { 1571 if (object.IsSmi()) {
1569 LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond); 1572 LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond);
1570 } else if (object.InVMHeap() || !allow_constant_pool()) { 1573 } else if (object.InVMHeap() || !allow_constant_pool()) {
1571 // Make sure that class CallPattern is able to decode this load immediate. 1574 // Make sure that class CallPattern is able to decode this load immediate.
1572 const int32_t object_raw = reinterpret_cast<int32_t>(object.raw()); 1575 const int32_t object_raw = reinterpret_cast<int32_t>(object.raw());
1573 LoadImmediate(rd, object_raw, cond); 1576 LoadImmediate(rd, object_raw, cond);
1574 } else { 1577 } else {
1575 // Make sure that class CallPattern is able to decode this load from the 1578 // Make sure that class CallPattern is able to decode this load from the
1576 // object pool. 1579 // object pool.
1577 const int32_t offset = 1580 const int32_t offset = ObjectPool::element_offset(
1578 ObjectPool::element_offset(object_pool_wrapper_.FindObject(object)); 1581 is_unique ? object_pool_wrapper_.AddObject(object)
1582 : object_pool_wrapper_.FindObject(object));
1579 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond); 1583 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond);
1580 } 1584 }
1581 } 1585 }
1582 1586
1583 1587
1588 void Assembler::LoadObject(Register rd, const Object& object, Condition cond) {
1589 LoadObjectHelper(rd, object, cond, false);
1590 }
1591
1592
1593 void Assembler::LoadUniqueObject(Register rd,
1594 const Object& object,
1595 Condition cond) {
1596 LoadObjectHelper(rd, object, cond, true);
1597 }
1598
1599
1584 void Assembler::LoadExternalLabel(Register rd, 1600 void Assembler::LoadExternalLabel(Register rd,
1585 const ExternalLabel* label, 1601 const ExternalLabel* label,
1586 Patchability patchable, 1602 Patchability patchable,
1587 Condition cond) { 1603 Condition cond) {
1588 const int32_t offset = ObjectPool::element_offset( 1604 const int32_t offset = ObjectPool::element_offset(
1589 object_pool_wrapper_.FindExternalLabel(label, patchable)); 1605 object_pool_wrapper_.FindExternalLabel(label, patchable));
1590 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond); 1606 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond);
1591 } 1607 }
1592 1608
1593 1609
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3587 3603
3588 3604
3589 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3605 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3590 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3606 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3591 return fpu_reg_names[reg]; 3607 return fpu_reg_names[reg];
3592 } 3608 }
3593 3609
3594 } // namespace dart 3610 } // namespace dart
3595 3611
3596 #endif // defined TARGET_ARCH_ARM 3612 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698