Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 7a4322139d68405f408cccd558836f0ec3d5c0dc..fba3c66dac1a447bd32c31b508b791a3be125ee4 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5348,9 +5348,9 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) { |
if (type == kUseCell) { |
Handle<PropertyCell> cell = it.GetPropertyCell(); |
- if (cell->type()->IsConstant()) { |
- PropertyCell::AddDependentCompilationInfo(cell, top_info()); |
- Handle<Object> constant_object = cell->type()->AsConstant()->Value(); |
+ PropertyCell::AddDependentCompilationInfo(cell, top_info()); |
+ if (it.property_details().cell_type() == PropertyCellType::kConstant) { |
+ Handle<Object> constant_object(cell->value(), isolate()); |
if (constant_object->IsConsString()) { |
constant_object = |
String::Flatten(Handle<String>::cast(constant_object)); |
@@ -6514,8 +6514,9 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment( |
GlobalPropertyAccess type = LookupGlobalProperty(var, &it, STORE); |
if (type == kUseCell) { |
Handle<PropertyCell> cell = it.GetPropertyCell(); |
- if (cell->type()->IsConstant()) { |
- Handle<Object> constant = cell->type()->AsConstant()->Value(); |
+ PropertyCell::AddDependentCompilationInfo(cell, top_info()); |
+ if (it.property_details().cell_type() == PropertyCellType::kConstant) { |
+ Handle<Object> constant(cell->value(), isolate()); |
if (value->IsConstant()) { |
HConstant* c_value = HConstant::cast(value); |
if (!constant.is_identical_to(c_value->handle(isolate()))) { |