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

Side by Side Diff: runtime/vm/assembler_arm64.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_arm64.h ('k') | runtime/vm/assembler_mips.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 object_pool_wrapper_.FindExternalLabel(label, patchable)); 450 object_pool_wrapper_.FindExternalLabel(label, patchable));
451 LoadWordFromPoolOffsetFixed(dst, pp, offset); 451 LoadWordFromPoolOffsetFixed(dst, pp, offset);
452 } 452 }
453 453
454 454
455 void Assembler::LoadIsolate(Register dst, Register pp) { 455 void Assembler::LoadIsolate(Register dst, Register pp) {
456 ldr(dst, Address(THR, Thread::isolate_offset())); 456 ldr(dst, Address(THR, Thread::isolate_offset()));
457 } 457 }
458 458
459 459
460 void Assembler::LoadObject(Register dst, const Object& object, Register pp) { 460 void Assembler::LoadObjectHelper(Register dst,
461 const Object& object,
462 Register pp,
463 bool is_unique) {
461 if (CanLoadObjectFromPool(object)) { 464 if (CanLoadObjectFromPool(object)) {
462 const int32_t offset = 465 const int32_t offset = ObjectPool::element_offset(
463 ObjectPool::element_offset(object_pool_wrapper_.FindObject(object)); 466 is_unique ? object_pool_wrapper_.AddObject(object)
467 : object_pool_wrapper_.FindObject(object));
464 LoadWordFromPoolOffset(dst, pp, offset); 468 LoadWordFromPoolOffset(dst, pp, offset);
465 } else { 469 } else {
466 ASSERT((Isolate::Current() == Dart::vm_isolate()) || 470 ASSERT((Isolate::Current() == Dart::vm_isolate()) ||
467 object.IsSmi() || 471 object.IsSmi() ||
468 object.InVMHeap()); 472 object.InVMHeap());
469 LoadDecodableImmediate(dst, reinterpret_cast<int64_t>(object.raw()), pp); 473 LoadDecodableImmediate(dst, reinterpret_cast<int64_t>(object.raw()), pp);
470 } 474 }
471 } 475 }
472 476
473 477
478 void Assembler::LoadObject(Register dst, const Object& object, Register pp) {
479 LoadObjectHelper(dst, object, pp, false);
480 }
481
482
483 void Assembler::LoadUniqueObject(Register dst,
484 const Object& object,
485 Register pp) {
486 LoadObjectHelper(dst, object, pp, true);
487 }
488
489
474 void Assembler::CompareObject(Register reg, const Object& object, Register pp) { 490 void Assembler::CompareObject(Register reg, const Object& object, Register pp) {
475 if (CanLoadObjectFromPool(object)) { 491 if (CanLoadObjectFromPool(object)) {
476 LoadObject(TMP, object, pp); 492 LoadObject(TMP, object, pp);
477 CompareRegisters(reg, TMP); 493 CompareRegisters(reg, TMP);
478 } else { 494 } else {
479 CompareImmediate(reg, reinterpret_cast<int64_t>(object.raw()), pp); 495 CompareImmediate(reg, reinterpret_cast<int64_t>(object.raw()), pp);
480 } 496 }
481 } 497 }
482 498
483 499
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 add(base, array, Operand(index, LSL, shift)); 1473 add(base, array, Operand(index, LSL, shift));
1458 } 1474 }
1459 const OperandSize size = Address::OperandSizeFor(cid); 1475 const OperandSize size = Address::OperandSizeFor(cid);
1460 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); 1476 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size));
1461 return Address(base, offset, Address::Offset, size); 1477 return Address(base, offset, Address::Offset, size);
1462 } 1478 }
1463 1479
1464 } // namespace dart 1480 } // namespace dart
1465 1481
1466 #endif // defined TARGET_ARCH_ARM64 1482 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698