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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index abfb9f542e9907bc531b00ad158517ccb34b7dda..139f1cda86d1c541a41e75b8ebcef950199e027b 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -1581,6 +1581,26 @@ void Assembler::LoadObject(Register rd, const Object& object, Condition cond) {
}
+void Assembler::LoadUniqueObject(Register rd,
+ const Object& object,
+ Condition cond) {
+ // Smis and VM heap objects are never relocated; do not use object pool.
+ if (object.IsSmi()) {
+ LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond);
+ } else if (object.InVMHeap() || !allow_constant_pool()) {
+ // Make sure that class CallPattern is able to decode this load immediate.
+ const int32_t object_raw = reinterpret_cast<int32_t>(object.raw());
+ LoadImmediate(rd, object_raw, cond);
+ } 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, cond);
+ }
+}
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.
+
+
void Assembler::LoadExternalLabel(Register rd,
const ExternalLabel* label,
Patchability patchable,
« 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