Index: test/cctest/compiler/call-tester.h |
diff --git a/test/cctest/compiler/call-tester.h b/test/cctest/compiler/call-tester.h |
index dc265ea5fa9da591b34449be9839dddf3e26f84f..31a6d0f93bd7c9c5fc0c8455ccfb182acb469524 100644 |
--- a/test/cctest/compiler/call-tester.h |
+++ b/test/cctest/compiler/call-tester.h |
@@ -304,6 +304,21 @@ class CallHelper { |
Isolate* isolate_; |
}; |
+// A call helper that calls the given code object assuming C calling convention. |
+template <typename T> |
+class CodeRunner : public CallHelper<T> { |
+ public: |
+ CodeRunner(Isolate* isolate, Handle<Code> code, CSignature* csig) |
+ : CallHelper<T>(isolate, csig), code_(code) {} |
+ virtual ~CodeRunner() {} |
+ |
+ virtual byte* Generate() { return code_->entry(); } |
+ |
+ private: |
+ Handle<Code> code_; |
+}; |
+ |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |