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

Side by Side Diff: src/compiler/common-operator.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/common-operator.h ('k') | src/compiler/instruction-selector.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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 std::ostream& operator<<(std::ostream& os, SelectParameters const& p) { 91 std::ostream& operator<<(std::ostream& os, SelectParameters const& p) {
92 return os << p.representation() << "|" << p.hint(); 92 return os << p.representation() << "|" << p.hint();
93 } 93 }
94 94
95 95
96 SelectParameters const& SelectParametersOf(const Operator* const op) { 96 SelectParameters const& SelectParametersOf(const Operator* const op) {
97 DCHECK_EQ(IrOpcode::kSelect, op->opcode()); 97 DCHECK_EQ(IrOpcode::kSelect, op->opcode());
98 return OpParameter<SelectParameters>(op); 98 return OpParameter<SelectParameters>(op);
99 } 99 }
100 100
101 CallDescriptor const* CallDescriptorOf(const Operator* const op) {
102 DCHECK(op->opcode() == IrOpcode::kCall ||
103 op->opcode() == IrOpcode::kTailCall);
104 return OpParameter<CallDescriptor const*>(op);
105 }
101 106
102 size_t ProjectionIndexOf(const Operator* const op) { 107 size_t ProjectionIndexOf(const Operator* const op) {
103 DCHECK_EQ(IrOpcode::kProjection, op->opcode()); 108 DCHECK_EQ(IrOpcode::kProjection, op->opcode());
104 return OpParameter<size_t>(op); 109 return OpParameter<size_t>(op);
105 } 110 }
106 111
107 112
108 MachineRepresentation PhiRepresentationOf(const Operator* const op) { 113 MachineRepresentation PhiRepresentationOf(const Operator* const op) {
109 DCHECK_EQ(IrOpcode::kPhi, op->opcode()); 114 DCHECK_EQ(IrOpcode::kPhi, op->opcode());
110 return OpParameter<MachineRepresentation>(op); 115 return OpParameter<MachineRepresentation>(op);
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 CommonOperatorBuilder::CreateFrameStateFunctionInfo( 904 CommonOperatorBuilder::CreateFrameStateFunctionInfo(
900 FrameStateType type, int parameter_count, int local_count, 905 FrameStateType type, int parameter_count, int local_count,
901 Handle<SharedFunctionInfo> shared_info) { 906 Handle<SharedFunctionInfo> shared_info) {
902 return new (zone()->New(sizeof(FrameStateFunctionInfo))) 907 return new (zone()->New(sizeof(FrameStateFunctionInfo)))
903 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); 908 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info);
904 } 909 }
905 910
906 } // namespace compiler 911 } // namespace compiler
907 } // namespace internal 912 } // namespace internal
908 } // namespace v8 913 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698