26#ifndef MYSQLSHDK_SCRIPTING_POLYGLOT_LANGUAGES_POLYGLOT_COMMON_CONTEXT_H_
27#define MYSQLSHDK_SCRIPTING_POLYGLOT_LANGUAGES_POLYGLOT_COMMON_CONTEXT_H_
95 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:65
virtual ~Polyglot_common_context()=default
poly_thread thread() const
Definition: polyglot_common_context.h:75
static void fatal_error_callback(void *data)
Definition: polyglot_common_context.cc:204
std::vector< int64_t * > m_generation_used
Definition: polyglot_common_context.h:106
int64_t * m_heap_status
Definition: polyglot_common_context.h:103
Collectable_registry m_registry
Definition: polyglot_common_context.h:101
std::string get_gc_status()
Definition: polyglot_common_context.cc:177
virtual void finalize()
Definition: polyglot_common_context.cc:188
Polyglot_common_context()=default
poly_isolate m_isolate
Definition: polyglot_common_context.h:85
virtual void fatal_error()=0
void init_engine()
Definition: polyglot_common_context.cc:220
virtual Garbage_collector::Config gc_config()
Definition: polyglot_common_context.h:97
std::unique_ptr< Polyglot_scope > m_scope
Definition: polyglot_common_context.h:100
virtual poly_engine create_engine()
Definition: polyglot_common_context.h:96
poly_reference engine() const
Definition: polyglot_common_context.h:73
Store m_engine
Definition: polyglot_common_context.h:99
int64_t m_max_heap_size
Definition: polyglot_common_context.h:102
double get_heap_usage_percent()
Definition: polyglot_common_context.cc:163
virtual void log(const char *bytes, size_t length)=0
poly_isolate isolate() const
Definition: polyglot_common_context.h:74
static void log_callback(const char *bytes, size_t length, void *data)
Definition: polyglot_common_context.cc:214
Collectable_registry * collectable_registry()
Definition: polyglot_common_context.h:79
poly_thread m_thread
Definition: polyglot_common_context.h:86
virtual void initialize(const IsolateArgs &isolate_args)
Definition: polyglot_common_context.cc:63
void clean_collectables()
Definition: polyglot_common_context.cc:227
static void flush_callback(void *data)
Definition: polyglot_common_context.cc:209
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
Definition: polyglot_common_context.h:42
std::optional< uint64_t > min_heap_size
Definition: polyglot_common_context.h:44
std::optional< uint64_t > max_new_size
Definition: polyglot_common_context.h:46
std::optional< uint64_t > max_heap_size
Definition: polyglot_common_context.h:45