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

Unified Diff: src/ic/ic.cc

Issue 1476413003: Provide call counts for constructor calls, surface them as a vector IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 1 month 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/ic/ic.h ('k') | src/interface-descriptors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 6e6f8e50cfbd538a3ea6426d74e97c8062168c95..d65a7c6430f41018973b52dffab7d69c8e4ab652 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -475,6 +475,7 @@ void IC::Clear(Isolate* isolate, Address address, Address constant_pool) {
case Code::COMPARE_NIL_IC:
return CompareNilIC::Clear(address, target, constant_pool);
case Code::CALL_IC: // CallICs are vector-based and cleared differently.
+ case Code::CONSTRUCT_IC:
case Code::BINARY_OP_IC:
case Code::TO_BOOLEAN_IC:
// Clearing these is tricky and does not
@@ -510,6 +511,19 @@ void CallIC::Clear(Isolate* isolate, Code* host, CallICNexus* nexus) {
}
+void ConstructIC::Clear(Isolate* isolate, Code* host, ConstructICNexus* nexus) {
+ // Determine our state.
+ Object* feedback = nexus->vector()->Get(nexus->slot());
+ State state = nexus->StateFromFeedback();
+
+ if (state != UNINITIALIZED && !feedback->IsAllocationSite()) {
+ nexus->ConfigureUninitialized();
+ // The change in state must be processed.
+ OnTypeFeedbackChanged(isolate, host, nexus->vector(), state, UNINITIALIZED);
+ }
+}
+
+
void LoadIC::Clear(Isolate* isolate, Code* host, LoadICNexus* nexus) {
if (IsCleared(nexus)) return;
State state = nexus->StateFromFeedback();
« no previous file with comments | « src/ic/ic.h ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698