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

Unified Diff: src/ic/ic.h

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/ic/ic.h
diff --git a/src/ic/ic.h b/src/ic/ic.h
index 8dae809396066eba75e149dbeca10d2a434d20d4..206778f8a8cc584e8c9228d08ef85e46edbfa4b9 100644
--- a/src/ic/ic.h
+++ b/src/ic/ic.h
@@ -364,7 +364,7 @@ class StoreIC : public IC {
}
LanguageMode language_mode() const {
- return StoreICState::GetLanguageMode(extra_ic_state());
+ return nexus()->vector()->GetLanguageMode(nexus()->slot());
}
MUST_USE_RESULT MaybeHandle<Object> Store(
@@ -380,6 +380,10 @@ class StoreIC : public IC {
protected:
// Stub accessors.
Handle<Code> slow_stub() const {
+ // TODO(ishell): don't hard-code language mode into the handler because
+ // this handler can be re-used through megamorphic stub cache for wrong
+ // language mode.
+ // The slow stub must decode the language mode from the IC kind.
switch (language_mode()) {
case SLOPPY:
return isolate()->builtins()->StoreIC_SlowSloppy();
« src/compiler/bytecode-graph-builder.cc ('K') | « src/heap/heap.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698