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

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

Issue 1544583002: For background compilation we copy ICData so that it is immutable during comnpilation. However, we … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: remove flag Created 5 years 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_ia32.cc ('k') | runtime/vm/assembler_x64.cc » ('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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 BranchLink(Code::Handle(stub_entry.code()), patchable); 525 BranchLink(Code::Handle(stub_entry.code()), patchable);
526 } 526 }
527 527
528 528
529 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) { 529 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
530 BranchLink(Code::Handle(stub_entry.code()), kPatchable); 530 BranchLink(Code::Handle(stub_entry.code()), kPatchable);
531 } 531 }
532 532
533 533
534 bool Assembler::CanLoadFromObjectPool(const Object& object) const { 534 bool Assembler::CanLoadFromObjectPool(const Object& object) const {
535 ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal());
535 ASSERT(!Thread::CanLoadFromThread(object)); 536 ASSERT(!Thread::CanLoadFromThread(object));
536 if (!constant_pool_allowed()) { 537 if (!constant_pool_allowed()) {
537 return false; 538 return false;
538 } 539 }
539 540
540 ASSERT(object.IsNotTemporaryScopedHandle()); 541 ASSERT(object.IsNotTemporaryScopedHandle());
541 ASSERT(object.IsOld()); 542 ASSERT(object.IsOld());
542 return true; 543 return true;
543 } 544 }
544 545
545 546
546 void Assembler::LoadObjectHelper(Register rd, 547 void Assembler::LoadObjectHelper(Register rd,
547 const Object& object, 548 const Object& object,
548 bool is_unique) { 549 bool is_unique) {
550 ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal());
549 ASSERT(!in_delay_slot_); 551 ASSERT(!in_delay_slot_);
550 if (Thread::CanLoadFromThread(object)) { 552 if (Thread::CanLoadFromThread(object)) {
551 // Load common VM constants from the thread. This works also in places where 553 // Load common VM constants from the thread. This works also in places where
552 // no constant pool is set up (e.g. intrinsic code). 554 // no constant pool is set up (e.g. intrinsic code).
553 lw(rd, Address(THR, Thread::OffsetFromThread(object))); 555 lw(rd, Address(THR, Thread::OffsetFromThread(object)));
554 } else if (object.IsSmi()) { 556 } else if (object.IsSmi()) {
555 // Relocation doesn't apply to Smis. 557 // Relocation doesn't apply to Smis.
556 LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw())); 558 LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()));
557 } else if (CanLoadFromObjectPool(object)) { 559 } else if (CanLoadFromObjectPool(object)) {
558 // Make sure that class CallPattern is able to decode this load from the 560 // Make sure that class CallPattern is able to decode this load from the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 void Assembler::LoadNativeEntry(Register rd, 598 void Assembler::LoadNativeEntry(Register rd,
597 const ExternalLabel* label, 599 const ExternalLabel* label,
598 Patchability patchable) { 600 Patchability patchable) {
599 const int32_t offset = ObjectPool::element_offset( 601 const int32_t offset = ObjectPool::element_offset(
600 object_pool_wrapper_.FindNativeEntry(label, patchable)); 602 object_pool_wrapper_.FindNativeEntry(label, patchable));
601 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag); 603 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag);
602 } 604 }
603 605
604 606
605 void Assembler::PushObject(const Object& object) { 607 void Assembler::PushObject(const Object& object) {
608 ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal());
606 ASSERT(!in_delay_slot_); 609 ASSERT(!in_delay_slot_);
607 LoadObject(TMP, object); 610 LoadObject(TMP, object);
608 Push(TMP); 611 Push(TMP);
609 } 612 }
610 613
611 614
612 // Preserves object and value registers. 615 // Preserves object and value registers.
613 void Assembler::StoreIntoObjectFilterNoSmi(Register object, 616 void Assembler::StoreIntoObjectFilterNoSmi(Register object,
614 Register value, 617 Register value,
615 Label* no_update) { 618 Label* no_update) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } else { 725 } else {
723 AddImmediate(TMP, object, offset - kHeapObjectTag); 726 AddImmediate(TMP, object, offset - kHeapObjectTag);
724 StoreIntoObjectNoBarrier(object, Address(TMP), value); 727 StoreIntoObjectNoBarrier(object, Address(TMP), value);
725 } 728 }
726 } 729 }
727 730
728 731
729 void Assembler::StoreIntoObjectNoBarrier(Register object, 732 void Assembler::StoreIntoObjectNoBarrier(Register object,
730 const Address& dest, 733 const Address& dest,
731 const Object& value) { 734 const Object& value) {
735 ASSERT(!value.IsICData() || ICData::Cast(value).IsOriginal());
732 ASSERT(!in_delay_slot_); 736 ASSERT(!in_delay_slot_);
733 ASSERT(value.IsSmi() || value.InVMHeap() || 737 ASSERT(value.IsSmi() || value.InVMHeap() ||
734 (value.IsOld() && value.IsNotTemporaryScopedHandle())); 738 (value.IsOld() && value.IsNotTemporaryScopedHandle()));
735 // No store buffer update. 739 // No store buffer update.
736 LoadObject(TMP, value); 740 LoadObject(TMP, value);
737 sw(TMP, dest); 741 sw(TMP, dest);
738 } 742 }
739 743
740 744
741 void Assembler::StoreIntoObjectNoBarrierOffset(Register object, 745 void Assembler::StoreIntoObjectNoBarrierOffset(Register object,
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 Label stop; 1336 Label stop;
1333 b(&stop); 1337 b(&stop);
1334 Emit(reinterpret_cast<int32_t>(message)); 1338 Emit(reinterpret_cast<int32_t>(message));
1335 Bind(&stop); 1339 Bind(&stop);
1336 break_(Instr::kStopMessageCode); 1340 break_(Instr::kStopMessageCode);
1337 } 1341 }
1338 1342
1339 } // namespace dart 1343 } // namespace dart
1340 1344
1341 #endif // defined TARGET_ARCH_MIPS 1345 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698