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

Unified Diff: src/ast/ast.cc

Issue 2673383002: [ic] Encode LoadGlobalIC's typeof mode in slot kind instead of code object's flags. (Closed)
Patch Set: Addressed comments and added check to FCG Created 3 years, 10 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/ast/ast.h ('k') | src/ast/ast-numbering.cc » ('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 cc22ce1f1572a05218623b4ee50dd8ea3f9f5e3b..e5a252abd8c707ae26fac9ca422db225250a84a8 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -222,20 +222,19 @@ void VariableProxy::BindTo(Variable* var) {
}
void VariableProxy::AssignFeedbackVectorSlots(FeedbackVectorSpec* spec,
- LanguageMode language_mode,
+ TypeofMode typeof_mode,
FeedbackVectorSlotCache* cache) {
if (UsesVariableFeedbackSlot()) {
// VariableProxies that point to the same Variable within a function can
// make their loads from the same IC slot.
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)));
+ FeedbackVectorSlot slot = cache->Get(typeof_mode, var());
+ if (!slot.IsInvalid()) {
+ variable_feedback_slot_ = slot;
return;
}
- variable_feedback_slot_ = spec->AddLoadGlobalICSlot();
- cache->Put(var(), variable_feedback_slot_);
+ variable_feedback_slot_ = spec->AddLoadGlobalICSlot(typeof_mode);
+ cache->Put(typeof_mode, var(), variable_feedback_slot_);
} else {
variable_feedback_slot_ = spec->AddLoadICSlot();
}
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698