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

Side by Side Diff: src/compiler/operator-properties-inl.h

Issue 565753004: [turbofan] Some common operators are globally shared singletons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes2 Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/operator.cc ('k') | src/compiler/raw-machine-assembler.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ 5 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ 6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
7 7
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 inline int OperatorProperties::GetControlInputCount(const Operator* op) { 109 inline int OperatorProperties::GetControlInputCount(const Operator* op) {
110 switch (op->opcode()) { 110 switch (op->opcode()) {
111 case IrOpcode::kPhi: 111 case IrOpcode::kPhi:
112 case IrOpcode::kEffectPhi: 112 case IrOpcode::kEffectPhi:
113 case IrOpcode::kControlEffect: 113 case IrOpcode::kControlEffect:
114 return 1; 114 return 1;
115 #define OPCODE_CASE(x) case IrOpcode::k##x: 115 #define OPCODE_CASE(x) case IrOpcode::k##x:
116 CONTROL_OP_LIST(OPCODE_CASE) 116 CONTROL_OP_LIST(OPCODE_CASE)
117 #undef OPCODE_CASE 117 #undef OPCODE_CASE
118 return static_cast<const ControlOperator*>(op)->ControlInputCount(); 118 return OpParameter<int>(op);
Michael Starzinger 2014/09/12 11:47:02 This is scarily implicit, can we leave a comment h
Benedikt Meurer 2014/09/12 11:59:08 Done.
119 default: 119 default:
120 // Operators that have write effects must have a control 120 // Operators that have write effects must have a control
121 // dependency. Effect dependencies only ensure the correct order of 121 // dependency. Effect dependencies only ensure the correct order of
122 // write/read operations without consideration of control flow. Without an 122 // write/read operations without consideration of control flow. Without an
123 // explicit control dependency writes can be float in the schedule too 123 // explicit control dependency writes can be float in the schedule too
124 // early along a path that shouldn't generate a side-effect. 124 // early along a path that shouldn't generate a side-effect.
125 return op->HasProperty(Operator::kNoWrite) ? 0 : 1; 125 return op->HasProperty(Operator::kNoWrite) ? 0 : 1;
126 } 126 }
127 return 0; 127 return 0;
128 } 128 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || 173 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop ||
174 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || 174 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue ||
175 opcode == IrOpcode::kIfFalse; 175 opcode == IrOpcode::kIfFalse;
176 } 176 }
177 177
178 } // namespace compiler 178 } // namespace compiler
179 } // namespace internal 179 } // namespace internal
180 } // namespace v8 180 } // namespace v8
181 181
182 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ 182 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
OLDNEW
« no previous file with comments | « src/compiler/operator.cc ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698