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

Unified Diff: src/compiler/js-inlining-heuristic.cc

Issue 2333243004: CallConstruct also gets call count information if megamorphic. (Closed)
Patch Set: Compile/runtime fixes. Created 4 years, 3 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/compiler/js-inlining-heuristic.cc
diff --git a/src/compiler/js-inlining-heuristic.cc b/src/compiler/js-inlining-heuristic.cc
index 05307df7097ef2939bb5d0a4f9b59bc943dcdbec..c5ede0a35f73dad33a28a5dfffb2e94fdd340861 100644
--- a/src/compiler/js-inlining-heuristic.cc
+++ b/src/compiler/js-inlining-heuristic.cc
@@ -132,12 +132,8 @@ Reduction JSInliningHeuristic::Reduce(Node* node) {
DCHECK_EQ(IrOpcode::kJSCallConstruct, node->opcode());
CallConstructParameters p = CallConstructParametersOf(node->op());
if (p.feedback().IsValid()) {
- int const extra_index =
- p.feedback().vector()->GetIndex(p.feedback().slot()) + 1;
- Object* feedback_extra = p.feedback().vector()->get(extra_index);
- if (feedback_extra->IsSmi()) {
- candidate.calls = Smi::cast(feedback_extra)->value();
- }
+ CallICNexus nexus(p.feedback().vector(), p.feedback().slot());
+ candidate.calls = nexus.ExtractCallCount();
}
}

Powered by Google App Engine
This is Rietveld 408576698