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

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..28d2c56e48094e249777c1b2e5052a44b8f90e48 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -1563,7 +1563,10 @@ void Assembler::LoadIsolate(Register rd) {
}
-void Assembler::LoadObject(Register rd, const Object& object, Condition cond) {
+void Assembler::LoadObjectHelper(Register rd,
+ const Object& object,
+ Condition cond,
+ bool is_unique) {
// 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);
@@ -1574,13 +1577,26 @@ void Assembler::LoadObject(Register rd, const Object& object, Condition 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_.FindObject(object));
+ const int32_t offset = ObjectPool::element_offset(
+ is_unique ? object_pool_wrapper_.AddObject(object)
+ : object_pool_wrapper_.FindObject(object));
LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond);
}
}
+void Assembler::LoadObject(Register rd, const Object& object, Condition cond) {
+ LoadObjectHelper(rd, object, cond, false);
+}
+
+
+void Assembler::LoadUniqueObject(Register rd,
+ const Object& object,
+ Condition cond) {
+ LoadObjectHelper(rd, object, cond, true);
+}
+
+
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