19 return Cast<Map>(
object)->dependent_code();
20 }
else if (IsPropertyCell(
object)) {
22 }
else if (IsAllocationSite(
object)) {
24 }
else if (IsContextSidePropertyCell(
object)) {
26 }
else if (IsScopeInfo(
object)) {
35 Cast<Map>(
object)->set_dependent_code(*dep);
36 }
else if (IsPropertyCell(*
object)) {
38 }
else if (IsAllocationSite(*
object)) {
40 }
else if (IsContextSidePropertyCell(*
object)) {
42 }
else if (IsScopeInfo(*
object)) {
57 if (groups != 0) StdoutStream{} <<
",";
67 StdoutStream{} <<
"Installing dependency of [" << code <<
"] on [" <<
object
69 PrintDependencyGroups(groups);
100template <
typename Function>
106 if (len == 0)
return;
138 bool marked_something =
false;
140 if ((groups & deopt_groups) == 0)
return false;
142 if (!code->marked_for_deoptimization()) {
147 code->SetMarkedForDeoptimization(
150 marked_something =
true;
156 return marked_something;
178 if (marked_something) {
179 DCHECK(AllowCodeDependencyChange::IsAllowed());
195 return "prototype-check";
197 return "property-cell-changed";
199 return "field-const";
203 return "field-representation";
205 return "initial-map-changed";
207 return "allocation-site-tenuring-changed";
209 return "allocation-site-transition-changed";
211 return "script-context-slot-property-changed";
213 return "empty-context-extension";
222 return LazyDeoptimizeReason::kMapDeprecated;
224 return LazyDeoptimizeReason::kPrototypeChange;
226 return LazyDeoptimizeReason::kPropertyCellChange;
228 return LazyDeoptimizeReason::kFieldTypeConstChange;
230 return LazyDeoptimizeReason::kFieldTypeChange;
232 return LazyDeoptimizeReason::kFieldRepresentationChange;
234 return LazyDeoptimizeReason::kInitialMapChange;
236 return LazyDeoptimizeReason::kAllocationSiteTenuringChange;
238 return LazyDeoptimizeReason::kAllocationSiteTransitionChange;
240 return LazyDeoptimizeReason::kScriptContextSlotPropertyChange;
242 return LazyDeoptimizeReason::kEmptyContextExtensionChange;
static void DeoptimizeMarkedCode(Isolate *isolate)
static LazyDeoptimizeReason DependencyGroupToLazyDeoptReason(DependencyGroup group)
static constexpr int kCodeSlotOffset
static void SetDependentCode(DirectHandle< HeapObject > object, DirectHandle< DependentCode > dep)
int FillEntryFromBack(int index, int length)
static V8_EXPORT_PRIVATE Tagged< DependentCode > empty_dependent_code(const ReadOnlyRoots &roots)
static DirectHandle< DependentCode > InsertWeakCode(Isolate *isolate, Handle< DependentCode > entries, DependencyGroups groups, DirectHandle< Code > code)
@ kFieldRepresentationGroup
@ kScriptContextSlotPropertyChangedGroup
@ kEmptyContextExtensionGroup
@ kInitialMapChangedGroup
@ kPropertyCellChangedGroup
@ kAllocationSiteTenuringChangedGroup
@ kAllocationSiteTransitionChangedGroup
static constexpr int kSlotsPerEntry
static const char * DependencyGroupName(DependencyGroup group)
static V8_EXPORT_PRIVATE void InstallDependency(Isolate *isolate, Handle< Code > code, Handle< HeapObject > object, DependencyGroups groups)
static constexpr int kGroupsSlotOffset
static void DeoptimizeDependencyGroups(Isolate *isolate, ObjectT object, DependencyGroups groups)
void IterateAndCompact(IsolateForSandbox isolate, const Function &fn)
static bool MarkCodeForDeoptimization(Isolate *isolate, Tagged< ObjectT > object, DependencyGroups groups)
static Tagged< DependentCode > GetDependentCode(Tagged< HeapObject > object)
V8_INLINE bool is_identical_to(Handle< S > other) const
static constexpr Tagged< Smi > FromInt(int value)
constexpr bool IsCleared() const
Tagged< HeapObject > GetHeapObjectAssumeWeak() const
void Set(int index, Tagged< MaybeObject > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
NEVER_READ_ONLY_SPACE static V8_EXPORT_PRIVATE Handle< WeakArrayList > AddToEnd(Isolate *isolate, Handle< WeakArrayList > array, MaybeObjectDirectHandle value)
Tagged< MaybeObject > Get(int index) const
ZoneVector< Entry > entries
constexpr unsigned CountTrailingZeros32(uint32_t value)
constexpr unsigned CountTrailingZeros(T value)
Tagged< MaybeWeak< T > > MakeWeak(Tagged< T > value)
V8_EXPORT_PRIVATE FlagValues v8_flags
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define V8_UNLIKELY(condition)