Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 2755eaecfec8e3457ba10000499b779d4e1fbf99..f21576291f9e1c442374f2d45ea5b02ee52e0ef0 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -20,6 +20,7 @@ |
#include "src/date.h" |
#include "src/debug.h" |
#include "src/deoptimizer.h" |
+#include "src/dependencies.h" |
#include "src/elements.h" |
#include "src/execution.h" |
#include "src/field-index-inl.h" |
@@ -12050,18 +12051,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) { |
@@ -12099,7 +12088,7 @@ DependentCode* DependentCode::ForObject(Handle<HeapObject> object, |
} |
-Handle<DependentCode> DependentCode::InsertCompilationInfo( |
+Handle<DependentCode> DependentCode::InsertCompilationDependencies( |
Handle<DependentCode> entries, DependencyGroup group, |
Handle<Foreign> info) { |
return Insert(entries, group, info); |
@@ -12205,8 +12194,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); |
@@ -12280,9 +12269,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. |
@@ -13364,41 +13354,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"; |
@@ -17052,16 +17007,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 |