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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2676583002: [ic] Encode [Keyed]StoreIC's language mode in slot kind instead of code object's flags. (Closed)
Patch Set: Rebasing 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
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index 8de7eeb02e8ce1fbcd8ea143d752adefe713f3ff..c4909ab9474d3813b664ec8d1f4fb829432118ba 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -230,6 +230,9 @@ void FullCodeGenerator::CallStoreIC(FeedbackVectorSlot slot,
EmitLoadSlot(StoreDescriptor::SlotRegister(), slot);
}
+ // Ensure that language mode is in sync with the IC slot kind.
+ DCHECK_EQ(GetLanguageModeFromICKind(feedback_vector_spec()->GetKind(slot)),
+ language_mode());
Handle<Code> code = CodeFactory::StoreIC(isolate(), language_mode()).code();
__ Call(code, RelocInfo::CODE_TARGET);
RestoreContext();
@@ -245,6 +248,9 @@ void FullCodeGenerator::CallKeyedStoreIC(FeedbackVectorSlot slot) {
EmitLoadSlot(StoreDescriptor::SlotRegister(), slot);
}
+ // Ensure that language mode is in sync with the IC slot kind.
+ DCHECK_EQ(GetLanguageModeFromICKind(feedback_vector_spec()->GetKind(slot)),
+ language_mode());
Handle<Code> code =
CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
__ Call(code, RelocInfo::CODE_TARGET);
@@ -1600,6 +1606,10 @@ bool FullCodeGenerator::has_simple_parameters() {
FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
+const FeedbackVectorSpec* FullCodeGenerator::feedback_vector_spec() const {
+ return literal()->feedback_vector_spec();
+}
+
#undef __

Powered by Google App Engine
This is Rietveld 408576698