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

Unified Diff: runtime/vm/object.cc

Issue 2217733002: Reset most ICs by returning to the canonical empty data arrays. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/object.h ('k') | runtime/vm/object_reload.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 0506fa71f79522b0c228df80dd2d29b6e506a034..0886a30ee2dca5a75bbf024e7550dc68db4a360f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -12973,10 +12973,6 @@ void ICData::DebugDump() const {
}
-void ICData::ValidateSentinelLocations() const {
-}
-
-
void ICData::AddReceiverCheck(intptr_t receiver_class_id,
const Function& target,
intptr_t count) const {
@@ -13416,12 +13412,10 @@ RawArray* ICData::NewNonCachedEmptyICDataArray(intptr_t num_args_tested) {
}
-RawArray* ICData::NewEmptyICDataArray(intptr_t num_args_tested) {
+RawArray* ICData::CachedEmptyICDataArray(intptr_t num_args_tested) {
ASSERT(num_args_tested >= 0);
- if (num_args_tested < kCachedICDataArrayCount) {
- return cached_icdata_arrays_[num_args_tested];
- }
- return NewNonCachedEmptyICDataArray(num_args_tested);
+ ASSERT(num_args_tested < kCachedICDataArrayCount);
+ return cached_icdata_arrays_[num_args_tested];
}
@@ -13468,16 +13462,6 @@ bool ICData::IsImmutable() const {
}
-void ICData::ResetData() const {
- // Number of array elements in one test entry.
- intptr_t len = TestEntryLength();
- // IC data array must be null terminated (sentinel entry).
- const Array& ic_data = Array::Handle(Array::New(len, Heap::kOld));
- set_ic_data_array(ic_data);
- WriteSentinel(ic_data, len);
-}
-
-
RawICData* ICData::New() {
ICData& result = ICData::Handle();
{
@@ -13513,7 +13497,7 @@ RawICData* ICData::New(const Function& owner,
num_args_tested,
is_static_call));
result.set_ic_data_array(
- Array::Handle(zone, NewEmptyICDataArray(num_args_tested)));
+ Array::Handle(zone, CachedEmptyICDataArray(num_args_tested)));
return result.raw();
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698