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

Unified Diff: runtime/vm/object.cc

Issue 2044423003: Remember inside an ICData if it is for a static call or an instance call (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 5003e7e1123010340703167e50e3252ce2356933..b1b54c419f33fe3519d737d37e1513f86435cfa0 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -12558,6 +12558,17 @@ void ICData::AddDeoptReason(DeoptReasonId reason) const {
}
+void ICData::SetIsStaticCall(bool static_call) const {
+ StoreNonPointer(&raw_ptr()->state_bits_,
+ StaticCallBit::update(static_call, raw_ptr()->state_bits_));
+}
+
+
+bool ICData::is_static_call() const {
+ return StaticCallBit::decode(raw_ptr()->state_bits_);
+}
+
+
void ICData::set_state_bits(uint32_t bits) const {
StoreNonPointer(&raw_ptr()->state_bits_, bits);
}
@@ -13461,6 +13472,8 @@ RawICData* ICData::NewFrom(const ICData& from, intptr_t num_args_tested) {
num_args_tested));
// Copy deoptimization reasons.
result.SetDeoptReasons(from.DeoptReasons());
+ // Copy whether or not this is a static call.
+ result.SetIsStaticCall(from.is_static_call());
return result.raw();
}
@@ -13484,6 +13497,7 @@ RawICData* ICData::Clone(const ICData& from) {
obj = from_array.At(i);
cloned_array.SetAt(i, obj);
}
+ result.SetIsStaticCall(from.is_static_call());
result.set_ic_data_array(cloned_array);
// Copy deoptimization reasons.
result.SetDeoptReasons(from.DeoptReasons());
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_reload.cc » ('j') | runtime/vm/object_reload.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698