Index: src/ic/x64/handler-compiler-x64.cc |
diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc |
index 5ae49f075f41c32edb63b033beb381f9446b25ae..40a3d89591dcbb8449fa2b6615549e9ba71a51a6 100644 |
--- a/src/ic/x64/handler-compiler-x64.cc |
+++ b/src/ic/x64/handler-compiler-x64.cc |
@@ -211,9 +211,10 @@ void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
Register scratch, Label* miss) { |
Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); |
DCHECK(cell->value()->IsTheHole()); |
- __ Move(scratch, cell); |
- __ Cmp(FieldOperand(scratch, Cell::kValueOffset), |
- masm->isolate()->factory()->the_hole_value()); |
+ Factory* factory = masm->isolate()->factory(); |
+ Handle<WeakCell> weak_cell = factory->NewWeakCell(cell); |
+ __ LoadWeakValue(scratch, weak_cell, miss); |
+ __ Cmp(FieldOperand(scratch, Cell::kValueOffset), factory->the_hole_value()); |
__ j(not_equal, miss); |
} |