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

Side by Side Diff: src/compiler/js-call-reducer.cc

Issue 2856103002: [turbofan] Introduce dedicated CallFrequency class. (Closed)
Patch Set: Address offline feedback from jarin@. Created 3 years, 7 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
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-call-reducer.h" 5 #include "src/compiler/js-call-reducer.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 node->RemoveInput(arity--); 489 node->RemoveInput(arity--);
490 490
491 // Add the actual parameters to the {node}, skipping the receiver. 491 // Add the actual parameters to the {node}, skipping the receiver.
492 Node* const parameters = frame_state->InputAt(kFrameStateParametersInput); 492 Node* const parameters = frame_state->InputAt(kFrameStateParametersInput);
493 for (int i = start_index + 1; i < state_info.parameter_count(); ++i) { 493 for (int i = start_index + 1; i < state_info.parameter_count(); ++i) {
494 node->InsertInput(graph()->zone(), static_cast<int>(++arity), 494 node->InsertInput(graph()->zone(), static_cast<int>(++arity),
495 parameters->InputAt(i)); 495 parameters->InputAt(i));
496 } 496 }
497 497
498 // TODO(turbofan): Collect call counts on spread call/construct and thread it
499 // through here.
498 if (node->opcode() == IrOpcode::kJSCallWithSpread) { 500 if (node->opcode() == IrOpcode::kJSCallWithSpread) {
499 NodeProperties::ChangeOp( 501 NodeProperties::ChangeOp(node, javascript()->Call(arity + 1));
500 node, javascript()->Call(arity + 1, 7, VectorSlotPair()));
501 } else { 502 } else {
502 NodeProperties::ChangeOp( 503 NodeProperties::ChangeOp(node, javascript()->Construct(arity + 2));
503 node, javascript()->Construct(arity + 2, 7, VectorSlotPair()));
504 } 504 }
505 return Changed(node); 505 return Changed(node);
506 } 506 }
507 507
508 namespace { 508 namespace {
509 509
510 bool ShouldUseCallICFeedback(Node* node) { 510 bool ShouldUseCallICFeedback(Node* node) {
511 HeapObjectMatcher m(node); 511 HeapObjectMatcher m(node);
512 if (m.HasValue() || m.IsJSCreateClosure()) { 512 if (m.HasValue() || m.IsJSCreateClosure()) {
513 // Don't use CallIC feedback when we know the function 513 // Don't use CallIC feedback when we know the function
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 return jsgraph()->javascript(); 851 return jsgraph()->javascript();
852 } 852 }
853 853
854 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { 854 SimplifiedOperatorBuilder* JSCallReducer::simplified() const {
855 return jsgraph()->simplified(); 855 return jsgraph()->simplified();
856 } 856 }
857 857
858 } // namespace compiler 858 } // namespace compiler
859 } // namespace internal 859 } // namespace internal
860 } // namespace v8 860 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698