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

Unified Diff: test/unittests/compiler/node-test-utils.cc

Issue 1456483002: [Interpreter] Add New, CallRuntime and CallJSRuntime support to BytecodeGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rmcilroy-0001-globals
Patch Set: Rebase Created 5 years, 1 month 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
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/node-test-utils.cc
diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc
index 00050075c676b9ccb861af5c359dc21bdfda3d4a..713a4bc440889231b58a93f42e8490898c1442b7 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -1805,12 +1805,13 @@ class IsJSStorePropertyMatcher final : public NodeMatcher {
};
-class IsJSCallFunctionMatcher final : public NodeMatcher {
+class IsJSCallMatcher final : public NodeMatcher {
public:
- IsJSCallFunctionMatcher(const std::vector<Matcher<Node*>>& value_matchers,
- const Matcher<Node*>& effect_matcher,
- const Matcher<Node*>& control_matcher)
- : NodeMatcher(IrOpcode::kJSCallFunction),
+ IsJSCallMatcher(IrOpcode::Value op_code,
+ const std::vector<Matcher<Node*>>& value_matchers,
+ const Matcher<Node*>& effect_matcher,
+ const Matcher<Node*>& control_matcher)
+ : NodeMatcher(op_code),
value_matchers_(value_matchers),
effect_matcher_(effect_matcher),
control_matcher_(control_matcher) {}
@@ -2472,11 +2473,21 @@ Matcher<Node*> IsJSStoreGlobal(const Handle<Name> name,
}
+Matcher<Node*> IsJSCallConstruct(std::vector<Matcher<Node*>> value_matchers,
+ const Matcher<Node*>& effect_matcher,
+ const Matcher<Node*>& control_matcher) {
+ return MakeMatcher(new IsJSCallMatcher(IrOpcode::kJSCallConstruct,
+ value_matchers, effect_matcher,
+ control_matcher));
+}
+
+
Matcher<Node*> IsJSCallFunction(std::vector<Matcher<Node*>> value_matchers,
const Matcher<Node*>& effect_matcher,
const Matcher<Node*>& control_matcher) {
- return MakeMatcher(new IsJSCallFunctionMatcher(value_matchers, effect_matcher,
- control_matcher));
+ return MakeMatcher(new IsJSCallMatcher(IrOpcode::kJSCallFunction,
+ value_matchers, effect_matcher,
+ control_matcher));
}
@@ -2514,6 +2525,16 @@ Matcher<Node*> IsJSStoreProperty(const Matcher<Node*>& object_matcher,
effect_matcher, control_matcher));
}
+
+Matcher<Node*> IsJSCallRuntime(std::vector<Matcher<Node*>> value_matchers,
+ const Matcher<Node*>& effect_matcher,
+ const Matcher<Node*>& control_matcher) {
+ return MakeMatcher(new IsJSCallMatcher(IrOpcode::kJSCallRuntime,
+ value_matchers, effect_matcher,
+ control_matcher));
+}
+
+
#define IS_BINOP_MATCHER(Name) \
Matcher<Node*> Is##Name(const Matcher<Node*>& lhs_matcher, \
const Matcher<Node*>& rhs_matcher) { \
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698