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

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 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 } else { 1574 } else {
1575 // Make sure that class CallPattern is able to decode this load from the 1575 // Make sure that class CallPattern is able to decode this load from the
1576 // object pool. 1576 // object pool.
1577 const int32_t offset = 1577 const int32_t offset =
1578 ObjectPool::element_offset(object_pool_wrapper_.FindObject(object)); 1578 ObjectPool::element_offset(object_pool_wrapper_.FindObject(object));
1579 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond); 1579 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond);
1580 } 1580 }
1581 } 1581 }
1582 1582
1583 1583
1584 void Assembler::LoadUniqueObject(Register rd,
1585 const Object& object,
1586 Condition cond) {
1587 // Smis and VM heap objects are never relocated; do not use object pool.
1588 if (object.IsSmi()) {
1589 LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond);
1590 } else if (object.InVMHeap() || !allow_constant_pool()) {
1591 // Make sure that class CallPattern is able to decode this load immediate.
1592 const int32_t object_raw = reinterpret_cast<int32_t>(object.raw());
1593 LoadImmediate(rd, object_raw, cond);
1594 } else {
1595 // Make sure that class CallPattern is able to decode this load from the
1596 // object pool.
1597 const int32_t offset =
1598 ObjectPool::element_offset(object_pool_wrapper_.AddObject(object));
1599 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond);
1600 }
1601 }
srdjan 2015/07/07 21:57:23 You could create a third function (private): LoadO
rmacnak 2015/07/07 23:10:59 I prefer a helper. Did that.
1602
1603
1584 void Assembler::LoadExternalLabel(Register rd, 1604 void Assembler::LoadExternalLabel(Register rd,
1585 const ExternalLabel* label, 1605 const ExternalLabel* label,
1586 Patchability patchable, 1606 Patchability patchable,
1587 Condition cond) { 1607 Condition cond) {
1588 const int32_t offset = ObjectPool::element_offset( 1608 const int32_t offset = ObjectPool::element_offset(
1589 object_pool_wrapper_.FindExternalLabel(label, patchable)); 1609 object_pool_wrapper_.FindExternalLabel(label, patchable));
1590 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond); 1610 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond);
1591 } 1611 }
1592 1612
1593 1613
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3587 3607
3588 3608
3589 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3609 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3590 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3610 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3591 return fpu_reg_names[reg]; 3611 return fpu_reg_names[reg];
3592 } 3612 }
3593 3613
3594 } // namespace dart 3614 } // namespace dart
3595 3615
3596 #endif // defined TARGET_ARCH_ARM 3616 #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