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

Unified Diff: test/unittests/compiler/js-operator-unittest.cc

Issue 928213003: Model exceptional edges from call nodes in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: test/unittests/compiler/js-operator-unittest.cc
diff --git a/test/unittests/compiler/js-operator-unittest.cc b/test/unittests/compiler/js-operator-unittest.cc
index 8f4622ae6773abdd5e01280b9a86e31983c0d2ac..ef0a4df740f02f9f6acb2e1a9186f053184edaf3 100644
--- a/test/unittests/compiler/js-operator-unittest.cc
+++ b/test/unittests/compiler/js-operator-unittest.cc
@@ -28,6 +28,7 @@ struct SharedOperator {
int control_input_count;
int value_output_count;
int effect_output_count;
+ int control_output_count;
};
@@ -39,48 +40,49 @@ std::ostream& operator<<(std::ostream& os, const SharedOperator& sop) {
const SharedOperator kSharedOperators[] = {
#define SHARED(Name, properties, value_input_count, frame_state_input_count, \
effect_input_count, control_input_count, value_output_count, \
- effect_output_count) \
+ effect_output_count, control_output_count) \
{ \
&JSOperatorBuilder::Name, IrOpcode::kJS##Name, properties, \
value_input_count, frame_state_input_count, effect_input_count, \
- control_input_count, value_output_count, effect_output_count \
+ control_input_count, value_output_count, effect_output_count, \
+ control_output_count \
}
- SHARED(Equal, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(NotEqual, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(StrictEqual, Operator::kPure, 2, 0, 0, 0, 1, 0),
- SHARED(StrictNotEqual, Operator::kPure, 2, 0, 0, 0, 1, 0),
- SHARED(LessThan, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(GreaterThan, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(LessThanOrEqual, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(GreaterThanOrEqual, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(BitwiseOr, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(BitwiseXor, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(BitwiseAnd, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(ShiftLeft, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(ShiftRight, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(ShiftRightLogical, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(Add, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(Subtract, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(Multiply, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(Divide, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(Modulus, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(UnaryNot, Operator::kPure, 1, 0, 0, 0, 1, 0),
- SHARED(ToBoolean, Operator::kPure, 1, 0, 0, 0, 1, 0),
- SHARED(ToNumber, Operator::kNoProperties, 1, 1, 1, 1, 1, 1),
- SHARED(ToString, Operator::kNoProperties, 1, 0, 1, 1, 1, 1),
- SHARED(ToName, Operator::kNoProperties, 1, 1, 1, 1, 1, 1),
- SHARED(ToObject, Operator::kNoProperties, 1, 1, 1, 1, 1, 1),
- SHARED(Yield, Operator::kNoProperties, 1, 0, 1, 1, 1, 1),
- SHARED(Create, Operator::kEliminatable, 0, 0, 1, 1, 1, 1),
- SHARED(HasProperty, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(TypeOf, Operator::kPure, 1, 0, 0, 0, 1, 0),
- SHARED(InstanceOf, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(Debugger, Operator::kNoProperties, 0, 0, 1, 1, 0, 1),
- SHARED(CreateFunctionContext, Operator::kNoProperties, 1, 0, 1, 1, 1, 1),
- SHARED(CreateWithContext, Operator::kNoProperties, 2, 1, 1, 1, 1, 1),
- SHARED(CreateBlockContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1),
- SHARED(CreateModuleContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1),
- SHARED(CreateScriptContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1)
+ SHARED(Equal, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(NotEqual, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(StrictEqual, Operator::kPure, 2, 0, 0, 0, 1, 0, 0),
+ SHARED(StrictNotEqual, Operator::kPure, 2, 0, 0, 0, 1, 0, 0),
+ SHARED(LessThan, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(GreaterThan, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(LessThanOrEqual, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(GreaterThanOrEqual, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(BitwiseOr, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(BitwiseXor, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(BitwiseAnd, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(ShiftLeft, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(ShiftRight, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(ShiftRightLogical, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(Add, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(Subtract, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(Multiply, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(Divide, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(Modulus, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(UnaryNot, Operator::kPure, 1, 0, 0, 0, 1, 0, 0),
+ SHARED(ToBoolean, Operator::kPure, 1, 0, 0, 0, 1, 0, 0),
+ SHARED(ToNumber, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
+ SHARED(ToString, Operator::kNoProperties, 1, 0, 1, 1, 1, 1, 2),
+ SHARED(ToName, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
+ SHARED(ToObject, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
+ SHARED(Yield, Operator::kNoProperties, 1, 0, 1, 1, 1, 1, 2),
+ SHARED(Create, Operator::kEliminatable, 0, 0, 1, 1, 1, 1, 0),
+ SHARED(HasProperty, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(TypeOf, Operator::kPure, 1, 0, 0, 0, 1, 0, 0),
+ SHARED(InstanceOf, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(Debugger, Operator::kNoProperties, 0, 0, 1, 1, 0, 1, 2),
+ SHARED(CreateFunctionContext, Operator::kNoProperties, 1, 0, 1, 1, 1, 1, 2),
+ SHARED(CreateWithContext, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
+ SHARED(CreateBlockContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2),
+ SHARED(CreateModuleContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2),
+ SHARED(CreateScriptContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2)
#undef SHARED
};
@@ -122,7 +124,7 @@ TEST_P(JSSharedOperatorTest, NumberOfInputsAndOutputs) {
EXPECT_EQ(sop.value_output_count, op->ValueOutputCount());
EXPECT_EQ(sop.effect_output_count, op->EffectOutputCount());
- EXPECT_EQ(0, op->ControlOutputCount());
+ EXPECT_EQ(sop.control_output_count, op->ControlOutputCount());
}
@@ -181,7 +183,7 @@ TEST_P(JSStorePropertyOperatorTest, NumberOfInputsAndOutputs) {
EXPECT_EQ(0, op->ValueOutputCount());
EXPECT_EQ(1, op->EffectOutputCount());
- EXPECT_EQ(0, op->ControlOutputCount());
+ EXPECT_EQ(2, op->ControlOutputCount());
}
« no previous file with comments | « test/unittests/compiler/common-operator-unittest.cc ('k') | test/unittests/compiler/node-properties-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698