Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 156029cffb95b56a74edc110c24d049dfa4e3e1a..69d17facf8930a059d2edbd9e66c168d0e044a48 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 = handle(cell->value(), isolate()); |
Toon Verwaest
2015/03/17 11:04:23
Handle<Object> constant_object(cell->value(), isol
|
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 = handle(cell->value(), isolate()); |
if (value->IsConstant()) { |
HConstant* c_value = HConstant::cast(value); |
if (!constant.is_identical_to(c_value->handle(isolate()))) { |