@@ -63,6 +63,7 @@ class FinalizablePersistentHandle;
6363class FlowGraphCompiler ;
6464class HierarchyInfo ;
6565class LocalScope ;
66+ class CallSiteResetter ;
6667class CodeStatistics ;
6768class IsolateGroupReloadContext ;
6869
@@ -1862,6 +1863,16 @@ class CallSiteData : public Object {
18621863 StringPtr target_name () const { return raw_ptr ()->target_name_ ; }
18631864 ArrayPtr arguments_descriptor () const { return raw_ptr ()->args_descriptor_ ; }
18641865
1866+ intptr_t TypeArgsLen () const ;
1867+
1868+ intptr_t CountWithTypeArgs () const ;
1869+
1870+ intptr_t CountWithoutTypeArgs () const ;
1871+
1872+ intptr_t SizeWithoutTypeArgs () const ;
1873+
1874+ intptr_t SizeWithTypeArgs () const ;
1875+
18651876 static intptr_t target_name_offset () {
18661877 return OFFSET_OF (CallSiteDataLayout, target_name_);
18671878 }
@@ -1921,16 +1932,6 @@ class ICData : public CallSiteData {
19211932
19221933 intptr_t NumArgsTested () const ;
19231934
1924- intptr_t TypeArgsLen () const ;
1925-
1926- intptr_t CountWithTypeArgs () const ;
1927-
1928- intptr_t CountWithoutTypeArgs () const ;
1929-
1930- intptr_t SizeWithoutTypeArgs () const ;
1931-
1932- intptr_t SizeWithTypeArgs () const ;
1933-
19341935 intptr_t deopt_id () const {
19351936#if defined(DART_PRECOMPILED_RUNTIME)
19361937 UNREACHABLE ();
@@ -1946,21 +1947,13 @@ class ICData : public CallSiteData {
19461947 AbstractTypePtr receivers_static_type () const {
19471948 return raw_ptr ()->receivers_static_type_ ;
19481949 }
1949- void SetReceiversStaticType (const AbstractType& type) const ;
19501950 bool is_tracking_exactness () const {
19511951 return TrackingExactnessBit::decode (raw_ptr ()->state_bits_ );
19521952 }
1953- void set_tracking_exactness (bool value) const {
1954- StoreNonPointer (
1955- &raw_ptr ()->state_bits_ ,
1956- TrackingExactnessBit::update (value, raw_ptr ()->state_bits_ ));
1957- }
19581953#else
19591954 bool is_tracking_exactness () const { return false ; }
19601955#endif
19611956
1962- void Reset (Zone* zone) const ;
1963-
19641957// Note: only deopts with reasons before Unknown in this list are recorded in
19651958// the ICData. All other reasons are used purely for informational messages
19661959// printed during deoptimization itself.
@@ -2025,7 +2018,6 @@ class ICData : public CallSiteData {
20252018 static const char * RebindRuleToCString (RebindRule r);
20262019 static bool ParseRebindRule (const char * str, RebindRule* out);
20272020 RebindRule rebind_rule () const ;
2028- void set_rebind_rule (uint32_t rebind_rule) const ;
20292021
20302022 void set_is_megamorphic (bool value) const {
20312023 // We don't have concurrent RW access to [state_bits_].
@@ -2077,14 +2069,20 @@ class ICData : public CallSiteData {
20772069#endif
20782070
20792071 // Replaces entry |index| with the sentinel.
2080- void WriteSentinelAt (intptr_t index) const ;
2072+ // NOTE: Can only be called during reload.
2073+ void WriteSentinelAt (intptr_t index,
2074+ const CallSiteResetter& proof_of_reload) const ;
20812075
20822076 // Clears the count for entry |index|.
2083- void ClearCountAt (intptr_t index) const ;
2077+ // NOTE: Can only be called during reload.
2078+ void ClearCountAt (intptr_t index,
2079+ const CallSiteResetter& proof_of_reload) const ;
20842080
20852081 // Clear all entries with the sentinel value and reset the first entry
20862082 // with the dummy target entry.
2087- void ClearAndSetStaticTarget (const Function& func) const ;
2083+ // NOTE: Can only be called during reload.
2084+ void ClearAndSetStaticTarget (const Function& func,
2085+ const CallSiteResetter& proof_of_reload) const ;
20882086
20892087 void DebugDump () const ;
20902088
@@ -2112,9 +2110,6 @@ class ICData : public CallSiteData {
21122110 StaticTypeExactnessState exactness =
21132111 StaticTypeExactnessState::NotTracking ()) const ;
21142112
2115- // Does entry |index| contain the sentinel value?
2116- bool IsSentinelAt (intptr_t index) const ;
2117-
21182113 // Retrieving checks.
21192114
21202115 void GetCheckAt (intptr_t index,
@@ -2134,10 +2129,6 @@ class ICData : public CallSiteData {
21342129
21352130 FunctionPtr GetTargetAt (intptr_t index) const ;
21362131
2137- ObjectPtr GetTargetOrCodeAt (intptr_t index) const ;
2138- void SetCodeAt (intptr_t index, const Code& value) const ;
2139- void SetEntryPointAt (intptr_t index, const Smi& value) const ;
2140-
21412132 void IncrementCountAt (intptr_t index, intptr_t value) const ;
21422133 void SetCountAt (intptr_t index, intptr_t value) const ;
21432134 intptr_t GetCountAt (intptr_t index) const ;
@@ -2148,8 +2139,6 @@ class ICData : public CallSiteData {
21482139 // Returns only used entries.
21492140 ICDataPtr AsUnaryClassChecksForArgNr (intptr_t arg_nr) const ;
21502141 ICDataPtr AsUnaryClassChecks () const { return AsUnaryClassChecksForArgNr (0 ); }
2151- ICDataPtr AsUnaryClassChecksForCid (intptr_t cid,
2152- const Function& target) const ;
21532142
21542143 // Returns ICData with aggregated receiver count, sorted by highest count.
21552144 // Smi not first!! (the convention for ICData used in code generation is that
@@ -2239,11 +2228,21 @@ class ICData : public CallSiteData {
22392228 // for the new entry.
22402229 ArrayPtr Grow (intptr_t * index) const ;
22412230
2242- void set_owner (const Function& value) const ;
22432231 void set_deopt_id (intptr_t value) const ;
2244- void SetNumArgsTested (intptr_t value) const ;
22452232 void set_entries (const Array& value) const ;
2233+ void set_owner (const Function& value) const ;
2234+ void set_rebind_rule (uint32_t rebind_rule) const ;
22462235 void set_state_bits (uint32_t bits) const ;
2236+ void set_tracking_exactness (bool value) const {
2237+ StoreNonPointer (
2238+ &raw_ptr ()->state_bits_ ,
2239+ TrackingExactnessBit::update (value, raw_ptr ()->state_bits_ ));
2240+ }
2241+
2242+ // Does entry |index| contain the sentinel value?
2243+ bool IsSentinelAt (intptr_t index) const ;
2244+ void SetNumArgsTested (intptr_t value) const ;
2245+ void SetReceiversStaticType (const AbstractType& type) const ;
22472246
22482247 // This bit is set when a call site becomes megamorphic and starts using a
22492248 // MegamorphicCache instead of ICData. It means that the entries in the
0 commit comments