Index: runtime/vm/assembler_ia32.cc |
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc |
index 6a7af21729e638e7aedf9f3532f7644fba8078b6..8f6164fcfef9614c1d1274517dbbf0993e02246e 100644 |
--- a/runtime/vm/assembler_ia32.cc |
+++ b/runtime/vm/assembler_ia32.cc |
@@ -1945,6 +1945,17 @@ void Assembler::LoadObject(Register dst, const Object& object) { |
} |
+void Assembler::LoadObjectSafely(Register dst, const Object& object) { |
+ if (Assembler::IsSafe(object)) { |
+ LoadObject(dst, object); |
+ } else { |
+ movl(dst, |
+ Immediate(reinterpret_cast<int32_t>(object.raw()) ^ jit_cookie_)); |
+ xorl(dst, Immediate(jit_cookie_)); |
+ } |
+} |
+ |
+ |
void Assembler::PushObject(const Object& object) { |
if (object.IsSmi() || object.InVMHeap()) { |
pushl(Immediate(reinterpret_cast<int32_t>(object.raw()))); |