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

Unified Diff: runtime/vm/assembler_arm64.cc

Issue 1332923005: Remove remaining uses of null's absolute address from non-IA32. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm64.cc
diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
index 16220b4a0d3ca7f7156384bc936067deda162268..a360a2d8d854f762fc04637cddbf8865b9c36ce1 100644
--- a/runtime/vm/assembler_arm64.cc
+++ b/runtime/vm/assembler_arm64.cc
@@ -20,6 +20,7 @@
namespace dart {
+DECLARE_FLAG(bool, allow_absolute_addresses);
DEFINE_FLAG(bool, use_far_branches, false, "Always use far branches");
DEFINE_FLAG(bool, print_stop_message, false, "Print stop message.");
DECLARE_FLAG(bool, inline_alloc);
@@ -430,6 +431,7 @@ void Assembler::LoadObjectHelper(Register dst,
LoadWordFromPoolOffset(dst, offset);
} else {
ASSERT(object.IsSmi() || object.InVMHeap());
+ ASSERT(object.IsSmi() || FLAG_allow_absolute_addresses);
LoadDecodableImmediate(dst, reinterpret_cast<int64_t>(object.raw()));
}
}
@@ -465,6 +467,7 @@ void Assembler::CompareObject(Register reg, const Object& object) {
LoadObject(TMP, object);
CompareRegisters(reg, TMP);
} else {
+ ASSERT(object.IsSmi() || FLAG_allow_absolute_addresses);
CompareImmediate(reg, reinterpret_cast<int64_t>(object.raw()));
}
}
@@ -1253,6 +1256,7 @@ void Assembler::UpdateAllocationStats(intptr_t cid,
intptr_t counter_offset =
ClassTable::CounterOffsetFor(cid, space == Heap::kNew);
if (inline_isolate) {
+ ASSERT(FLAG_allow_absolute_addresses);
ClassTable* class_table = Isolate::Current()->class_table();
ClassHeapStats** table_ptr = class_table->TableAddressFor(cid);
if (cid < kNumPredefinedCids) {
@@ -1322,6 +1326,7 @@ void Assembler::MaybeTraceAllocation(intptr_t cid,
ASSERT(cid > 0);
intptr_t state_offset = ClassTable::StateOffsetFor(cid);
if (inline_isolate) {
+ ASSERT(FLAG_allow_absolute_addresses);
ClassTable* class_table = Isolate::Current()->class_table();
ClassHeapStats** table_ptr = class_table->TableAddressFor(cid);
if (cid < kNumPredefinedCids) {
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698