Index: src/compiler/js-graph.h |
diff --git a/src/compiler/js-graph.h b/src/compiler/js-graph.h |
index 4f74d6f20c77a11f55a66b59ede2f0a1238da8c5..83e103da6e63eb7fb37df6c7f4b2b87271f528df 100644 |
--- a/src/compiler/js-graph.h |
+++ b/src/compiler/js-graph.h |
@@ -67,6 +67,11 @@ class JSGraph : public ZoneObject { |
return Int32Constant(bit_cast<int32_t>(value)); |
} |
+ // Creates a HeapConstant node for either true or false. |
+ Node* BooleanConstant(bool is_true) { |
+ return is_true ? TrueConstant() : FalseConstant(); |
+ } |
+ |
// Creates a Int64Constant node, usually canonicalized. |
Node* Int64Constant(int64_t value); |
Node* Uint64Constant(uint64_t value) { |