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

Unified Diff: runtime/vm/assembler_arm.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 | « no previous file | runtime/vm/assembler_arm64.cc » ('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 fc1dc5d66f7a82003f244c5d8abcf245dd70203c..8b5ddccc975c1b7c287a60aefdb3440899cd9aa4 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -20,6 +20,7 @@
namespace dart {
+DECLARE_FLAG(bool, allow_absolute_addresses);
DEFINE_FLAG(bool, print_stop_message, true, "Print stop message.");
DECLARE_FLAG(bool, inline_alloc);
@@ -1583,6 +1584,7 @@ void Assembler::LoadObjectHelper(Register rd,
if (object.IsSmi()) {
LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond);
} else if (object.InVMHeap() || !constant_pool_allowed()) {
+ ASSERT(FLAG_allow_absolute_addresses);
// 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);
@@ -1777,7 +1779,7 @@ void Assembler::VerifiedWrite(const Address& address,
LoadImmediate(temp, Heap::kZap32Bits);
cmp(old_value, Operand(temp));
b(&ok, EQ);
- LoadImmediate(temp, reinterpret_cast<uint32_t>(Object::null()));
+ LoadObject(temp, Object::null_object());
cmp(old_value, Operand(temp));
b(&ok, EQ);
Stop("Expected zapped, Smi or null");
@@ -3387,6 +3389,7 @@ void Assembler::LoadAllocationStatsAddress(Register dest,
ASSERT(cid > 0);
const intptr_t class_offset = ClassTable::ClassOffsetFor(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 | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698