18#if defined(__has_feature)
19#if __has_feature(memory_sanitizer)
20#include <sanitizer/msan_interface.h>
21#define CPPINTEROP_MSAN_UNPOISON_VALUE(v) __msan_unpoison(&(v), sizeof(v))
23#define CPPINTEROP_MSAN_UNPOISON_VALUE(v) ((void)0)
26#define CPPINTEROP_MSAN_UNPOISON_VALUE(v) ((void)0)
35intptr_t
Evaluate(
const char* code,
bool* HadError) {
42 auto res = I->evaluate(code, V);
44 if (res != 0 || !V.hasValue()) {
51 return compat::convertTo<intptr_t>(V);
68 std::vector<Cpp::FuncRef> out;
70 Cpp::CppInterOpArray arr = {
nullptr, out.size()};
72 arr.data =
static_cast<void**
>(malloc(arr.size *
sizeof(
void*)));
73 memcpy(arr.data, out.data(), arr.size *
sizeof(
void*));
intptr_t cppinterop_Evaluate(const char *code, bool *HadError)
C-ABI overload of Cpp::Evaluate.
Cpp::CppInterOpArray cppinterop_GetClassTemplatedMethods(const char *name, CppConstDeclRef parent)
Returns the templated method scopes inside parent matching name.
#define CPPINTEROP_MSAN_UNPOISON_VALUE(v)
bool GetClassTemplatedMethods(const std::string &name, ConstDeclRef parent, std::vector< FuncRef > &funcs)
Box Evaluate(const char *code)
InterpRef GetInterpreter()