Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index c6d5266bf7803544edb32cbf246f62bdaae38428..96175488c8d066dfb3cbdcb4a55db7d0dbddcdf6 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -15,6 +15,7 @@ |
#include "src/bootstrapper.h" |
#include "src/code-stubs.h" |
#include "src/codegen.h" |
+#include "src/compilation-dependencies.h" |
#include "src/compiler.h" |
#include "src/cpu-profiler.h" |
#include "src/date.h" |
@@ -12137,18 +12138,6 @@ MaybeHandle<Object> JSArray::SetElementsLength( |
// static |
-void Map::AddDependentCompilationInfo(Handle<Map> map, |
- DependentCode::DependencyGroup group, |
- CompilationInfo* info) { |
- Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
- handle(map->dependent_code(), info->isolate()), group, |
- info->object_wrapper()); |
- if (*codes != map->dependent_code()) map->set_dependent_code(*codes); |
- info->dependencies(group)->Add(map, info->zone()); |
-} |
- |
- |
-// static |
void Map::AddDependentCode(Handle<Map> map, |
DependentCode::DependencyGroup group, |
Handle<Code> code) { |
@@ -12173,20 +12162,7 @@ void DependentCode::GroupStartIndexes::Recompute(DependentCode* entries) { |
} |
-DependentCode* DependentCode::ForObject(Handle<HeapObject> object, |
- DependencyGroup group) { |
- AllowDeferredHandleDereference dependencies_are_safe; |
- if (group == DependentCode::kPropertyCellChangedGroup) { |
- return Handle<PropertyCell>::cast(object)->dependent_code(); |
- } else if (group == DependentCode::kAllocationSiteTenuringChangedGroup || |
- group == DependentCode::kAllocationSiteTransitionChangedGroup) { |
- return Handle<AllocationSite>::cast(object)->dependent_code(); |
- } |
- return Handle<Map>::cast(object)->dependent_code(); |
-} |
- |
- |
-Handle<DependentCode> DependentCode::InsertCompilationInfo( |
+Handle<DependentCode> DependentCode::InsertCompilationDependencies( |
Handle<DependentCode> entries, DependencyGroup group, |
Handle<Foreign> info) { |
return Insert(entries, group, info); |
@@ -12292,8 +12268,8 @@ void DependentCode::UpdateToFinishedCode(DependencyGroup group, Foreign* info, |
} |
-void DependentCode::RemoveCompilationInfo(DependentCode::DependencyGroup group, |
- Foreign* info) { |
+void DependentCode::RemoveCompilationDependencies( |
+ DependentCode::DependencyGroup group, Foreign* info) { |
DisallowHeapAllocation no_allocation; |
GroupStartIndexes starts(this); |
int start = starts.at(group); |
@@ -12367,9 +12343,10 @@ bool DependentCode::MarkCodeForDeoptimization( |
} |
} else { |
DCHECK(obj->IsForeign()); |
- CompilationInfo* info = reinterpret_cast<CompilationInfo*>( |
- Foreign::cast(obj)->foreign_address()); |
- info->AbortDueToDependencyChange(); |
+ CompilationDependencies* info = |
+ reinterpret_cast<CompilationDependencies*>( |
+ Foreign::cast(obj)->foreign_address()); |
+ info->Abort(); |
} |
} |
// Compact the array by moving all subsequent groups to fill in the new holes. |
@@ -13449,41 +13426,6 @@ void AllocationSite::DigestTransitionFeedback(Handle<AllocationSite> site, |
} |
-// static |
-void AllocationSite::RegisterForDeoptOnTenureChange(Handle<AllocationSite> site, |
- CompilationInfo* info) { |
- AddDependentCompilationInfo( |
- site, DependentCode::kAllocationSiteTenuringChangedGroup, info); |
-} |
- |
- |
-// static |
-void AllocationSite::RegisterForDeoptOnTransitionChange( |
- Handle<AllocationSite> site, CompilationInfo* info) { |
- // Do nothing if the object doesn't have any useful element transitions left. |
- ElementsKind kind = |
- site->SitePointsToLiteral() |
- ? JSObject::cast(site->transition_info())->GetElementsKind() |
- : site->GetElementsKind(); |
- if (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) { |
- AddDependentCompilationInfo( |
- site, DependentCode::kAllocationSiteTransitionChangedGroup, info); |
- } |
-} |
- |
- |
-// static |
-void AllocationSite::AddDependentCompilationInfo( |
- Handle<AllocationSite> site, DependentCode::DependencyGroup group, |
- CompilationInfo* info) { |
- Handle<DependentCode> dep(site->dependent_code()); |
- Handle<DependentCode> codes = |
- DependentCode::InsertCompilationInfo(dep, group, info->object_wrapper()); |
- if (*codes != site->dependent_code()) site->set_dependent_code(*codes); |
- info->dependencies(group)->Add(Handle<HeapObject>(*site), info->zone()); |
-} |
- |
- |
const char* AllocationSite::PretenureDecisionName(PretenureDecision decision) { |
switch (decision) { |
case kUndecided: return "undecided"; |
@@ -17137,16 +17079,4 @@ Handle<Object> PropertyCell::UpdateCell(Handle<NameDictionary> dictionary, |
return value; |
} |
- |
-// static |
-void PropertyCell::AddDependentCompilationInfo(Handle<PropertyCell> cell, |
- CompilationInfo* info) { |
- Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
- handle(cell->dependent_code(), info->isolate()), |
- DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
- if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
- info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
- cell, info->zone()); |
-} |
- |
} } // namespace v8::internal |