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 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 } else if (op->opcode() == IrOpcode::kMerge) { | 1346 } else if (op->opcode() == IrOpcode::kMerge) { |
1347 return Merge(size); | 1347 return Merge(size); |
1348 } else if (op->opcode() == IrOpcode::kLoop) { | 1348 } else if (op->opcode() == IrOpcode::kLoop) { |
1349 return Loop(size); | 1349 return Loop(size); |
1350 } else { | 1350 } else { |
1351 UNREACHABLE(); | 1351 UNREACHABLE(); |
1352 return nullptr; | 1352 return nullptr; |
1353 } | 1353 } |
1354 } | 1354 } |
1355 | 1355 |
1356 const Operator* CommonOperatorBuilder::Int32x4ExtractLane(int32_t lane_number) { | |
1357 DCHECK(0 <= lane_number && lane_number < 4); | |
1358 return new (zone()) Operator1<int32_t>( // -- | |
1359 IrOpcode::kInt32x4ExtractLane, Operator::kPure, // opcode | |
1360 "Int32x4ExtractLane", // name | |
1361 1, 0, 0, 1, 0, 0, // counts | |
1362 lane_number); // parameter | |
1363 } | |
1364 | |
1365 const Operator* CommonOperatorBuilder::Int32x4ReplaceLane(int32_t lane_number) { | |
1366 DCHECK(0 <= lane_number && lane_number < 4); | |
1367 return new (zone()) Operator1<int32_t>( // -- | |
1368 IrOpcode::kInt32x4ReplaceLane, Operator::kPure, // opcode | |
1369 "Int32x4ReplaceLane", // name | |
1370 2, 0, 0, 1, 0, 0, // counts | |
1371 lane_number); // parameter | |
1372 } | |
1373 | |
1374 const Operator* CommonOperatorBuilder::Float32x4ExtractLane( | |
1375 int32_t lane_number) { | |
1376 DCHECK(0 <= lane_number && lane_number < 4); | |
1377 return new (zone()) Operator1<int32_t>( // -- | |
1378 IrOpcode::kFloat32x4ExtractLane, Operator::kPure, // opcode | |
1379 "Float32x4ExtractLane", // name | |
1380 1, 0, 0, 1, 0, 0, // counts | |
1381 lane_number); // parameter | |
1382 } | |
1383 | |
1384 const Operator* CommonOperatorBuilder::Float32x4ReplaceLane( | |
1385 int32_t lane_number) { | |
1386 DCHECK(0 <= lane_number && lane_number < 4); | |
1387 return new (zone()) Operator1<int32_t>( // -- | |
1388 IrOpcode::kFloat32x4ReplaceLane, Operator::kPure, // opcode | |
1389 "Float32x4ReplaceLane", // name | |
1390 2, 0, 0, 1, 0, 0, // counts | |
1391 lane_number); // parameter | |
1392 } | |
1393 | |
1394 const FrameStateFunctionInfo* | 1356 const FrameStateFunctionInfo* |
1395 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 1357 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
1396 FrameStateType type, int parameter_count, int local_count, | 1358 FrameStateType type, int parameter_count, int local_count, |
1397 Handle<SharedFunctionInfo> shared_info) { | 1359 Handle<SharedFunctionInfo> shared_info) { |
1398 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 1360 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
1399 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 1361 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
1400 } | 1362 } |
1401 | 1363 |
1402 } // namespace compiler | 1364 } // namespace compiler |
1403 } // namespace internal | 1365 } // namespace internal |
1404 } // namespace v8 | 1366 } // namespace v8 |
OLD | NEW |