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

Unified Diff: src/type-feedback-vector.cc

Issue 2062343002: [ic] Remove --new-load-global-ic switch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@enable-load-global-ic
Patch Set: Rebasing 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
« no previous file with comments | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index e9e8b512dd3b6ca397f52f6885cb7bac475efb53..1984e25315aae146dd68a0f76be842d86a6af098 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -186,8 +186,7 @@ Handle<TypeFeedbackVector> TypeFeedbackVector::New(
int entry_size = TypeFeedbackMetadata::GetSlotSize(kind);
Object* value;
- if (FLAG_new_load_global_ic &&
- kind == FeedbackVectorSlotKind::LOAD_GLOBAL_IC) {
+ if (kind == FeedbackVectorSlotKind::LOAD_GLOBAL_IC) {
value = *factory->empty_weak_cell();
} else {
value = *uninitialized_sentinel;
@@ -463,29 +462,10 @@ InlineCacheState LoadGlobalICNexus::StateFromFeedback() const {
Isolate* isolate = GetIsolate();
Object* feedback = GetFeedback();
- if (FLAG_new_load_global_ic) {
- Object* extra = GetFeedbackExtra();
- if (!WeakCell::cast(feedback)->cleared() ||
- extra != *TypeFeedbackVector::UninitializedSentinel(isolate)) {
- return MONOMORPHIC;
- }
-
- } else {
- if (feedback == *TypeFeedbackVector::UninitializedSentinel(isolate)) {
- return UNINITIALIZED;
- } else if (feedback == *TypeFeedbackVector::MegamorphicSentinel(isolate)) {
- return MEGAMORPHIC;
- } else if (feedback ==
- *TypeFeedbackVector::PremonomorphicSentinel(isolate)) {
- return PREMONOMORPHIC;
- } else if (feedback->IsFixedArray()) {
- // Determine state purely by our structure, don't check if the maps are
- // cleared.
- return POLYMORPHIC;
- } else if (feedback->IsWeakCell()) {
- // Don't check if the map is cleared.
- return MONOMORPHIC;
- }
+ Object* extra = GetFeedbackExtra();
+ if (!WeakCell::cast(feedback)->cleared() ||
+ extra != *TypeFeedbackVector::UninitializedSentinel(isolate)) {
+ return MONOMORPHIC;
}
return UNINITIALIZED;
}
@@ -635,13 +615,6 @@ void LoadICNexus::ConfigureMonomorphic(Handle<Map> receiver_map,
SetFeedbackExtra(*handler);
}
-void LoadGlobalICNexus::ConfigureMonomorphic(Handle<Map> receiver_map,
- Handle<Code> handler) {
- Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map);
- SetFeedback(*cell);
- SetFeedbackExtra(*handler);
-}
-
void LoadGlobalICNexus::ConfigureUninitialized() {
Isolate* isolate = GetIsolate();
SetFeedback(isolate->heap()->empty_weak_cell(), SKIP_WRITE_BARRIER);
« no previous file with comments | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698