Index: src/compiler/common-operator.cc |
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc |
index 571775aacee330fb32b9a24226c377696d918b87..aaed01fe5db25d7020eb078947ae873390a46753 100644 |
--- a/src/compiler/common-operator.cc |
+++ b/src/compiler/common-operator.cc |
@@ -191,6 +191,11 @@ RegionObservability RegionObservabilityOf(Operator const* op) { |
return OpParameter<RegionObservability>(op); |
} |
+Type* TypeGuardTypeOf(Operator const* op) { |
+ DCHECK_EQ(IrOpcode::kTypeGuard, op->opcode()); |
+ return OpParameter<Type*>(op); |
+} |
+ |
std::ostream& operator<<(std::ostream& os, |
const ZoneVector<MachineType>* types) { |
// Print all the MachineTypes, separated by commas. |
@@ -798,6 +803,13 @@ const Operator* CommonOperatorBuilder::Phi(MachineRepresentation rep, |
rep); // parameter |
} |
+const Operator* CommonOperatorBuilder::TypeGuard(Type* type) { |
+ return new (zone()) Operator1<Type*>( // -- |
+ IrOpcode::kTypeGuard, Operator::kPure, // opcode |
+ "TypeGuard", // name |
+ 1, 0, 1, 1, 0, 0, // counts |
+ type); // parameter |
+} |
const Operator* CommonOperatorBuilder::EffectPhi(int effect_input_count) { |
DCHECK(effect_input_count > 0); // Disallow empty effect phis. |