Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index e15e40e534f07c4cef6ab04ec75f6d1aef8a2be8..22e0929591f23d48d5630749abbcfd16fe606726 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5381,7 +5381,7 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) { |
if (type == kUseCell) { |
Handle<PropertyCell> cell = it.GetPropertyCell(); |
- PropertyCell::AddDependentCompilationInfo(cell, top_info()); |
+ top_info()->dependencies()->AssumePropertyCell(cell); |
if (it.property_details().cell_type() == PropertyCellType::kConstant) { |
Handle<Object> constant_object(cell->value(), isolate()); |
if (constant_object->IsConsString()) { |
@@ -5762,7 +5762,7 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) { |
4); |
// Register to deopt if the boilerplate ElementsKind changes. |
- AllocationSite::RegisterForDeoptOnTransitionChange(site, top_info()); |
+ top_info()->dependencies()->AssumeTransitionStable(site); |
} |
// The array is expected in the bailout environment during computation |
@@ -6077,8 +6077,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps( |
DCHECK(field_type_.IsHeapObject()); |
// Add dependency on the map that introduced the field. |
- Map::AddDependentCompilationInfo(GetFieldOwnerFromMap(map), |
- DependentCode::kFieldTypeGroup, top_info()); |
+ top_info()->dependencies()->AssumeFieldType(GetFieldOwnerFromMap(map)); |
return true; |
} |
@@ -6547,7 +6546,7 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment( |
GlobalPropertyAccess type = LookupGlobalProperty(var, &it, STORE); |
if (type == kUseCell) { |
Handle<PropertyCell> cell = it.GetPropertyCell(); |
- PropertyCell::AddDependentCompilationInfo(cell, top_info()); |
+ top_info()->dependencies()->AssumePropertyCell(cell); |
if (it.property_details().cell_type() == PropertyCellType::kConstant) { |
Handle<Object> constant(cell->value(), isolate()); |
if (value->IsConstant()) { |
@@ -9340,7 +9339,7 @@ void HOptimizedGraphBuilder::BuildInlinedCallArray( |
HValue* constructor = environment()->ExpressionStackAt(argument_count); |
// Register on the site for deoptimization if the transition feedback changes. |
- AllocationSite::RegisterForDeoptOnTransitionChange(site, top_info()); |
+ top_info()->dependencies()->AssumeTransitionStable(site); |
ElementsKind kind = site->GetElementsKind(); |
HInstruction* site_instruction = Add<HConstant>(site); |
@@ -9476,8 +9475,7 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) { |
Handle<AllocationSite> allocation_site = expr->allocation_site(); |
allocation_mode = HAllocationMode(allocation_site); |
// Take a dependency on allocation site. |
- AllocationSite::RegisterForDeoptOnTenureChange(allocation_site, |
- top_info()); |
+ top_info()->dependencies()->AssumeTenuringDecision(allocation_site); |
} |
} |
@@ -9521,8 +9519,7 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) { |
// Inlining worked, add a dependency on the initial map to make sure that |
// this code is deoptimized whenever the initial map of the constructor |
// changes. |
- Map::AddDependentCompilationInfo( |
- initial_map, DependentCode::kInitialMapChangedGroup, top_info()); |
+ top_info()->dependencies()->AssumeInitialMapCantChange(initial_map); |
return; |
} |
@@ -10496,7 +10493,7 @@ HValue* HGraphBuilder::BuildBinaryOperation( |
if (!allocation_mode.feedback_site().is_null()) { |
DCHECK(!graph()->info()->IsStub()); |
Handle<AllocationSite> site(allocation_mode.feedback_site()); |
- AllocationSite::RegisterForDeoptOnTenureChange(site, top_info()); |
+ top_info()->dependencies()->AssumeTenuringDecision(site); |
} |
// Inline the string addition into the stub when creating allocation |
@@ -11067,10 +11064,10 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral( |
Handle<AllocationSite> site(site_context->current()); |
if (FLAG_allocation_site_pretenuring) { |
pretenure_flag = site_context->current()->GetPretenureMode(); |
- AllocationSite::RegisterForDeoptOnTenureChange(site, top_info()); |
+ top_info()->dependencies()->AssumeTenuringDecision(site); |
} |
- AllocationSite::RegisterForDeoptOnTransitionChange(site, top_info()); |
+ top_info()->dependencies()->AssumeTransitionStable(site); |
HInstruction* object = Add<HAllocate>(object_size_constant, type, |
pretenure_flag, instance_type, site_context->current()); |