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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/js-inlining-heuristic.h" 5 #include "src/compiler/js-inlining-heuristic.h"
6 6
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/simplified-operator.h" 10 #include "src/compiler/simplified-operator.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (node->opcode() == IrOpcode::kJSCallFunction) { 125 if (node->opcode() == IrOpcode::kJSCallFunction) {
126 CallFunctionParameters p = CallFunctionParametersOf(node->op()); 126 CallFunctionParameters p = CallFunctionParametersOf(node->op());
127 if (p.feedback().IsValid()) { 127 if (p.feedback().IsValid()) {
128 CallICNexus nexus(p.feedback().vector(), p.feedback().slot()); 128 CallICNexus nexus(p.feedback().vector(), p.feedback().slot());
129 candidate.calls = nexus.ExtractCallCount(); 129 candidate.calls = nexus.ExtractCallCount();
130 } 130 }
131 } else { 131 } else {
132 DCHECK_EQ(IrOpcode::kJSCallConstruct, node->opcode()); 132 DCHECK_EQ(IrOpcode::kJSCallConstruct, node->opcode());
133 CallConstructParameters p = CallConstructParametersOf(node->op()); 133 CallConstructParameters p = CallConstructParametersOf(node->op());
134 if (p.feedback().IsValid()) { 134 if (p.feedback().IsValid()) {
135 int const extra_index = 135 CallICNexus nexus(p.feedback().vector(), p.feedback().slot());
136 p.feedback().vector()->GetIndex(p.feedback().slot()) + 1; 136 candidate.calls = nexus.ExtractCallCount();
137 Object* feedback_extra = p.feedback().vector()->get(extra_index);
138 if (feedback_extra->IsSmi()) {
139 candidate.calls = Smi::cast(feedback_extra)->value();
140 }
141 } 137 }
142 } 138 }
143 139
144 // Handling of special inlining modes right away: 140 // Handling of special inlining modes right away:
145 // - For restricted inlining: stop all handling at this point. 141 // - For restricted inlining: stop all handling at this point.
146 // - For stressing inlining: immediately handle all functions. 142 // - For stressing inlining: immediately handle all functions.
147 switch (mode_) { 143 switch (mode_) {
148 case kRestrictedInlining: 144 case kRestrictedInlining:
149 return NoChange(); 145 return NoChange();
150 case kStressInlining: 146 case kStressInlining:
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return jsgraph()->common(); 305 return jsgraph()->common();
310 } 306 }
311 307
312 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const { 308 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const {
313 return jsgraph()->simplified(); 309 return jsgraph()->simplified();
314 } 310 }
315 311
316 } // namespace compiler 312 } // namespace compiler
317 } // namespace internal 313 } // namespace internal
318 } // namespace v8 314 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698