Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 24fdef74f5ed9679a162c53b5f6dcbce0eae2e6a..ec45eaab4631cb87cfaea81757e7ce6ae5e8e617 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -2504,6 +2504,18 @@ void MacroAssembler::LoadHeapObject(Register result, |
} |
+void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) { |
+ ALLOW_HANDLE_DEREF(isolate(), "using raw address"); |
+ if (isolate()->heap()->InNewSpace(*object)) { |
+ Handle<JSGlobalPropertyCell> cell = |
+ isolate()->factory()->NewJSGlobalPropertyCell(object); |
+ cmp(reg, Operand::Cell(cell)); |
+ } else { |
+ cmp(reg, object); |
+ } |
+} |
+ |
+ |
void MacroAssembler::PushHeapObject(Handle<HeapObject> object) { |
ALLOW_HANDLE_DEREF(isolate(), "using raw address"); |
if (isolate()->heap()->InNewSpace(*object)) { |