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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 bitmask.CountReal() == static_cast<int>(types->size())); | 1225 bitmask.CountReal() == static_cast<int>(types->size())); |
1226 #endif | 1226 #endif |
1227 | 1227 |
1228 return new (zone()) Operator1<TypedStateValueInfo>( // -- | 1228 return new (zone()) Operator1<TypedStateValueInfo>( // -- |
1229 IrOpcode::kTypedStateValues, Operator::kPure, // opcode | 1229 IrOpcode::kTypedStateValues, Operator::kPure, // opcode |
1230 "TypedStateValues", // name | 1230 "TypedStateValues", // name |
1231 static_cast<int>(types->size()), 0, 0, 1, 0, 0, // counts | 1231 static_cast<int>(types->size()), 0, 0, 1, 0, 0, // counts |
1232 TypedStateValueInfo(types, bitmask)); // parameters | 1232 TypedStateValueInfo(types, bitmask)); // parameters |
1233 } | 1233 } |
1234 | 1234 |
1235 const Operator* CommonOperatorBuilder::ArgumentsObjectState() { | 1235 const Operator* CommonOperatorBuilder::ArgumentsElementsState(bool is_rest) { |
1236 return new (zone()) Operator( // -- | 1236 return new (zone()) Operator1<bool>( // -- |
1237 IrOpcode::kArgumentsObjectState, Operator::kPure, // opcode | 1237 IrOpcode::kArgumentsElementsState, Operator::kPure, // opcode |
1238 "ArgumentsObjectState", // name | 1238 "ArgumentsElementsState", // name |
1239 0, 0, 0, 1, 0, 0); // counts | 1239 0, 0, 0, 1, 0, 0, is_rest); // counts |
| 1240 } |
| 1241 |
| 1242 bool IsRestOf(Operator const* op) { |
| 1243 DCHECK(op->opcode() == IrOpcode::kArgumentsElementsState); |
| 1244 return OpParameter<bool>(op); |
1240 } | 1245 } |
1241 | 1246 |
1242 const Operator* CommonOperatorBuilder::ObjectState(int pointer_slots) { | 1247 const Operator* CommonOperatorBuilder::ObjectState(int pointer_slots) { |
1243 return new (zone()) Operator1<int>( // -- | 1248 return new (zone()) Operator1<int>( // -- |
1244 IrOpcode::kObjectState, Operator::kPure, // opcode | 1249 IrOpcode::kObjectState, Operator::kPure, // opcode |
1245 "ObjectState", // name | 1250 "ObjectState", // name |
1246 pointer_slots, 0, 0, 1, 0, 0, // counts | 1251 pointer_slots, 0, 0, 1, 0, 0, // counts |
1247 pointer_slots); // parameter | 1252 pointer_slots); // parameter |
1248 } | 1253 } |
1249 | 1254 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 1353 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
1349 FrameStateType type, int parameter_count, int local_count, | 1354 FrameStateType type, int parameter_count, int local_count, |
1350 Handle<SharedFunctionInfo> shared_info) { | 1355 Handle<SharedFunctionInfo> shared_info) { |
1351 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 1356 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
1352 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 1357 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
1353 } | 1358 } |
1354 | 1359 |
1355 } // namespace compiler | 1360 } // namespace compiler |
1356 } // namespace internal | 1361 } // namespace internal |
1357 } // namespace v8 | 1362 } // namespace v8 |
OLD | NEW |