Index: src/hydrogen.h |
diff --git a/src/hydrogen.h b/src/hydrogen.h |
index 97c9a6a21b1ffe9a0fefc8428c9ea1954515294f..086f830faf7769350484c5b44c26f195412f448f 100644 |
--- a/src/hydrogen.h |
+++ b/src/hydrogen.h |
@@ -994,9 +994,27 @@ class HGraphBuilder { |
// Adding instructions. |
HInstruction* AddInstruction(HInstruction* instr); |
+ |
+ template<class I> |
+ I* Add() { return static_cast<I*>(AddInstruction(new(zone()) I())); } |
+ |
+ template<class I, class P1> |
+ I* Add(P1 p1) { |
+ return static_cast<I*>(AddInstruction(new(zone()) I(p1))); |
+ } |
+ |
+ template<class I, class P1, class P2> |
+ I* Add(P1 p1, P2 p2) { |
+ return static_cast<I*>(AddInstruction(new(zone()) I(p1, p2))); |
+ } |
+ |
+ template<class I, class P1, class P2, class P3> |
+ I* Add(P1 p1, P2 p2, P3 p3) { |
+ return static_cast<I*>(AddInstruction(new(zone()) I(p1, p2, p3))); |
+ } |
+ |
void AddSimulate(BailoutId id, |
RemovableSimulate removable = FIXED_SIMULATE); |
- HBoundsCheck* AddBoundsCheck(HValue* index, HValue* length); |
HReturn* AddReturn(HValue* value); |