Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: src/hydrogen.cc

Issue 1095433002: Refactor compilation dependency handling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.h ('k') | src/lithium.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 393e02c9f97ba6381ad0697aa220dfe2df319d63..8ee79e7862ec5522975c5622a365030027d4e27a 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5351,7 +5351,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()) {
@@ -5732,7 +5732,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
@@ -6047,8 +6047,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;
}
@@ -6517,7 +6516,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()) {
@@ -9311,7 +9310,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);
@@ -9447,8 +9446,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);
}
}
@@ -9492,8 +9490,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;
}
@@ -10467,7 +10464,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
@@ -11038,10 +11035,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());
« no previous file with comments | « src/hydrogen.h ('k') | src/lithium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698