OLD | NEW |
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/node.h" | 10 #include "src/compiler/node.h" |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 TypedStateValueInfo(types, bitmask)); // parameters | 1232 TypedStateValueInfo(types, bitmask)); // parameters |
1233 } | 1233 } |
1234 | 1234 |
1235 const Operator* CommonOperatorBuilder::ArgumentsElementsState(bool is_rest) { | 1235 const Operator* CommonOperatorBuilder::ArgumentsElementsState(bool is_rest) { |
1236 return new (zone()) Operator1<bool>( // -- | 1236 return new (zone()) Operator1<bool>( // -- |
1237 IrOpcode::kArgumentsElementsState, Operator::kPure, // opcode | 1237 IrOpcode::kArgumentsElementsState, Operator::kPure, // opcode |
1238 "ArgumentsElementsState", // name | 1238 "ArgumentsElementsState", // name |
1239 0, 0, 0, 1, 0, 0, is_rest); // counts | 1239 0, 0, 0, 1, 0, 0, is_rest); // counts |
1240 } | 1240 } |
1241 | 1241 |
| 1242 const Operator* CommonOperatorBuilder::ArgumentsLengthState(bool is_rest) { |
| 1243 return new (zone()) Operator1<bool>( // -- |
| 1244 IrOpcode::kArgumentsLengthState, Operator::kPure, // opcode |
| 1245 "ArgumentsLengthState", // name |
| 1246 0, 0, 0, 1, 0, 0, is_rest); // counts |
| 1247 } |
| 1248 |
1242 bool IsRestOf(Operator const* op) { | 1249 bool IsRestOf(Operator const* op) { |
1243 DCHECK(op->opcode() == IrOpcode::kArgumentsElementsState); | 1250 DCHECK(op->opcode() == IrOpcode::kArgumentsElementsState || |
| 1251 op->opcode() == IrOpcode::kArgumentsLengthState); |
1244 return OpParameter<bool>(op); | 1252 return OpParameter<bool>(op); |
1245 } | 1253 } |
1246 | 1254 |
1247 const Operator* CommonOperatorBuilder::ObjectState(int pointer_slots) { | 1255 const Operator* CommonOperatorBuilder::ObjectState(int pointer_slots) { |
1248 return new (zone()) Operator1<int>( // -- | 1256 return new (zone()) Operator1<int>( // -- |
1249 IrOpcode::kObjectState, Operator::kPure, // opcode | 1257 IrOpcode::kObjectState, Operator::kPure, // opcode |
1250 "ObjectState", // name | 1258 "ObjectState", // name |
1251 pointer_slots, 0, 0, 1, 0, 0, // counts | 1259 pointer_slots, 0, 0, 1, 0, 0, // counts |
1252 pointer_slots); // parameter | 1260 pointer_slots); // parameter |
1253 } | 1261 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 1361 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
1354 FrameStateType type, int parameter_count, int local_count, | 1362 FrameStateType type, int parameter_count, int local_count, |
1355 Handle<SharedFunctionInfo> shared_info) { | 1363 Handle<SharedFunctionInfo> shared_info) { |
1356 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 1364 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
1357 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 1365 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
1358 } | 1366 } |
1359 | 1367 |
1360 } // namespace compiler | 1368 } // namespace compiler |
1361 } // namespace internal | 1369 } // namespace internal |
1362 } // namespace v8 | 1370 } // namespace v8 |
OLD | NEW |