Index: src/compiler/node-matchers.h |
diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h |
index fc11a0a8cf03f17e80b7a6d45196badf4e9adc7c..12e31a2adc00fac7b76254dd103947cb6a0bf94e 100644 |
--- a/src/compiler/node-matchers.h |
+++ b/src/compiler/node-matchers.h |
@@ -204,6 +204,39 @@ typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher; |
typedef BinopMatcher<NumberMatcher, NumberMatcher> NumberBinopMatcher; |
+// A pattern matcher for JSCallFunction operations. |
+struct JSCallFunctionMatcher FINAL : public NodeMatcher { |
+ explicit JSCallFunctionMatcher(Node* const node) |
+ : NodeMatcher(node), function_(node->InputAt(0)) { |
+ DCHECK_EQ(IrOpcode::kJSCallFunction, opcode()); |
+ } |
+ |
+ typedef HeapObjectMatcher<JSFunction> Function; |
+ |
+ const Function& function() const { return function_; } |
+ Node* frame_state() const; |
+ |
+ // Formal parameters, including the receiver. |
+ typedef Node::Inputs::iterator const_iterator; |
+ const_iterator begin() const; |
+ const_iterator end() const; |
+ size_t size() const; |
+ |
+ private: |
+ Function const function_; |
+}; |
+ |
+ |
+// A pattern matcher for JSCallRuntime operations. |
+struct JSCallRuntimeMatcher FINAL : public NodeMatcher { |
+ explicit JSCallRuntimeMatcher(Node* const node) : NodeMatcher(node) { |
+ DCHECK_EQ(IrOpcode::kJSCallRuntime, opcode()); |
+ } |
+ |
+ const Runtime::Function* function() const; |
+}; |
+ |
+ |
template <class BinopMatcher, IrOpcode::Value kMulOpcode, |
IrOpcode::Value kShiftOpcode> |
struct ScaleMatcher { |