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

Unified Diff: src/compiler/js-call-reducer.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
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-call-reducer.cc
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc
index e39021412e70941aac6c0220986ab25d9ea926e0..cfee70a6df3ae041a8049088c072694f30776409 100644
--- a/src/compiler/js-call-reducer.cc
+++ b/src/compiler/js-call-reducer.cc
@@ -386,8 +386,8 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) {
// Check if we have an allocation site.
Handle<AllocationSite> site;
if (p.feedback().IsValid()) {
- Handle<Object> feedback(
- p.feedback().vector()->Get(p.feedback().slot()), isolate());
+ CallICNexus nexus(p.feedback().vector(), p.feedback().slot());
Benedikt Meurer 2016/09/13 17:11:48 Nice!
+ Handle<Object> feedback(nexus.GetFeedback(), isolate());
if (feedback->IsAllocationSite()) {
site = Handle<AllocationSite>::cast(feedback);
}
@@ -412,10 +412,9 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) {
// Not much we can do if deoptimization support is disabled.
if (!(flags() & kDeoptimizationEnabled)) return NoChange();
- // TODO(mvstanton): Use ConstructICNexus here, once available.
- Handle<Object> feedback;
if (!p.feedback().IsValid()) return NoChange();
- feedback = handle(p.feedback().vector()->Get(p.feedback().slot()), isolate());
+ CallICNexus nexus(p.feedback().vector(), p.feedback().slot());
Benedikt Meurer 2016/09/13 17:11:48 Nice!
+ Handle<Object> feedback(nexus.GetFeedback(), isolate());
if (feedback->IsAllocationSite()) {
// The feedback is an AllocationSite, which means we have called the
// Array function and collected transition (and pretenuring) feedback
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698