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

Unified Diff: src/ic/ic.h

Issue 2728293005: [ic] Completely unroll polymorphic IC map checks (Closed)
Patch Set: Remove assert for maximal size Created 3 years, 9 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 c9818f5a5b6ce39adbe98e0e3f7041f89a2c9bef..9a643438a903bf910057c32be4a76c0cb7ebdf72 100644
--- a/src/ic/ic.h
+++ b/src/ic/ic.h
@@ -26,6 +26,10 @@ class IC {
// or with a single extra frame for supporting calls.
enum FrameDepth { NO_EXTRA_FRAME = 0, EXTRA_CALL_FRAME = 1 };
+ // A polymorphic IC can handle at most 4 distinct maps before transitioning
+ // to megamorphic state.
+ static constexpr int kMaxPolymorphicMapCount = 4;
+
// Construct the IC structure with the given number of extra
// JavaScript frames on the stack.
IC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL);
« src/ic/accessor-assembler.cc ('K') | « src/ic/accessor-assembler.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698