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

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

Issue 2882153003: [turbofan] Fully reduce node in JSCallReducer::ReduceSpreadCall. (Closed)
Patch Set: 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 | « no previous file | no next file » | 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 Node* const parameters = frame_state->InputAt(kFrameStateParametersInput); 499 Node* const parameters = frame_state->InputAt(kFrameStateParametersInput);
500 for (int i = start_index + 1; i < state_info.parameter_count(); ++i) { 500 for (int i = start_index + 1; i < state_info.parameter_count(); ++i) {
501 node->InsertInput(graph()->zone(), static_cast<int>(++arity), 501 node->InsertInput(graph()->zone(), static_cast<int>(++arity),
502 parameters->InputAt(i)); 502 parameters->InputAt(i));
503 } 503 }
504 504
505 // TODO(turbofan): Collect call counts on spread call/construct and thread it 505 // TODO(turbofan): Collect call counts on spread call/construct and thread it
506 // through here. 506 // through here.
507 if (node->opcode() == IrOpcode::kJSCallWithSpread) { 507 if (node->opcode() == IrOpcode::kJSCallWithSpread) {
508 NodeProperties::ChangeOp(node, javascript()->Call(arity + 1)); 508 NodeProperties::ChangeOp(node, javascript()->Call(arity + 1));
509 Reduction const r = ReduceJSCall(node);
510 return r.Changed() ? r : Changed(node);
509 } else { 511 } else {
510 NodeProperties::ChangeOp(node, javascript()->Construct(arity + 2)); 512 NodeProperties::ChangeOp(node, javascript()->Construct(arity + 2));
513 Reduction const r = ReduceJSConstruct(node);
514 return r.Changed() ? r : Changed(node);
511 } 515 }
512 return Changed(node);
513 } 516 }
514 517
515 namespace { 518 namespace {
516 519
517 bool ShouldUseCallICFeedback(Node* node) { 520 bool ShouldUseCallICFeedback(Node* node) {
518 HeapObjectMatcher m(node); 521 HeapObjectMatcher m(node);
519 if (m.HasValue() || m.IsJSCreateClosure()) { 522 if (m.HasValue() || m.IsJSCreateClosure()) {
520 // Don't use CallIC feedback when we know the function 523 // Don't use CallIC feedback when we know the function
521 // being called, i.e. either know the closure itself or 524 // being called, i.e. either know the closure itself or
522 // at least the SharedFunctionInfo. 525 // at least the SharedFunctionInfo.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 return jsgraph()->javascript(); 861 return jsgraph()->javascript();
859 } 862 }
860 863
861 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { 864 SimplifiedOperatorBuilder* JSCallReducer::simplified() const {
862 return jsgraph()->simplified(); 865 return jsgraph()->simplified();
863 } 866 }
864 867
865 } // namespace compiler 868 } // namespace compiler
866 } // namespace internal 869 } // namespace internal
867 } // namespace v8 870 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698