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

Unified Diff: src/ast/ast.cc

Issue 1912633002: [ic] Split LoadIC into LoadGlobalIC and LoadIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 | « no previous file | src/builtins.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index a943fdf05cafd437e75ce5ab1524365569d4227a..a8731ce02a972aff16a8e647ea803bebd74dc95f 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -120,17 +120,17 @@ void VariableProxy::AssignFeedbackVectorSlots(Isolate* isolate,
if (UsesVariableFeedbackSlot()) {
// VariableProxies that point to the same Variable within a function can
// make their loads from the same IC slot.
- if (var()->IsUnallocated()) {
+ if (var()->IsUnallocated() || var()->mode() == DYNAMIC_GLOBAL) {
ZoneHashMap::Entry* entry = cache->Get(var());
if (entry != NULL) {
variable_feedback_slot_ = FeedbackVectorSlot(
static_cast<int>(reinterpret_cast<intptr_t>(entry->value)));
return;
}
- }
- variable_feedback_slot_ = spec->AddLoadICSlot();
- if (var()->IsUnallocated()) {
+ variable_feedback_slot_ = spec->AddLoadGlobalICSlot();
cache->Put(var(), variable_feedback_slot_);
+ } else {
+ variable_feedback_slot_ = spec->AddLoadICSlot();
}
}
}
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698