Commit 939e18fe authored by Suraj Sharma's avatar Suraj Sharma Committed by Commit Bot

[ic] Rename PatchCache to SetCache and remove unused methods.

Bug: v8:9779
Change-Id: I8603942e91b7e03fc9feaa69a8716ffffcf969b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1851504Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Suraj Sharma <surshar@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#64218}
parent 0a3331d3
......@@ -381,7 +381,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
// Ensure the IC state progresses.
TRACE_HANDLER_STATS(isolate(), LoadIC_NonReceiver);
update_receiver_map(object);
PatchCache(name, LoadHandler::LoadSlow(isolate()));
SetCache(name, LoadHandler::LoadSlow(isolate()));
TraceIC("LoadIC", name);
}
......@@ -484,7 +484,7 @@ MaybeHandle<Object> LoadGlobalIC::Load(Handle<Name> name) {
} else {
// Given combination of indices can't be encoded, so use slow stub.
TRACE_HANDLER_STATS(isolate(), LoadGlobalIC_SlowStub);
PatchCache(name, LoadHandler::LoadSlow(isolate()));
SetCache(name, LoadHandler::LoadSlow(isolate()));
}
TraceIC("LoadGlobalIC", name);
}
......@@ -607,11 +607,11 @@ bool IC::IsTransitionOfMonomorphicTarget(Map source_map, Map target_map) {
return transitioned_map == target_map;
}
void IC::PatchCache(Handle<Name> name, Handle<Object> handler) {
PatchCache(name, MaybeObjectHandle(handler));
void IC::SetCache(Handle<Name> name, Handle<Object> handler) {
SetCache(name, MaybeObjectHandle(handler));
}
void IC::PatchCache(Handle<Name> name, const MaybeObjectHandle& handler) {
void IC::SetCache(Handle<Name> name, const MaybeObjectHandle& handler) {
DCHECK(IsHandler(*handler));
// Currently only load and store ICs support non-code handlers.
DCHECK(IsAnyLoad() || IsAnyStore() || IsAnyHas());
......@@ -676,7 +676,7 @@ void LoadIC::UpdateCaches(LookupIterator* lookup) {
code = ComputeHandler(lookup);
}
PatchCache(lookup->name(), code);
SetCache(lookup->name(), code);
TraceIC("LoadIC", lookup->name());
}
......@@ -1395,7 +1395,7 @@ MaybeHandle<Object> StoreGlobalIC::Store(Handle<Name> name,
} else {
// Given combination of indices can't be encoded, so use slow stub.
TRACE_HANDLER_STATS(isolate(), StoreGlobalIC_SlowStub);
PatchCache(name, StoreHandler::StoreSlow(isolate()));
SetCache(name, StoreHandler::StoreSlow(isolate()));
}
TraceIC("StoreGlobalIC", name);
}
......@@ -1428,7 +1428,7 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
// Ensure the IC state progresses.
TRACE_HANDLER_STATS(isolate(), StoreIC_NonReceiver);
update_receiver_map(object);
PatchCache(name, StoreHandler::StoreSlow(isolate()));
SetCache(name, StoreHandler::StoreSlow(isolate()));
TraceIC("StoreIC", name);
}
return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name);
......@@ -1477,7 +1477,7 @@ void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value,
handler = MaybeObjectHandle(StoreHandler::StoreSlow(isolate()));
}
PatchCache(lookup->name(), handler);
SetCache(lookup->name(), handler);
TraceIC("StoreIC", lookup->name());
}
......
......@@ -101,8 +101,8 @@ class IC {
void CopyICToMegamorphicCache(Handle<Name> name);
bool IsTransitionOfMonomorphicTarget(Map source_map, Map target_map);
void PatchCache(Handle<Name> name, Handle<Object> handler);
void PatchCache(Handle<Name> name, const MaybeObjectHandle& handler);
void SetCache(Handle<Name> name, Handle<Object> handler);
void SetCache(Handle<Name> name, const MaybeObjectHandle& handler);
FeedbackSlotKind kind() const { return kind_; }
bool IsGlobalIC() const { return IsLoadGlobalIC() || IsStoreGlobalIC(); }
bool IsLoadIC() const { return IsLoadICKind(kind_); }
......
......@@ -1019,16 +1019,13 @@ class RuntimeCallTimer final {
V(LoadIC_LoadNormalDH) \
V(LoadIC_LoadNormalFromPrototypeDH) \
V(LoadIC_NonReceiver) \
V(LoadIC_Premonomorphic) \
V(LoadIC_SlowStub) \
V(LoadIC_StringLength) \
V(LoadIC_StringWrapperLength) \
V(StoreGlobalIC_SlowStub) \
V(StoreGlobalIC_StoreScriptContextField) \
V(StoreGlobalIC_Premonomorphic) \
V(StoreIC_HandlerCacheHit_Accessor) \
V(StoreIC_NonReceiver) \
V(StoreIC_Premonomorphic) \
V(StoreIC_SlowStub) \
V(StoreIC_StoreAccessorDH) \
V(StoreIC_StoreAccessorOnPrototypeDH) \
......
......@@ -305,9 +305,6 @@ class FeedbackVector : public HeapObject {
// The object that indicates a megamorphic state.
static inline Handle<Symbol> MegamorphicSentinel(Isolate* isolate);
// The object that indicates a premonomorphic state.
static inline Handle<Symbol> PremonomorphicSentinel(Isolate* isolate);
// A raw version of the uninitialized sentinel that's safe to read during
// garbage collection (e.g., for patching the cache).
static inline Symbol RawUninitializedSentinel(Isolate* isolate);
......@@ -663,7 +660,6 @@ class V8_EXPORT_PRIVATE FeedbackNexus final {
// Clear() returns true if the state of the underlying vector was changed.
bool Clear();
void ConfigureUninitialized();
void ConfigurePremonomorphic(Handle<Map> receiver_map);
// ConfigureMegamorphic() returns true if the state of the underlying vector
// was changed. Extra feedback is cleared if the 0 parameter version is used.
bool ConfigureMegamorphic();
......
......@@ -362,7 +362,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
<div id="legend" style="padding-right: 200px">
<div style="float:right; border-style: solid; border-width: 1px; padding:20px">
0 uninitialized<br>
. premonomorphic<br>
X no feedback<br>
1 monomorphic<br>
^ recompute handler<br>
P polymorphic<br>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment