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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 1894983002: [turbofan] Introduce CallDescriptorOf helper for safety. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-4924
Patch Set: Created 4 years, 8 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/linkage.cc ('k') | src/compiler/tail-call-optimization.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 626
627 // Convert inputs to the output representation of this phi, pass the 627 // Convert inputs to the output representation of this phi, pass the
628 // truncation truncation along. 628 // truncation truncation along.
629 UseInfo input_use(output, truncation); 629 UseInfo input_use(output, truncation);
630 for (int i = 0; i < node->InputCount(); i++) { 630 for (int i = 0; i < node->InputCount(); i++) {
631 ProcessInput(node, i, i < values ? input_use : UseInfo::None()); 631 ProcessInput(node, i, i < values ? input_use : UseInfo::None());
632 } 632 }
633 } 633 }
634 634
635 void VisitCall(Node* node, SimplifiedLowering* lowering) { 635 void VisitCall(Node* node, SimplifiedLowering* lowering) {
636 const CallDescriptor* desc = OpParameter<const CallDescriptor*>(node->op()); 636 const CallDescriptor* desc = CallDescriptorOf(node->op());
637 const MachineSignature* sig = desc->GetMachineSignature(); 637 const MachineSignature* sig = desc->GetMachineSignature();
638 int params = static_cast<int>(sig->parameter_count()); 638 int params = static_cast<int>(sig->parameter_count());
639 // Propagate representation information from call descriptor. 639 // Propagate representation information from call descriptor.
640 for (int i = 0; i < node->InputCount(); i++) { 640 for (int i = 0; i < node->InputCount(); i++) {
641 if (i == 0) { 641 if (i == 0) {
642 // The target of the call. 642 // The target of the call.
643 ProcessInput(node, i, UseInfo::None()); 643 ProcessInput(node, i, UseInfo::None());
644 } else if ((i - 1) < params) { 644 } else if ((i - 1) < params) {
645 ProcessInput(node, i, TruncatingUseInfoFromRepresentation( 645 ProcessInput(node, i, TruncatingUseInfoFromRepresentation(
646 sig->GetParam(i - 1).representation())); 646 sig->GetParam(i - 1).representation()));
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) { 2179 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) {
2180 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs, 2180 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs,
2181 jsgraph()->Int32Constant(0x1f))); 2181 jsgraph()->Int32Constant(0x1f)));
2182 } 2182 }
2183 NodeProperties::ChangeOp(node, op); 2183 NodeProperties::ChangeOp(node, op);
2184 } 2184 }
2185 2185
2186 } // namespace compiler 2186 } // namespace compiler
2187 } // namespace internal 2187 } // namespace internal
2188 } // namespace v8 2188 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/tail-call-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698