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

Unified Diff: runtime/vm/object.h

Issue 1414933006: Copy ICData descriptors when starting background compilation, so that they do not change while comp… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 2 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 | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 4b37a122bcfbeef0b0be247d830602d82f31a63d..46b5c68af9106c5268f2fa90dc10cf8a7d9cebd9 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1921,6 +1921,12 @@ class ICData : public Object {
intptr_t num_args_tested);
static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested);
+ // Generates a new ICData with descriptor data copied (shallow clone).
+ // Entry array of the result is the same as in 'from'. Once entry array is
+ // created, it can only change the 'count', all other properties are invariant
+ // (target, cids, number of checks).
+ static RawICData* CloneDescriptor(const ICData& from);
+
static intptr_t TestEntryLengthFor(intptr_t num_args);
static intptr_t TargetIndexFor(intptr_t num_args) {
@@ -2616,8 +2622,11 @@ class Function : public Object {
void SaveICDataMap(
const ZoneGrowableArray<const ICData*>& deopt_id_to_ic_data,
const Array& edge_counters_array) const;
+ // Uses saved ICData to populate the table 'deopt_id_to_ic_data'. Clone
+ // descriptors if 'clone_descriptors' true.
void RestoreICDataMap(
- ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data) const;
+ ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data,
+ bool clone_descriptors) const;
RawArray* ic_data_array() const;
void ClearICDataArray() const;
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698