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

Unified Diff: src/full-codegen/full-codegen.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/disassembler.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index df89250dea1ebd94dbea3a193aa3d8c651d7f1c7..11c8e02f7b58ec35726357e6369df94b5e06d565 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -485,8 +485,12 @@ void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
DCHECK(var->IsUnallocated());
__ Move(LoadDescriptor::NameRegister(), var->name());
- EmitLoadSlot(LoadGlobalDescriptor::SlotRegister(),
- proxy->VariableFeedbackSlot());
+ FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
+ // Ensure that typeof mode is in sync with the IC slot kind.
+ DCHECK_EQ(GetTypeofModeFromICKind(feedback_vector_spec()->GetKind(slot)),
+ typeof_mode);
+
+ EmitLoadSlot(LoadGlobalDescriptor::SlotRegister(), slot);
Handle<Code> code = CodeFactory::LoadGlobalIC(isolate(), typeof_mode).code();
__ Call(code, RelocInfo::CODE_TARGET);
RestoreContext();
« no previous file with comments | « src/disassembler.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698