26#ifndef MYSQLSHDK_SCRIPTING_POLYGLOT_LANGUAGES_POLYGLOT_COMMON_CONTEXT_H_
27#define MYSQLSHDK_SCRIPTING_POLYGLOT_LANGUAGES_POLYGLOT_COMMON_CONTEXT_H_
62 virtual void initialize(
const std::vector<std::string> &isolate_args);
84 virtual void log(
const char *bytes,
size_t length) = 0;
When a Polyglot wrapper for a C++ object is created, a collectable instance is created to be passed t...
Definition: polyglot_collectable.h:113
Common context for GraalVM Languages.
Definition: polyglot_common_context.h:57
virtual ~Polyglot_common_context()=default
poly_thread thread() const
Definition: polyglot_common_context.h:67
virtual void initialize(const std::vector< std::string > &isolate_args)
Definition: polyglot_common_context.cc:59
static void fatal_error_callback(void *data)
Definition: polyglot_common_context.cc:113
Collectable_registry m_registry
Definition: polyglot_common_context.h:90
virtual void finalize()
Definition: polyglot_common_context.cc:97
Polyglot_common_context()=default
poly_isolate m_isolate
Definition: polyglot_common_context.h:74
virtual void fatal_error()=0
void init_engine()
Definition: polyglot_common_context.cc:129
virtual Garbage_collector::Config gc_config()
Definition: polyglot_common_context.h:86
std::unique_ptr< Polyglot_scope > m_scope
Definition: polyglot_common_context.h:89
virtual poly_engine create_engine()
Definition: polyglot_common_context.h:85
poly_reference engine() const
Definition: polyglot_common_context.h:65
Store m_engine
Definition: polyglot_common_context.h:88
virtual void log(const char *bytes, size_t length)=0
poly_isolate isolate() const
Definition: polyglot_common_context.h:66
static void log_callback(const char *bytes, size_t length, void *data)
Definition: polyglot_common_context.cc:123
Collectable_registry * collectable_registry()
Definition: polyglot_common_context.h:71
poly_thread m_thread
Definition: polyglot_common_context.h:75
void clean_collectables()
Definition: polyglot_common_context.cc:136
static void flush_callback(void *data)
Definition: polyglot_common_context.cc:118
Helper class to handle polyglot values made permanent.
Definition: polyglot_store.h:47
poly_reference get() const noexcept
Definition: polyglot_store.h:70
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: file_system_exceptions.h:34
Definition: polyglot_garbage_collector.h:81