blob: 7734923265d7e61952649309ad6fe8e3cec6d1c4 [file] [log] [blame]
/* ./tests/suites/toyir/tsf_ir.c -- generated by tsf_define from ./tests/suites/toyir/tsf_ir.t */
#include "tsf_ir.h"
#include "tsf_define_helpers.h"
#include <stdio.h>
static tsf_type_t *Operand__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Type__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *CodeOffset__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *VariableDecl__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *DebugData__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Procedure__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *ProcedureDecl__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *ProcedureDefn__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *ProgramElement__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Program__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__mov__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__add__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__alloc__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__ret__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__jump__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__call__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__call__args__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *integer__array__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__branchZero__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *ProcedureDefn__variables__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *VariableDecl__array__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *ProcedureDefn__code__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Instruction__array__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *ProcedureDefn__debug__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *DebugData__array__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *Program__globals__build_type(void) TSF_ATTRIBUTE_NOINLINE;
static tsf_type_t *ProgramElement__array__build_type(void) TSF_ATTRIBUTE_NOINLINE;
tsf_type_t *Operand__build_type(void) {
tsf_type_t *result = tsf_type_create_aoe(TSF_TK_INTEGER);
return result;
}
tsf_type_t *Type__build_type(void) {
tsf_type_t *result = tsf_type_create_aoe(TSF_TK_STRING);
return result;
}
tsf_type_t *CodeOffset__build_type(void) {
tsf_type_t *result = tsf_type_create_aoe(TSF_TK_INTEGER);
return result;
}
tsf_type_t *VariableDecl__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(VariableDecl_t), (void(*)(void*))VariableDecl__destruct);
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "type", Type__get_type, tsf_offsetof(VariableDecl_t, type));
tsf_struct_type_append_primitive_with_native_map_aoe(&result, "name", TSF_TK_STRING, tsf_offsetof(VariableDecl_t, name));
tsf_type_set_name_aoe(&result, "VariableDecl");
return result;
}
tsf_type_t *Instruction__build_type(void) {
tsf_type_t *result = tsf_type_create_choice_with_native_map_aoe(&result, tsf_true, tsf_offsetof(Instruction_t, value), tsf_offsetof(Instruction_t, u), sizeof(Instruction_t));
tsf_choice_type_append_primitive_aoe(&result, "nop", TSF_TK_VOID);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "mov", Instruction__mov__get_type);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "add", Instruction__add__get_type);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "alloc", Instruction__alloc__get_type);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "ret", Instruction__ret__get_type);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "jump", Instruction__jump__get_type);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "call", Instruction__call__get_type);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "branchZero", Instruction__branchZero__get_type);
tsf_type_set_name_aoe(&result, "Instruction");
return result;
}
tsf_type_t *Instruction__mov__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_aoe(sizeof(Instruction__mov_t));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "dest", Operand__get_type, tsf_offsetof(Instruction__mov_t, dest));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "src", Operand__get_type, tsf_offsetof(Instruction__mov_t, src));
tsf_type_set_name_aoe(&result, "Instruction__mov");
return result;
}
tsf_type_t *Instruction__add__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_aoe(sizeof(Instruction__add_t));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "dest", Operand__get_type, tsf_offsetof(Instruction__add_t, dest));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "src", Operand__get_type, tsf_offsetof(Instruction__add_t, src));
tsf_type_set_name_aoe(&result, "Instruction__add");
return result;
}
tsf_type_t *Instruction__alloc__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(Instruction__alloc_t), (void(*)(void*))Instruction__alloc__destruct);
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "type", Type__get_type, tsf_offsetof(Instruction__alloc_t, type));
tsf_type_set_name_aoe(&result, "Instruction__alloc");
return result;
}
tsf_type_t *Instruction__ret__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_aoe(sizeof(Instruction__ret_t));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "src", Operand__get_type, tsf_offsetof(Instruction__ret_t, src));
tsf_type_set_name_aoe(&result, "Instruction__ret");
return result;
}
tsf_type_t *Instruction__jump__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_aoe(sizeof(Instruction__jump_t));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "target", CodeOffset__get_type, tsf_offsetof(Instruction__jump_t, target));
tsf_type_set_name_aoe(&result, "Instruction__jump");
return result;
}
tsf_type_t *Instruction__call__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(Instruction__call_t), (void(*)(void*))Instruction__call__destruct);
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "dest", Operand__get_type, tsf_offsetof(Instruction__call_t, dest));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "callee", Operand__get_type, tsf_offsetof(Instruction__call_t, callee));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "args", Instruction__call__args__get_type, tsf_offsetof(Instruction__call_t, args));
tsf_type_set_name_aoe(&result, "Instruction__call");
return result;
}
tsf_type_t *integer__array__build_type(void) {
tsf_type_t *result = tsf_type_create_array_aoe(tsf_type_create_aoe(TSF_TK_INTEGER));
return result;
}
tsf_type_t *Instruction__branchZero__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_aoe(sizeof(Instruction__branchZero_t));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "src", Operand__get_type, tsf_offsetof(Instruction__branchZero_t, src));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "target", CodeOffset__get_type, tsf_offsetof(Instruction__branchZero_t, target));
tsf_type_set_name_aoe(&result, "Instruction__branchZero");
return result;
}
tsf_type_t *DebugData__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(DebugData_t), (void(*)(void*))DebugData__destruct);
tsf_struct_type_append_primitive_with_native_map_aoe(&result, "startOffset", TSF_TK_INTEGER, tsf_offsetof(DebugData_t, startOffset));
tsf_struct_type_append_primitive_with_native_map_aoe(&result, "spanSize", TSF_TK_INTEGER, tsf_offsetof(DebugData_t, spanSize));
tsf_struct_type_append_primitive_with_native_map_aoe(&result, "data", TSF_TK_STRING, tsf_offsetof(DebugData_t, data));
tsf_type_set_name_aoe(&result, "DebugData");
return result;
}
tsf_type_t *Procedure__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(Procedure_t), (void(*)(void*))Procedure__destruct);
tsf_struct_type_append_primitive_with_native_map_aoe(&result, "name", TSF_TK_STRING, tsf_offsetof(Procedure_t, name));
tsf_type_set_name_aoe(&result, "Procedure");
return result;
}
tsf_type_t *ProcedureDecl__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(ProcedureDecl_t), (void(*)(void*))ProcedureDecl__destruct);
tsf_struct_type_append_primitive_with_native_map_aoe(&result, "name", TSF_TK_STRING, tsf_offsetof(ProcedureDecl_t, name));
tsf_type_set_name_aoe(&result, "ProcedureDecl");
return result;
}
tsf_type_t *ProcedureDefn__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(ProcedureDefn_t), (void(*)(void*))ProcedureDefn__destruct);
tsf_struct_type_append_primitive_with_native_map_aoe(&result, "name", TSF_TK_STRING, tsf_offsetof(ProcedureDefn_t, name));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "variables", ProcedureDefn__variables__get_type, tsf_offsetof(ProcedureDefn_t, variables));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "code", ProcedureDefn__code__get_type, tsf_offsetof(ProcedureDefn_t, code));
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "debug", ProcedureDefn__debug__get_type, tsf_offsetof(ProcedureDefn_t, debug));
tsf_type_set_name_aoe(&result, "ProcedureDefn");
return result;
}
tsf_type_t *VariableDecl__array__build_type(void) {
tsf_type_t *result = tsf_type_create_array_aoe(tsf_type_dup(VariableDecl__get_type()));
return result;
}
tsf_type_t *Instruction__array__build_type(void) {
tsf_type_t *result = tsf_type_create_array_aoe(tsf_type_dup(Instruction__get_type()));
return result;
}
tsf_type_t *DebugData__array__build_type(void) {
tsf_type_t *result = tsf_type_create_array_aoe(tsf_type_dup(DebugData__get_type()));
return result;
}
tsf_type_t *ProgramElement__build_type(void) {
tsf_type_t *result = tsf_type_create_choice_with_native_map_aoe(&result, tsf_true, tsf_offsetof(ProgramElement_t, value), tsf_offsetof(ProgramElement_t, u), sizeof(ProgramElement_t));
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "procedureDecl", ProcedureDecl__get_type);
tsf_choice_type_append_from_callback_and_dup_aoe(&result, "procedureDefn", ProcedureDefn__get_type);
tsf_type_set_name_aoe(&result, "ProgramElement");
return result;
}
tsf_type_t *Program__build_type(void) {
tsf_type_t *result = tsf_type_create_struct_with_native_size_and_destructor_aoe(sizeof(Program_t), (void(*)(void*))Program__destruct);
tsf_struct_type_append_from_callback_and_dup_with_native_map_aoe(&result, "globals", Program__globals__get_type, tsf_offsetof(Program_t, globals));
tsf_type_set_name_aoe(&result, "Program");
return result;
}
tsf_type_t *ProgramElement__array__build_type(void) {
tsf_type_t *result = tsf_type_create_array_aoe(tsf_type_dup(ProgramElement__get_type()));
return result;
}
tsf_type_t *Instruction__call__args__build_type(void) {
tsf_type_t *result = tsf_type_dup(integer__array__get_type());
return result;
}
tsf_type_t *ProcedureDefn__variables__build_type(void) {
tsf_type_t *result = tsf_type_dup(VariableDecl__array__get_type());
return result;
}
tsf_type_t *ProcedureDefn__code__build_type(void) {
tsf_type_t *result = tsf_type_dup(Instruction__array__get_type());
return result;
}
tsf_type_t *ProcedureDefn__debug__build_type(void) {
tsf_type_t *result = tsf_type_dup(DebugData__array__get_type());
return result;
}
tsf_type_t *Program__globals__build_type(void) {
tsf_type_t *result = tsf_type_dup(ProgramElement__array__get_type());
return result;
}
static tsf_type_t * volatile Operand__type = NULL;
static tsf_genrtr_t * volatile Operand__genrtr = NULL;
static tsf_parser_t * volatile Operand__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Operand__type__oc = PTHREAD_ONCE_INIT;
static void Operand__type__builder(void) {
Operand__type = Operand__build_type();
}
#else
static void *Operand__type__builder(void) {
return Operand__build_type();
}
#endif
tsf_type_t *Operand__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Operand__type, Operand__type__builder);
#else
pthread_once(&Operand__type__oc, Operand__type__builder);
return Operand__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Operand__genrtr__oc = PTHREAD_ONCE_INIT;
static void Operand__genrtr__builder(void) {
Operand__genrtr = tsf_generator_create(Operand__get_type());
}
#else
static void *Operand__genrtr__builder(void) {
return tsf_generator_create(Operand__get_type());
}
#endif
tsf_genrtr_t *Operand__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&Operand__genrtr, Operand__genrtr__builder);
#else
pthread_once(&Operand__genrtr__oc, Operand__genrtr__builder);
return Operand__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Operand__parser__oc = PTHREAD_ONCE_INIT;
static void Operand__parser__builder(void) {
Operand__parser = tsf_parser_create(Operand__get_type());
}
#else
static void *Operand__parser__builder(void) {
return tsf_parser_create(Operand__get_type());
}
#endif
tsf_parser_t *Operand__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&Operand__parser, Operand__parser__builder);
#else
pthread_once(&Operand__parser__oc, Operand__parser__builder);
return Operand__parser;
#endif
}
tsf_bool_t Operand__write(tsf_stream_file_output_t *out, Operand_t *data) {
return tsf_typed_data_write(out, Operand__get_generator(), data);
}
Operand_t *Operand__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, Operand__get_parser());
}
tsf_bool_t Operand__read_into(tsf_stream_file_input_t *in, Operand_t *result) {
return tsf_typed_data_read_into(in, Operand__get_parser(), result);
}
static tsf_type_t * volatile Type__type = NULL;
static tsf_genrtr_t * volatile Type__genrtr = NULL;
static tsf_parser_t * volatile Type__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Type__type__oc = PTHREAD_ONCE_INIT;
static void Type__type__builder(void) {
Type__type = Type__build_type();
}
#else
static void *Type__type__builder(void) {
return Type__build_type();
}
#endif
tsf_type_t *Type__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Type__type, Type__type__builder);
#else
pthread_once(&Type__type__oc, Type__type__builder);
return Type__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Type__genrtr__oc = PTHREAD_ONCE_INIT;
static void Type__genrtr__builder(void) {
Type__genrtr = tsf_generator_create(Type__get_type());
}
#else
static void *Type__genrtr__builder(void) {
return tsf_generator_create(Type__get_type());
}
#endif
tsf_genrtr_t *Type__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&Type__genrtr, Type__genrtr__builder);
#else
pthread_once(&Type__genrtr__oc, Type__genrtr__builder);
return Type__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Type__parser__oc = PTHREAD_ONCE_INIT;
static void Type__parser__builder(void) {
Type__parser = tsf_parser_create(Type__get_type());
}
#else
static void *Type__parser__builder(void) {
return tsf_parser_create(Type__get_type());
}
#endif
tsf_parser_t *Type__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&Type__parser, Type__parser__builder);
#else
pthread_once(&Type__parser__oc, Type__parser__builder);
return Type__parser;
#endif
}
void Type__destruct(Type_t *data) {
free(*data);
}
tsf_bool_t Type__write(tsf_stream_file_output_t *out, Type_t *data) {
return tsf_typed_data_write(out, Type__get_generator(), data);
}
Type_t *Type__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, Type__get_parser());
}
tsf_bool_t Type__read_into(tsf_stream_file_input_t *in, Type_t *result) {
return tsf_typed_data_read_into(in, Type__get_parser(), result);
}
static tsf_type_t * volatile CodeOffset__type = NULL;
static tsf_genrtr_t * volatile CodeOffset__genrtr = NULL;
static tsf_parser_t * volatile CodeOffset__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t CodeOffset__type__oc = PTHREAD_ONCE_INIT;
static void CodeOffset__type__builder(void) {
CodeOffset__type = CodeOffset__build_type();
}
#else
static void *CodeOffset__type__builder(void) {
return CodeOffset__build_type();
}
#endif
tsf_type_t *CodeOffset__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&CodeOffset__type, CodeOffset__type__builder);
#else
pthread_once(&CodeOffset__type__oc, CodeOffset__type__builder);
return CodeOffset__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t CodeOffset__genrtr__oc = PTHREAD_ONCE_INIT;
static void CodeOffset__genrtr__builder(void) {
CodeOffset__genrtr = tsf_generator_create(CodeOffset__get_type());
}
#else
static void *CodeOffset__genrtr__builder(void) {
return tsf_generator_create(CodeOffset__get_type());
}
#endif
tsf_genrtr_t *CodeOffset__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&CodeOffset__genrtr, CodeOffset__genrtr__builder);
#else
pthread_once(&CodeOffset__genrtr__oc, CodeOffset__genrtr__builder);
return CodeOffset__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t CodeOffset__parser__oc = PTHREAD_ONCE_INIT;
static void CodeOffset__parser__builder(void) {
CodeOffset__parser = tsf_parser_create(CodeOffset__get_type());
}
#else
static void *CodeOffset__parser__builder(void) {
return tsf_parser_create(CodeOffset__get_type());
}
#endif
tsf_parser_t *CodeOffset__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&CodeOffset__parser, CodeOffset__parser__builder);
#else
pthread_once(&CodeOffset__parser__oc, CodeOffset__parser__builder);
return CodeOffset__parser;
#endif
}
tsf_bool_t CodeOffset__write(tsf_stream_file_output_t *out, CodeOffset_t *data) {
return tsf_typed_data_write(out, CodeOffset__get_generator(), data);
}
CodeOffset_t *CodeOffset__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, CodeOffset__get_parser());
}
tsf_bool_t CodeOffset__read_into(tsf_stream_file_input_t *in, CodeOffset_t *result) {
return tsf_typed_data_read_into(in, CodeOffset__get_parser(), result);
}
static tsf_type_t * volatile VariableDecl__type = NULL;
static tsf_genrtr_t * volatile VariableDecl__genrtr = NULL;
static tsf_parser_t * volatile VariableDecl__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t VariableDecl__type__oc = PTHREAD_ONCE_INIT;
static void VariableDecl__type__builder(void) {
VariableDecl__type = VariableDecl__build_type();
}
#else
static void *VariableDecl__type__builder(void) {
return VariableDecl__build_type();
}
#endif
tsf_type_t *VariableDecl__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&VariableDecl__type, VariableDecl__type__builder);
#else
pthread_once(&VariableDecl__type__oc, VariableDecl__type__builder);
return VariableDecl__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t VariableDecl__genrtr__oc = PTHREAD_ONCE_INIT;
static void VariableDecl__genrtr__builder(void) {
VariableDecl__genrtr = tsf_generator_create(VariableDecl__get_type());
}
#else
static void *VariableDecl__genrtr__builder(void) {
return tsf_generator_create(VariableDecl__get_type());
}
#endif
tsf_genrtr_t *VariableDecl__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&VariableDecl__genrtr, VariableDecl__genrtr__builder);
#else
pthread_once(&VariableDecl__genrtr__oc, VariableDecl__genrtr__builder);
return VariableDecl__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t VariableDecl__parser__oc = PTHREAD_ONCE_INIT;
static void VariableDecl__parser__builder(void) {
VariableDecl__parser = tsf_parser_create(VariableDecl__get_type());
}
#else
static void *VariableDecl__parser__builder(void) {
return tsf_parser_create(VariableDecl__get_type());
}
#endif
tsf_parser_t *VariableDecl__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&VariableDecl__parser, VariableDecl__parser__builder);
#else
pthread_once(&VariableDecl__parser__oc, VariableDecl__parser__builder);
return VariableDecl__parser;
#endif
}
void VariableDecl__destruct(VariableDecl_t *data) {
Type__destruct(&data->type);
free(*&data->name);
}
tsf_bool_t VariableDecl__write(tsf_stream_file_output_t *out, VariableDecl_t *data) {
return tsf_typed_data_write(out, VariableDecl__get_generator(), data);
}
VariableDecl_t *VariableDecl__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, VariableDecl__get_parser());
}
tsf_bool_t VariableDecl__read_into(tsf_stream_file_input_t *in, VariableDecl_t *result) {
return tsf_typed_data_read_into(in, VariableDecl__get_parser(), result);
}
static tsf_type_t * volatile Instruction__type = NULL;
static tsf_genrtr_t * volatile Instruction__genrtr = NULL;
static tsf_parser_t * volatile Instruction__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__type__builder(void) {
Instruction__type = Instruction__build_type();
}
#else
static void *Instruction__type__builder(void) {
return Instruction__build_type();
}
#endif
tsf_type_t *Instruction__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__type, Instruction__type__builder);
#else
pthread_once(&Instruction__type__oc, Instruction__type__builder);
return Instruction__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__genrtr__oc = PTHREAD_ONCE_INIT;
static void Instruction__genrtr__builder(void) {
Instruction__genrtr = tsf_generator_create(Instruction__get_type());
}
#else
static void *Instruction__genrtr__builder(void) {
return tsf_generator_create(Instruction__get_type());
}
#endif
tsf_genrtr_t *Instruction__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&Instruction__genrtr, Instruction__genrtr__builder);
#else
pthread_once(&Instruction__genrtr__oc, Instruction__genrtr__builder);
return Instruction__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__parser__oc = PTHREAD_ONCE_INIT;
static void Instruction__parser__builder(void) {
Instruction__parser = tsf_parser_create(Instruction__get_type());
}
#else
static void *Instruction__parser__builder(void) {
return tsf_parser_create(Instruction__get_type());
}
#endif
tsf_parser_t *Instruction__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&Instruction__parser, Instruction__parser__builder);
#else
pthread_once(&Instruction__parser__oc, Instruction__parser__builder);
return Instruction__parser;
#endif
}
void Instruction__destruct(Instruction_t *data) {
switch (data->value) {
case 3:
Instruction__alloc__destruct(&data->u.alloc);
break;
case 6:
Instruction__call__destruct(&data->u.call);
break;
default:
break;
}
}
tsf_bool_t Instruction__write(tsf_stream_file_output_t *out, Instruction_t *data) {
return tsf_typed_data_write(out, Instruction__get_generator(), data);
}
Instruction_t *Instruction__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, Instruction__get_parser());
}
tsf_bool_t Instruction__read_into(tsf_stream_file_input_t *in, Instruction_t *result) {
return tsf_typed_data_read_into(in, Instruction__get_parser(), result);
}
static tsf_type_t * volatile DebugData__type = NULL;
static tsf_genrtr_t * volatile DebugData__genrtr = NULL;
static tsf_parser_t * volatile DebugData__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t DebugData__type__oc = PTHREAD_ONCE_INIT;
static void DebugData__type__builder(void) {
DebugData__type = DebugData__build_type();
}
#else
static void *DebugData__type__builder(void) {
return DebugData__build_type();
}
#endif
tsf_type_t *DebugData__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&DebugData__type, DebugData__type__builder);
#else
pthread_once(&DebugData__type__oc, DebugData__type__builder);
return DebugData__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t DebugData__genrtr__oc = PTHREAD_ONCE_INIT;
static void DebugData__genrtr__builder(void) {
DebugData__genrtr = tsf_generator_create(DebugData__get_type());
}
#else
static void *DebugData__genrtr__builder(void) {
return tsf_generator_create(DebugData__get_type());
}
#endif
tsf_genrtr_t *DebugData__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&DebugData__genrtr, DebugData__genrtr__builder);
#else
pthread_once(&DebugData__genrtr__oc, DebugData__genrtr__builder);
return DebugData__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t DebugData__parser__oc = PTHREAD_ONCE_INIT;
static void DebugData__parser__builder(void) {
DebugData__parser = tsf_parser_create(DebugData__get_type());
}
#else
static void *DebugData__parser__builder(void) {
return tsf_parser_create(DebugData__get_type());
}
#endif
tsf_parser_t *DebugData__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&DebugData__parser, DebugData__parser__builder);
#else
pthread_once(&DebugData__parser__oc, DebugData__parser__builder);
return DebugData__parser;
#endif
}
void DebugData__destruct(DebugData_t *data) {
free(*&data->data);
}
tsf_bool_t DebugData__write(tsf_stream_file_output_t *out, DebugData_t *data) {
return tsf_typed_data_write(out, DebugData__get_generator(), data);
}
DebugData_t *DebugData__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, DebugData__get_parser());
}
tsf_bool_t DebugData__read_into(tsf_stream_file_input_t *in, DebugData_t *result) {
return tsf_typed_data_read_into(in, DebugData__get_parser(), result);
}
static tsf_type_t * volatile Procedure__type = NULL;
static tsf_genrtr_t * volatile Procedure__genrtr = NULL;
static tsf_parser_t * volatile Procedure__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Procedure__type__oc = PTHREAD_ONCE_INIT;
static void Procedure__type__builder(void) {
Procedure__type = Procedure__build_type();
}
#else
static void *Procedure__type__builder(void) {
return Procedure__build_type();
}
#endif
tsf_type_t *Procedure__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Procedure__type, Procedure__type__builder);
#else
pthread_once(&Procedure__type__oc, Procedure__type__builder);
return Procedure__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Procedure__genrtr__oc = PTHREAD_ONCE_INIT;
static void Procedure__genrtr__builder(void) {
Procedure__genrtr = tsf_generator_create(Procedure__get_type());
}
#else
static void *Procedure__genrtr__builder(void) {
return tsf_generator_create(Procedure__get_type());
}
#endif
tsf_genrtr_t *Procedure__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&Procedure__genrtr, Procedure__genrtr__builder);
#else
pthread_once(&Procedure__genrtr__oc, Procedure__genrtr__builder);
return Procedure__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Procedure__parser__oc = PTHREAD_ONCE_INIT;
static void Procedure__parser__builder(void) {
Procedure__parser = tsf_parser_create(Procedure__get_type());
}
#else
static void *Procedure__parser__builder(void) {
return tsf_parser_create(Procedure__get_type());
}
#endif
tsf_parser_t *Procedure__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&Procedure__parser, Procedure__parser__builder);
#else
pthread_once(&Procedure__parser__oc, Procedure__parser__builder);
return Procedure__parser;
#endif
}
void Procedure__destruct(Procedure_t *data) {
free(*&data->name);
}
tsf_bool_t Procedure__write(tsf_stream_file_output_t *out, Procedure_t *data) {
return tsf_typed_data_write(out, Procedure__get_generator(), data);
}
Procedure_t *Procedure__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, Procedure__get_parser());
}
tsf_bool_t Procedure__read_into(tsf_stream_file_input_t *in, Procedure_t *result) {
return tsf_typed_data_read_into(in, Procedure__get_parser(), result);
}
static tsf_type_t * volatile ProcedureDecl__type = NULL;
static tsf_genrtr_t * volatile ProcedureDecl__genrtr = NULL;
static tsf_parser_t * volatile ProcedureDecl__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDecl__type__oc = PTHREAD_ONCE_INIT;
static void ProcedureDecl__type__builder(void) {
ProcedureDecl__type = ProcedureDecl__build_type();
}
#else
static void *ProcedureDecl__type__builder(void) {
return ProcedureDecl__build_type();
}
#endif
tsf_type_t *ProcedureDecl__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&ProcedureDecl__type, ProcedureDecl__type__builder);
#else
pthread_once(&ProcedureDecl__type__oc, ProcedureDecl__type__builder);
return ProcedureDecl__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDecl__genrtr__oc = PTHREAD_ONCE_INIT;
static void ProcedureDecl__genrtr__builder(void) {
ProcedureDecl__genrtr = tsf_generator_create(ProcedureDecl__get_type());
}
#else
static void *ProcedureDecl__genrtr__builder(void) {
return tsf_generator_create(ProcedureDecl__get_type());
}
#endif
tsf_genrtr_t *ProcedureDecl__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&ProcedureDecl__genrtr, ProcedureDecl__genrtr__builder);
#else
pthread_once(&ProcedureDecl__genrtr__oc, ProcedureDecl__genrtr__builder);
return ProcedureDecl__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDecl__parser__oc = PTHREAD_ONCE_INIT;
static void ProcedureDecl__parser__builder(void) {
ProcedureDecl__parser = tsf_parser_create(ProcedureDecl__get_type());
}
#else
static void *ProcedureDecl__parser__builder(void) {
return tsf_parser_create(ProcedureDecl__get_type());
}
#endif
tsf_parser_t *ProcedureDecl__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&ProcedureDecl__parser, ProcedureDecl__parser__builder);
#else
pthread_once(&ProcedureDecl__parser__oc, ProcedureDecl__parser__builder);
return ProcedureDecl__parser;
#endif
}
void ProcedureDecl__destruct(ProcedureDecl_t *data) {
free(*&data->name);
}
tsf_bool_t ProcedureDecl__write(tsf_stream_file_output_t *out, ProcedureDecl_t *data) {
return tsf_typed_data_write(out, ProcedureDecl__get_generator(), data);
}
ProcedureDecl_t *ProcedureDecl__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, ProcedureDecl__get_parser());
}
tsf_bool_t ProcedureDecl__read_into(tsf_stream_file_input_t *in, ProcedureDecl_t *result) {
return tsf_typed_data_read_into(in, ProcedureDecl__get_parser(), result);
}
static tsf_type_t * volatile ProcedureDefn__type = NULL;
static tsf_genrtr_t * volatile ProcedureDefn__genrtr = NULL;
static tsf_parser_t * volatile ProcedureDefn__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDefn__type__oc = PTHREAD_ONCE_INIT;
static void ProcedureDefn__type__builder(void) {
ProcedureDefn__type = ProcedureDefn__build_type();
}
#else
static void *ProcedureDefn__type__builder(void) {
return ProcedureDefn__build_type();
}
#endif
tsf_type_t *ProcedureDefn__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&ProcedureDefn__type, ProcedureDefn__type__builder);
#else
pthread_once(&ProcedureDefn__type__oc, ProcedureDefn__type__builder);
return ProcedureDefn__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDefn__genrtr__oc = PTHREAD_ONCE_INIT;
static void ProcedureDefn__genrtr__builder(void) {
ProcedureDefn__genrtr = tsf_generator_create(ProcedureDefn__get_type());
}
#else
static void *ProcedureDefn__genrtr__builder(void) {
return tsf_generator_create(ProcedureDefn__get_type());
}
#endif
tsf_genrtr_t *ProcedureDefn__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&ProcedureDefn__genrtr, ProcedureDefn__genrtr__builder);
#else
pthread_once(&ProcedureDefn__genrtr__oc, ProcedureDefn__genrtr__builder);
return ProcedureDefn__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDefn__parser__oc = PTHREAD_ONCE_INIT;
static void ProcedureDefn__parser__builder(void) {
ProcedureDefn__parser = tsf_parser_create(ProcedureDefn__get_type());
}
#else
static void *ProcedureDefn__parser__builder(void) {
return tsf_parser_create(ProcedureDefn__get_type());
}
#endif
tsf_parser_t *ProcedureDefn__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&ProcedureDefn__parser, ProcedureDefn__parser__builder);
#else
pthread_once(&ProcedureDefn__parser__oc, ProcedureDefn__parser__builder);
return ProcedureDefn__parser;
#endif
}
void ProcedureDefn__destruct(ProcedureDefn_t *data) {
free(*&data->name);
ProcedureDefn__variables__destruct(&data->variables);
ProcedureDefn__code__destruct(&data->code);
ProcedureDefn__debug__destruct(&data->debug);
}
tsf_bool_t ProcedureDefn__write(tsf_stream_file_output_t *out, ProcedureDefn_t *data) {
return tsf_typed_data_write(out, ProcedureDefn__get_generator(), data);
}
ProcedureDefn_t *ProcedureDefn__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, ProcedureDefn__get_parser());
}
tsf_bool_t ProcedureDefn__read_into(tsf_stream_file_input_t *in, ProcedureDefn_t *result) {
return tsf_typed_data_read_into(in, ProcedureDefn__get_parser(), result);
}
static tsf_type_t * volatile ProgramElement__type = NULL;
static tsf_genrtr_t * volatile ProgramElement__genrtr = NULL;
static tsf_parser_t * volatile ProgramElement__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProgramElement__type__oc = PTHREAD_ONCE_INIT;
static void ProgramElement__type__builder(void) {
ProgramElement__type = ProgramElement__build_type();
}
#else
static void *ProgramElement__type__builder(void) {
return ProgramElement__build_type();
}
#endif
tsf_type_t *ProgramElement__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&ProgramElement__type, ProgramElement__type__builder);
#else
pthread_once(&ProgramElement__type__oc, ProgramElement__type__builder);
return ProgramElement__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProgramElement__genrtr__oc = PTHREAD_ONCE_INIT;
static void ProgramElement__genrtr__builder(void) {
ProgramElement__genrtr = tsf_generator_create(ProgramElement__get_type());
}
#else
static void *ProgramElement__genrtr__builder(void) {
return tsf_generator_create(ProgramElement__get_type());
}
#endif
tsf_genrtr_t *ProgramElement__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&ProgramElement__genrtr, ProgramElement__genrtr__builder);
#else
pthread_once(&ProgramElement__genrtr__oc, ProgramElement__genrtr__builder);
return ProgramElement__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProgramElement__parser__oc = PTHREAD_ONCE_INIT;
static void ProgramElement__parser__builder(void) {
ProgramElement__parser = tsf_parser_create(ProgramElement__get_type());
}
#else
static void *ProgramElement__parser__builder(void) {
return tsf_parser_create(ProgramElement__get_type());
}
#endif
tsf_parser_t *ProgramElement__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&ProgramElement__parser, ProgramElement__parser__builder);
#else
pthread_once(&ProgramElement__parser__oc, ProgramElement__parser__builder);
return ProgramElement__parser;
#endif
}
void ProgramElement__destruct(ProgramElement_t *data) {
switch (data->value) {
case 0:
ProcedureDecl__destruct(&data->u.procedureDecl);
break;
case 1:
ProcedureDefn__destruct(&data->u.procedureDefn);
break;
default:
break;
}
}
tsf_bool_t ProgramElement__write(tsf_stream_file_output_t *out, ProgramElement_t *data) {
return tsf_typed_data_write(out, ProgramElement__get_generator(), data);
}
ProgramElement_t *ProgramElement__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, ProgramElement__get_parser());
}
tsf_bool_t ProgramElement__read_into(tsf_stream_file_input_t *in, ProgramElement_t *result) {
return tsf_typed_data_read_into(in, ProgramElement__get_parser(), result);
}
static tsf_type_t * volatile Program__type = NULL;
static tsf_genrtr_t * volatile Program__genrtr = NULL;
static tsf_parser_t * volatile Program__parser = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Program__type__oc = PTHREAD_ONCE_INIT;
static void Program__type__builder(void) {
Program__type = Program__build_type();
}
#else
static void *Program__type__builder(void) {
return Program__build_type();
}
#endif
tsf_type_t *Program__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Program__type, Program__type__builder);
#else
pthread_once(&Program__type__oc, Program__type__builder);
return Program__type;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Program__genrtr__oc = PTHREAD_ONCE_INIT;
static void Program__genrtr__builder(void) {
Program__genrtr = tsf_generator_create(Program__get_type());
}
#else
static void *Program__genrtr__builder(void) {
return tsf_generator_create(Program__get_type());
}
#endif
tsf_genrtr_t *Program__get_generator(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_genrtr_t*)tsf_init_pointer((void**)&Program__genrtr, Program__genrtr__builder);
#else
pthread_once(&Program__genrtr__oc, Program__genrtr__builder);
return Program__genrtr;
#endif
}
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Program__parser__oc = PTHREAD_ONCE_INIT;
static void Program__parser__builder(void) {
Program__parser = tsf_parser_create(Program__get_type());
}
#else
static void *Program__parser__builder(void) {
return tsf_parser_create(Program__get_type());
}
#endif
tsf_parser_t *Program__get_parser(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_parser_t*)tsf_init_pointer((void**)&Program__parser, Program__parser__builder);
#else
pthread_once(&Program__parser__oc, Program__parser__builder);
return Program__parser;
#endif
}
void Program__destruct(Program_t *data) {
Program__globals__destruct(&data->globals);
}
tsf_bool_t Program__write(tsf_stream_file_output_t *out, Program_t *data) {
return tsf_typed_data_write(out, Program__get_generator(), data);
}
Program_t *Program__read(tsf_stream_file_input_t *in) {
return tsf_typed_data_read(in, Program__get_parser());
}
tsf_bool_t Program__read_into(tsf_stream_file_input_t *in, Program_t *result) {
return tsf_typed_data_read_into(in, Program__get_parser(), result);
}
static tsf_type_t * volatile Instruction__mov__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__mov__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__mov__type__builder(void) {
Instruction__mov__type = Instruction__mov__build_type();
}
#else
static void *Instruction__mov__type__builder(void) {
return Instruction__mov__build_type();
}
#endif
tsf_type_t *Instruction__mov__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__mov__type, Instruction__mov__type__builder);
#else
pthread_once(&Instruction__mov__type__oc, Instruction__mov__type__builder);
return Instruction__mov__type;
#endif
}
static tsf_type_t * volatile Instruction__add__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__add__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__add__type__builder(void) {
Instruction__add__type = Instruction__add__build_type();
}
#else
static void *Instruction__add__type__builder(void) {
return Instruction__add__build_type();
}
#endif
tsf_type_t *Instruction__add__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__add__type, Instruction__add__type__builder);
#else
pthread_once(&Instruction__add__type__oc, Instruction__add__type__builder);
return Instruction__add__type;
#endif
}
static tsf_type_t * volatile Instruction__alloc__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__alloc__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__alloc__type__builder(void) {
Instruction__alloc__type = Instruction__alloc__build_type();
}
#else
static void *Instruction__alloc__type__builder(void) {
return Instruction__alloc__build_type();
}
#endif
tsf_type_t *Instruction__alloc__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__alloc__type, Instruction__alloc__type__builder);
#else
pthread_once(&Instruction__alloc__type__oc, Instruction__alloc__type__builder);
return Instruction__alloc__type;
#endif
}
void Instruction__alloc__destruct(Instruction__alloc_t *data) {
Type__destruct(&data->type);
}
static tsf_type_t * volatile Instruction__ret__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__ret__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__ret__type__builder(void) {
Instruction__ret__type = Instruction__ret__build_type();
}
#else
static void *Instruction__ret__type__builder(void) {
return Instruction__ret__build_type();
}
#endif
tsf_type_t *Instruction__ret__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__ret__type, Instruction__ret__type__builder);
#else
pthread_once(&Instruction__ret__type__oc, Instruction__ret__type__builder);
return Instruction__ret__type;
#endif
}
static tsf_type_t * volatile Instruction__jump__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__jump__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__jump__type__builder(void) {
Instruction__jump__type = Instruction__jump__build_type();
}
#else
static void *Instruction__jump__type__builder(void) {
return Instruction__jump__build_type();
}
#endif
tsf_type_t *Instruction__jump__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__jump__type, Instruction__jump__type__builder);
#else
pthread_once(&Instruction__jump__type__oc, Instruction__jump__type__builder);
return Instruction__jump__type;
#endif
}
static tsf_type_t * volatile Instruction__call__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__call__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__call__type__builder(void) {
Instruction__call__type = Instruction__call__build_type();
}
#else
static void *Instruction__call__type__builder(void) {
return Instruction__call__build_type();
}
#endif
tsf_type_t *Instruction__call__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__call__type, Instruction__call__type__builder);
#else
pthread_once(&Instruction__call__type__oc, Instruction__call__type__builder);
return Instruction__call__type;
#endif
}
void Instruction__call__destruct(Instruction__call_t *data) {
Instruction__call__args__destruct(&data->args);
}
static tsf_type_t * volatile Instruction__call__args__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__call__args__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__call__args__type__builder(void) {
Instruction__call__args__type = Instruction__call__args__build_type();
}
#else
static void *Instruction__call__args__type__builder(void) {
return Instruction__call__args__build_type();
}
#endif
tsf_type_t *Instruction__call__args__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__call__args__type, Instruction__call__args__type__builder);
#else
pthread_once(&Instruction__call__args__type__oc, Instruction__call__args__type__builder);
return Instruction__call__args__type;
#endif
}
void Instruction__call__args__destruct(Instruction__call__args_t *data) {
integer__array__destruct(data);
}
static tsf_type_t * volatile integer__array__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t integer__array__type__oc = PTHREAD_ONCE_INIT;
static void integer__array__type__builder(void) {
integer__array__type = integer__array__build_type();
}
#else
static void *integer__array__type__builder(void) {
return integer__array__build_type();
}
#endif
tsf_type_t *integer__array__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&integer__array__type, integer__array__type__builder);
#else
pthread_once(&integer__array__type__oc, integer__array__type__builder);
return integer__array__type;
#endif
}
void integer__array__destruct(integer__array_t *data) {
free(data->data);
}
static tsf_type_t * volatile Instruction__branchZero__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__branchZero__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__branchZero__type__builder(void) {
Instruction__branchZero__type = Instruction__branchZero__build_type();
}
#else
static void *Instruction__branchZero__type__builder(void) {
return Instruction__branchZero__build_type();
}
#endif
tsf_type_t *Instruction__branchZero__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__branchZero__type, Instruction__branchZero__type__builder);
#else
pthread_once(&Instruction__branchZero__type__oc, Instruction__branchZero__type__builder);
return Instruction__branchZero__type;
#endif
}
static tsf_type_t * volatile ProcedureDefn__variables__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDefn__variables__type__oc = PTHREAD_ONCE_INIT;
static void ProcedureDefn__variables__type__builder(void) {
ProcedureDefn__variables__type = ProcedureDefn__variables__build_type();
}
#else
static void *ProcedureDefn__variables__type__builder(void) {
return ProcedureDefn__variables__build_type();
}
#endif
tsf_type_t *ProcedureDefn__variables__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&ProcedureDefn__variables__type, ProcedureDefn__variables__type__builder);
#else
pthread_once(&ProcedureDefn__variables__type__oc, ProcedureDefn__variables__type__builder);
return ProcedureDefn__variables__type;
#endif
}
void ProcedureDefn__variables__destruct(ProcedureDefn__variables_t *data) {
VariableDecl__array__destruct(data);
}
static tsf_type_t * volatile VariableDecl__array__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t VariableDecl__array__type__oc = PTHREAD_ONCE_INIT;
static void VariableDecl__array__type__builder(void) {
VariableDecl__array__type = VariableDecl__array__build_type();
}
#else
static void *VariableDecl__array__type__builder(void) {
return VariableDecl__array__build_type();
}
#endif
tsf_type_t *VariableDecl__array__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&VariableDecl__array__type, VariableDecl__array__type__builder);
#else
pthread_once(&VariableDecl__array__type__oc, VariableDecl__array__type__builder);
return VariableDecl__array__type;
#endif
}
void VariableDecl__array__destruct(VariableDecl__array_t *data) {
uint32_t i;
for (i = data->len; i--;)
VariableDecl__destruct((data->data + i));
free(data->data);
}
static tsf_type_t * volatile ProcedureDefn__code__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDefn__code__type__oc = PTHREAD_ONCE_INIT;
static void ProcedureDefn__code__type__builder(void) {
ProcedureDefn__code__type = ProcedureDefn__code__build_type();
}
#else
static void *ProcedureDefn__code__type__builder(void) {
return ProcedureDefn__code__build_type();
}
#endif
tsf_type_t *ProcedureDefn__code__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&ProcedureDefn__code__type, ProcedureDefn__code__type__builder);
#else
pthread_once(&ProcedureDefn__code__type__oc, ProcedureDefn__code__type__builder);
return ProcedureDefn__code__type;
#endif
}
void ProcedureDefn__code__destruct(ProcedureDefn__code_t *data) {
Instruction__array__destruct(data);
}
static tsf_type_t * volatile Instruction__array__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Instruction__array__type__oc = PTHREAD_ONCE_INIT;
static void Instruction__array__type__builder(void) {
Instruction__array__type = Instruction__array__build_type();
}
#else
static void *Instruction__array__type__builder(void) {
return Instruction__array__build_type();
}
#endif
tsf_type_t *Instruction__array__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Instruction__array__type, Instruction__array__type__builder);
#else
pthread_once(&Instruction__array__type__oc, Instruction__array__type__builder);
return Instruction__array__type;
#endif
}
void Instruction__array__destruct(Instruction__array_t *data) {
uint32_t i;
for (i = data->len; i--;)
Instruction__destruct((data->data + i));
free(data->data);
}
static tsf_type_t * volatile ProcedureDefn__debug__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProcedureDefn__debug__type__oc = PTHREAD_ONCE_INIT;
static void ProcedureDefn__debug__type__builder(void) {
ProcedureDefn__debug__type = ProcedureDefn__debug__build_type();
}
#else
static void *ProcedureDefn__debug__type__builder(void) {
return ProcedureDefn__debug__build_type();
}
#endif
tsf_type_t *ProcedureDefn__debug__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&ProcedureDefn__debug__type, ProcedureDefn__debug__type__builder);
#else
pthread_once(&ProcedureDefn__debug__type__oc, ProcedureDefn__debug__type__builder);
return ProcedureDefn__debug__type;
#endif
}
void ProcedureDefn__debug__destruct(ProcedureDefn__debug_t *data) {
DebugData__array__destruct(data);
}
static tsf_type_t * volatile DebugData__array__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t DebugData__array__type__oc = PTHREAD_ONCE_INIT;
static void DebugData__array__type__builder(void) {
DebugData__array__type = DebugData__array__build_type();
}
#else
static void *DebugData__array__type__builder(void) {
return DebugData__array__build_type();
}
#endif
tsf_type_t *DebugData__array__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&DebugData__array__type, DebugData__array__type__builder);
#else
pthread_once(&DebugData__array__type__oc, DebugData__array__type__builder);
return DebugData__array__type;
#endif
}
void DebugData__array__destruct(DebugData__array_t *data) {
uint32_t i;
for (i = data->len; i--;)
DebugData__destruct((data->data + i));
free(data->data);
}
static tsf_type_t * volatile Program__globals__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t Program__globals__type__oc = PTHREAD_ONCE_INIT;
static void Program__globals__type__builder(void) {
Program__globals__type = Program__globals__build_type();
}
#else
static void *Program__globals__type__builder(void) {
return Program__globals__build_type();
}
#endif
tsf_type_t *Program__globals__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&Program__globals__type, Program__globals__type__builder);
#else
pthread_once(&Program__globals__type__oc, Program__globals__type__builder);
return Program__globals__type;
#endif
}
void Program__globals__destruct(Program__globals_t *data) {
ProgramElement__array__destruct(data);
}
static tsf_type_t * volatile ProgramElement__array__type = NULL;
#ifndef TSF_HAVE_INIT_POINTER
static pthread_once_t ProgramElement__array__type__oc = PTHREAD_ONCE_INIT;
static void ProgramElement__array__type__builder(void) {
ProgramElement__array__type = ProgramElement__array__build_type();
}
#else
static void *ProgramElement__array__type__builder(void) {
return ProgramElement__array__build_type();
}
#endif
tsf_type_t *ProgramElement__array__get_type(void) {
#ifdef TSF_HAVE_INIT_POINTER
return (tsf_type_t*)tsf_init_pointer((void**)&ProgramElement__array__type, ProgramElement__array__type__builder);
#else
pthread_once(&ProgramElement__array__type__oc, ProgramElement__array__type__builder);
return ProgramElement__array__type;
#endif
}
void ProgramElement__array__destruct(ProgramElement__array_t *data) {
uint32_t i;
for (i = data->len; i--;)
ProgramElement__destruct((data->data + i));
free(data->data);
}