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

Side by Side Diff: test/unittests/compiler/machine-operator-unittest.cc

Issue 620803003: [turbofan] Add control input to Load and LoadElements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
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/machine-operator.h" 5 #include "src/compiler/machine-operator.h"
6 #include "src/compiler/operator-properties-inl.h" 6 #include "src/compiler/operator-properties-inl.h"
7 #include "testing/gtest-support.h" 7 #include "testing/gtest-support.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 EXPECT_EQ(machine1.Load(GetParam()), machine2.Load(GetParam())); 52 EXPECT_EQ(machine1.Load(GetParam()), machine2.Load(GetParam()));
53 } 53 }
54 54
55 55
56 TEST_P(MachineLoadOperatorTest, NumberOfInputsAndOutputs) { 56 TEST_P(MachineLoadOperatorTest, NumberOfInputsAndOutputs) {
57 MachineOperatorBuilder machine(type()); 57 MachineOperatorBuilder machine(type());
58 const Operator* op = machine.Load(GetParam()); 58 const Operator* op = machine.Load(GetParam());
59 59
60 EXPECT_EQ(2, OperatorProperties::GetValueInputCount(op)); 60 EXPECT_EQ(2, OperatorProperties::GetValueInputCount(op));
61 EXPECT_EQ(1, OperatorProperties::GetEffectInputCount(op)); 61 EXPECT_EQ(1, OperatorProperties::GetEffectInputCount(op));
62 EXPECT_EQ(0, OperatorProperties::GetControlInputCount(op)); 62 EXPECT_EQ(1, OperatorProperties::GetControlInputCount(op));
63 EXPECT_EQ(3, OperatorProperties::GetTotalInputCount(op)); 63 EXPECT_EQ(4, OperatorProperties::GetTotalInputCount(op));
64 64
65 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); 65 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op));
66 EXPECT_EQ(1, OperatorProperties::GetEffectOutputCount(op)); 66 EXPECT_EQ(1, OperatorProperties::GetEffectOutputCount(op));
67 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); 67 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op));
68 } 68 }
69 69
70 70
71 TEST_P(MachineLoadOperatorTest, OpcodeIsCorrect) { 71 TEST_P(MachineLoadOperatorTest, OpcodeIsCorrect) {
72 MachineOperatorBuilder machine(type()); 72 MachineOperatorBuilder machine(type());
73 EXPECT_EQ(IrOpcode::kLoad, machine.Load(GetParam())->opcode()); 73 EXPECT_EQ(IrOpcode::kLoad, machine.Load(GetParam())->opcode());
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 EXPECT_EQ(machine.Int64UDiv(), machine.IntUDiv()); 303 EXPECT_EQ(machine.Int64UDiv(), machine.IntUDiv());
304 EXPECT_EQ(machine.Int64Mod(), machine.IntMod()); 304 EXPECT_EQ(machine.Int64Mod(), machine.IntMod());
305 EXPECT_EQ(machine.Int64UMod(), machine.IntUMod()); 305 EXPECT_EQ(machine.Int64UMod(), machine.IntUMod());
306 EXPECT_EQ(machine.Int64LessThan(), machine.IntLessThan()); 306 EXPECT_EQ(machine.Int64LessThan(), machine.IntLessThan());
307 EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual()); 307 EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual());
308 } 308 }
309 309
310 } // namespace compiler 310 } // namespace compiler
311 } // namespace internal 311 } // namespace internal
312 } // namespace v8 312 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/graph-unittest.cc ('k') | test/unittests/compiler/simplified-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698