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

Unified Diff: runtime/vm/assembler_mips.cc

Issue 1713853003: VM: Share object pool entries for optimized static calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.cc
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index 957b5495b8e0e23b339dfe92a1dd3b343da76a7a..0bf5ece7c229c2a8b557ac8736b8d68f4d98ad9d 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -536,6 +536,19 @@ void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
}
+void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
+ const Object& equivalence) {
+ const Code& target = Code::Handle(stub_entry.code());
+ ASSERT(!in_delay_slot_);
+ const int32_t offset = ObjectPool::element_offset(
+ object_pool_wrapper_.FindObject(target, equivalence));
+ LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
+ lw(T9, FieldAddress(CODE_REG, Code::entry_point_offset()));
+ jalr(T9);
+ delay_slot_available_ = false; // CodePatcher expects a nop.
+}
+
+
bool Assembler::CanLoadFromObjectPool(const Object& object) const {
ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal());
ASSERT(!Thread::CanLoadFromThread(object));
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698