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

Unified Diff: runtime/vm/assembler_mips.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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_mips.cc
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index 2c195334618d33e7b0ef3cf5de1fa9f1008258ca..254e96069a350ad13ffaebfd0fe347bc6d982a14 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -478,6 +478,28 @@ void Assembler::LoadObject(Register rd, const Object& object) {
}
+void Assembler::LoadUniqueObject(Register rd, const Object& object) {
+ ASSERT(!in_delay_slot_);
+ // Smis and VM heap objects are never relocated; do not use object pool.
+ if (object.IsSmi()) {
+ LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()));
+ } else if (object.InVMHeap() || !allow_constant_pool()) {
+ // Make sure that class CallPattern is able to decode this load immediate.
+ int32_t object_raw = reinterpret_cast<int32_t>(object.raw());
+ const uint16_t object_low = Utils::Low16Bits(object_raw);
+ const uint16_t object_high = Utils::High16Bits(object_raw);
+ lui(rd, Immediate(object_high));
+ ori(rd, rd, Immediate(object_low));
+ } else {
+ // Make sure that class CallPattern is able to decode this load from the
+ // object pool.
+ const int32_t offset =
+ ObjectPool::element_offset(object_pool_wrapper_.AddObject(object));
+ LoadWordFromPoolOffset(rd, offset - kHeapObjectTag);
+ }
+}
+
+
void Assembler::LoadExternalLabel(Register rd,
const ExternalLabel* label,
Patchability patchable) {

Powered by Google App Engine
This is Rietveld 408576698