#ifndef V8_COMMON_CALL_TESTER_H_
#define V8_COMMON_CALL_TESTER_H_
#include "src/execution/simulator.h"
#include "src/handles/handles.h"
#include "src/objects/code.h"
#include "test/common/c-signature.h"
namespace v8 {
namespace internal {
namespace compiler {
template <typename R>
class CallHelper { … };
template <>
template <typename... Params>
Tagged<Object> CallHelper<Tagged<Object>>::Call(Params... args) {
CSignature::VerifyParams<Params...>(csig_);
Address entry = Generate();
auto fn = GeneratedCode<Address, Params...>::FromAddress(isolate_, entry);
return Tagged<Object>(fn.Call(args...));
}
template <typename T>
class CodeRunner : public CallHelper<T> { … };
}
}
}
#endif