10.1. Runtime type information library

The RTTI module exposes runtime type information and program introspection facilities. It allows querying module structure, type declarations, function signatures, annotations, and other compile-time metadata at runtime. Used primarily by macro libraries and code generation tools.

All functions and symbols are in “rtti” module, use require to get access to it.

require daslib/rtti

10.1.1. Type aliases

bitfield ProgramFlags

Flags which represent state of the Program object, both during and after compilation.

Fields:
  • failToCompile (0x1) - indicates that the program failed to compile.

  • _unsafe (0x2) - indicates that the program contains unsafe code.

  • isCompiling (0x4) - indicates that the program is currently compiling.

  • isSimulating (0x8) - indicates that the program is currently simulating.

  • isCompilingMacros (0x10) - indicates that the program is currently compiling macros.

  • needMacroModule (0x20) - indicates that the program needs a macro module.

  • promoteToBuiltin (0x40) - indicates that the program is being promoted to a builtin module.

  • isDependency (0x80) - indicates that the program is a dependency module.

  • macroException (0x100) - indicates that a macro exception has occurred.

bitfield context_category_flags

Flags which specify type of the Context.

Fields:
  • dead (0x1) - indicates that the context is dead.

  • debug_context (0x2) - indicates that the context is a debug context.

  • thread_clone (0x4) - indicates that the context is a thread clone.

  • job_clone (0x8) - indicates that the context is a job clone.

  • opengl (0x10) - indicates that the context is an opengl context.

  • debugger_tick (0x20) - indicates that the context is a debugger tick.

  • debugger_attached (0x40) - indicates that the context has a debugger attached.

  • macro_context (0x80) - indicates that the context is a macro context (i.e. compiled macro module)

  • folding_context (0x100) - indicates that the context is a folding context (used during compilation or optimization for the purposes of folding constants)

  • audio (0x200) - indicates that the context is an audio context.

bitfield TypeInfoFlags

Flags which specify properties of the TypeInfo object (any rtti type). indicates that the type is a reference value.

Fields:
  • ref (0x1) - indicates that the type is a reference type.

  • refType (0x2) - indicates that the type can be copied.

  • canCopy (0x4) - indicates that the type is a plain old data type.

  • isPod (0x8) - indicates that the type is a raw plain old data type (without pointers or strings).

  • isRawPod (0x10) - indicates that the type is a const type.

  • isConst (0x20) - indicates that the type is a temporary type.

  • isTemp (0x40) - indicates that the type is an implicit type.

  • isImplicit (0x80) - indicates that the type is a reference value.

  • refValue (0x100) - indicates that the type has an initial value.

  • hasInitValue (0x200) - indicates that the type is a smart pointer.

  • isSmartPtr (0x400) - indicates that the type is a smart pointer native (smart_ptr_raw)

  • isSmartPtrNative (0x800) - indicates that the type is a handled type (annotation)

  • isHandled (0x1000) - indicates that the type needs marking by the garbage collector.

  • heapGC (0x2000) - indicates that the type needs marking of strings by the garbage collector.

  • stringHeapGC (0x4000) - indicates that the type needs lock checking.

  • isPrivate (0x8000) - indicates that the type is private.

bitfield StructInfoFlags

Flags which represent properties of the StructInfo object (rtti object which represents structure type). This structure is a class.

Fields:
  • _class (0x1) - This structure is a lambda.

  • _lambda (0x2) - This structure needs marking by the garbage collector.

  • heapGC (0x4) - This structure needs marking of strings by the garbage collector.

  • stringHeapGC (0x8) - This structure needs lock checking.

bitfield ModuleFlags

Flags which represent the module’s state. This module is built-in.

Fields:
  • builtIn (0x1) - This module is promoted to a builtin module.

  • promoted (0x2) - This module is public.

  • isPublic (0x4) - This module is a module.

  • isModule (0x8) - This module is a solid context (can’t be called from other contexts via pinvoke, global variables are cemented at locations)

  • isSolidContext (0x10) - This module is from an extra dependency.

  • fromExtraDependency (0x20) - This module does not allow unsafe code.

  • doNotAllowUnsafe (0x40) - This module was parsed nameless.

  • wasParsedNameless (0x80) - This module is visible everywhere.

  • visibleEverywhere (0x100) - This module skips lock checking.

  • allowPodInscope (0x200) - This module allows pod inscope.

bitfield AnnotationDeclarationFlags

Flags which represent properties of the AnnotationDeclaration object.

Fields:
  • inherited (0x1) - Indicates that the annotation is inherited.

bitfield SimFunctionFlags

properties of the SimFunction object.

Fields:
  • aot (0x1) - Function is compiled ahead-of-time.

  • fastcall (0x2) - Function uses fastcall calling convention.

  • builtin (0x4) - Function is a builtin.

  • jit (0x8) - Function is JIT-compiled.

  • unsafe (0x10) - Function is unsafe.

  • cmres (0x20) - Function returns via caller-managed return space.

  • pinvoke (0x40) - Function uses platform invoke for external calls.

bitfield LocalVariableInfoFlags

properties of the LocalVariableInfo object.

Fields:
  • cmres (0x1) - Variable is a caller-managed return space variable.

variant RttiValue

Variant type which represents value of any annotation arguments and variable annotations.

Variants:
  • tBool : bool - boolean value

  • tInt : int - integer value

  • tUInt : uint - unsigned integer value

  • tInt64 : int64 - 64-bit integer value

  • tUInt64 : uint64 - 64-bit unsigned integer value

  • tFloat : float - floating point value

  • tDouble : double - double precision floating point value

  • tString : string - string value

  • nothing : any - no value

FileAccessPtr = smart_ptr<FileAccess>

typedef FileAccessPtr = smart_ptr<rtti_core::FileAccess> aka FileAccessPtr

10.1.2. Constants

FUNCINFO_INIT = 0x1

Bit flag constant on FuncInfo.flags indicating that the function runs during Context initialization ([init] attribute).

FUNCINFO_BUILTIN = 0x2

Bit flag constant on FuncInfo.flags indicating that the function is a built-in (C++-bound) function rather than a daslang-defined one.

FUNCINFO_PRIVATE = 0x4

Bit flag constant on FuncInfo.flags indicating that the function has [private] visibility and cannot be called from other modules.

FUNCINFO_SHUTDOWN = 0x8

Bit flag constant on FuncInfo.flags indicating that the function runs during Context shutdown ([finalize] attribute).

FUNCINFO_LATE_INIT = 0x20

Bit flag constant on FuncInfo.flags indicating the function uses late initialization with a custom init order ([init(order)] attribute).

10.1.3. Enumerations

CompilationError

Enumeration which represents error type for each of the errors which compiler returns at various stages.

Values:
  • unspecified = 0 - Unspecified error.

  • invalid_line = 10100 - Invalid line.

  • invalid_string = 10101 - Invalid string.

  • mismatching_curly_bracers = 10200 - Mismatching curly braces.

  • mismatching_module_name = 10201 - Mismatching module name.

  • mismatching_parens = 10202 - Mismatching parens.

  • exceeds_constant = 10300 - Constant size exceeds limit.

  • exceeds_file = 10301 - File size exceeds limit.

  • invalid_aka = 20100 - Invalid aka.

  • invalid_capture = 20103 - Invalid capture.

  • invalid_escape = 20105 - Invalid escape.

  • invalid_field = 20107 - Invalid field.

  • invalid_field_static = 20108 - Invalid field static.

  • invalid_function = 20109 - Invalid function.

  • invalid_function_annotation = 20110 - Invalid function annotation.

  • invalid_function_static = 20111 - Invalid function static.

  • invalid_global_aka = 20112 - Invalid global aka.

  • invalid_macro = 20113 - Invalid macro.

  • invalid_module = 20114 - Invalid module.

  • invalid_module_require = 20115 - Invalid module require.

  • invalid_name = 20116 - Invalid name.

  • invalid_type_aka = 20120 - Invalid type aka.

  • invalid_type_alias = 20121 - Invalid type alias.

  • missing_module_name = 20201 - Missing module name.

  • exceeds_bitfield = 20300 - Bitfield size exceeds limit.

  • ambiguous_function_argument_type = 20402 - Ambiguous function argument type.

  • already_declared_enumeration = 20501 - Enumeration already declared.

  • already_declared_enumerator = 20502 - Enumerator already declared.

  • already_declared_field = 20503 - Field already declared.

  • already_declared_field_static = 20504 - Field static already declared.

  • already_declared_function_argument = 20506 - Function argument already declared.

  • already_declared_global = 20507 - Global already declared.

  • already_declared_global_bitfield = 20508 - Global bitfield already declared.

  • already_declared_local = 20509 - Local already declared.

  • already_declared_module = 20510 - Module already declared.

  • already_declared_module_name = 20511 - Module name already declared.

  • already_declared_structure = 20512 - Structure already declared.

  • already_declared_type_alias = 20513 - Type alias already declared.

  • lookup_annotation = 20600 - Annotation not found.

  • lookup_enumeration = 20602 - Enumeration not found.

  • lookup_file = 20603 - File not found.

  • lookup_module = 20605 - Module not found.

  • lookup_structure = 20606 - Structure not found.

  • cant_structure = 20701 - Can’t structure.

  • runtime_annotation = 20800 - Runtime failure in annotation.

  • internal_module = 20901 - Internal compiler error in module.

  • invalid_annotation = 30100 - Invalid annotation.

  • invalid_annotation_field = 30101 - Invalid annotation field.

  • invalid_annotation_macro = 30102 - Invalid annotation macro.

  • invalid_annotation_type = 30103 - Invalid annotation type.

  • invalid_argument = 30104 - Invalid argument.

  • invalid_argument_global = 30105 - Invalid argument global.

  • invalid_argument_name = 30106 - Invalid argument name.

  • invalid_argument_type = 30107 - Invalid argument type.

  • invalid_array = 30108 - Invalid array.

  • invalid_array_dimension = 30109 - Invalid array dimension.

  • invalid_array_dimension_type = 30110 - Invalid array dimension type.

  • invalid_array_element_type = 30111 - Invalid array element type.

  • invalid_array_type = 30112 - Invalid array type.

  • invalid_as = 30113 - Invalid as.

  • invalid_ascend_array_handle_type = 30114 - Invalid ascend array handle type.

  • invalid_ascend_handle_type = 30115 - Invalid ascend handle type.

  • invalid_assert_argument_count = 30116 - Invalid assert argument count.

  • invalid_assert_comment_type = 30117 - Invalid assert comment type.

  • invalid_assert_condition_type = 30118 - Invalid assert condition type.

  • invalid_bitfield = 30119 - Invalid bitfield.

  • invalid_bitfield_cast_argument_count = 30120 - Invalid bitfield cast argument count.

  • invalid_block_argument = 30121 - Invalid block argument.

  • invalid_block_argument_count = 30122 - Invalid block argument count.

  • invalid_block_argument_init_type = 30123 - Invalid block argument init type.

  • invalid_block_argument_type = 30124 - Invalid block argument type.

  • invalid_block_break = 30125 - Invalid block break.

  • invalid_block_continue = 30126 - Invalid block continue.

  • invalid_block_finally = 30127 - Invalid block finally.

  • invalid_break = 30128 - Invalid break.

  • invalid_capture_variable = 30129 - Invalid capture variable.

  • invalid_cast_function = 30130 - Invalid cast function.

  • invalid_cast_structure = 30131 - Invalid cast structure.

  • invalid_cast_structure_pointer = 30132 - Invalid cast structure pointer.

  • invalid_cast_type = 30133 - Invalid cast type.

  • invalid_class = 30134 - Invalid class.

  • invalid_class_local = 30135 - Invalid class local.

  • invalid_class_tuple = 30136 - Invalid class tuple.

  • invalid_class_variant = 30137 - Invalid class variant.

  • invalid_clone_smart_pointer_type = 30138 - Invalid clone smart pointer type.

  • invalid_comprehension_element_type = 30139 - Invalid comprehension element type.

  • invalid_continue = 30140 - Invalid continue.

  • invalid_debug_argument_count = 30141 - Invalid debug argument count.

  • invalid_debug_comment_type = 30142 - Invalid debug comment type.

  • invalid_delete_size_type = 30143 - Invalid delete size type.

  • invalid_delete_super_self_type = 30144 - Invalid delete super self type.

  • invalid_enumeration = 30145 - Invalid enumeration.

  • invalid_enumeration_name = 30146 - Invalid enumeration name.

  • invalid_enumerator = 30147 - Invalid enumerator.

  • invalid_enumerator_name = 30148 - Invalid enumerator name.

  • invalid_enumerator_type = 30149 - Invalid enumerator type.

  • invalid_erase_argument_count = 30150 - Invalid erase argument count.

  • invalid_expression = 30151 - Invalid expression.

  • invalid_field_name = 30152 - Invalid field name.

  • invalid_field_syntax = 30153 - Invalid field syntax.

  • invalid_field_type = 30154 - Invalid field type.

  • invalid_finally_in_generator_if = 30155 - Invalid finally in generator if.

  • invalid_find_argument_count = 30156 - Invalid find argument count.

  • invalid_for_iterator_count = 30157 - Invalid for iterator count.

  • invalid_for_iterator_tuple = 30158 - Invalid for iterator tuple.

  • invalid_function_argument = 30159 - Invalid function argument.

  • invalid_function_argument_count = 30160 - Invalid function argument count.

  • invalid_function_argument_type = 30161 - Invalid function argument type.

  • invalid_function_argument_type_block = 30162 - Invalid function argument type block.

  • invalid_function_name = 30163 - Invalid function name.

  • invalid_function_options = 30164 - Invalid function options.

  • invalid_function_result = 30165 - Invalid function result.

  • invalid_function_result_discarded = 30166 - Invalid function result discarded.

  • invalid_function_result_type = 30167 - Invalid function result type.

  • invalid_function_type = 30168 - Invalid function type.

  • invalid_generator = 30169 - Invalid generator.

  • invalid_generator_argument_count = 30170 - Invalid generator argument count.

  • invalid_generator_argument_type = 30171 - Invalid generator argument type.

  • invalid_generator_result_type = 30172 - Invalid generator result type.

  • invalid_global = 30173 - Invalid global.

  • invalid_global_init_options = 30174 - Invalid global init options.

  • invalid_global_init_type = 30175 - Invalid global init type.

  • invalid_global_options = 30176 - Invalid global options.

  • invalid_global_self_init = 30177 - Invalid global self init.

  • invalid_global_shared = 30178 - Invalid global shared.

  • invalid_global_type = 30179 - Invalid global type.

  • invalid_global_type_shared = 30180 - Invalid global type shared.

  • invalid_handle_index_type = 30181 - Invalid handle index type.

  • invalid_handle_safe_index_type = 30182 - Invalid handle safe index type.

  • invalid_if_condition_type = 30183 - Invalid if condition type.

  • invalid_index_type = 30184 - Invalid index type.

  • invalid_insert_argument_count = 30185 - Invalid insert argument count.

  • invalid_invoke_argument_count = 30186 - Invalid invoke argument count.

  • invalid_invoke_argument_type = 30187 - Invalid invoke argument type.

  • invalid_invoke_method_syntax = 30188 - Invalid invoke method syntax.

  • invalid_invoke_target_type = 30189 - Invalid invoke target type.

  • invalid_is = 30190 - Invalid is.

  • invalid_is_expression = 30191 - Invalid is expression.

  • invalid_iteration_source_type = 30192 - Invalid iteration source type.

  • invalid_key_exists_argument_count = 30193 - Invalid key exists argument count.

  • invalid_label_type = 30194 - Invalid label type.

  • invalid_local_in_scope = 30195 - Invalid local in scope.

  • invalid_local_in_scope_finally = 30196 - Invalid local in scope finally.

  • invalid_local_init = 30197 - Invalid local init.

  • invalid_local_init_block = 30198 - Invalid local init block.

  • invalid_local_init_constructor = 30199 - Invalid local init constructor.

  • invalid_local_init_type = 30200 - Invalid local init type.

  • invalid_local_tuple_expansion = 30201 - Invalid local tuple expansion.

  • invalid_local_type = 30202 - Invalid local type.

  • invalid_macro_context = 30203 - Invalid macro context.

  • invalid_macro_read = 30204 - Invalid macro read.

  • invalid_macro_tag = 30205 - Invalid macro tag.

  • invalid_macro_type = 30206 - Invalid macro type.

  • invalid_memzero_argument = 30207 - Invalid memzero argument.

  • invalid_memzero_argument_count = 30208 - Invalid memzero argument count.

  • invalid_memzero_argument_type = 30209 - Invalid memzero argument type.

  • invalid_module_name = 30210 - Invalid module name.

  • invalid_new_class_syntax = 30211 - Invalid new class syntax.

  • invalid_new_initializer_result_type = 30212 - Invalid new initializer result type.

  • invalid_new_initializer_type = 30213 - Invalid new initializer type.

  • invalid_new_type = 30214 - Invalid new type.

  • invalid_null_coalescing_type = 30215 - Invalid null coalescing type.

  • invalid_op3_expression = 30216 - Invalid op3 expression.

  • invalid_pointer_arithmetic = 30218 - Invalid pointer arithmetic.

  • invalid_quote_argument_count = 30219 - Invalid quote argument count.

  • invalid_result = 30220 - Invalid result.

  • invalid_result_type = 30221 - Invalid result type.

  • invalid_return_semantics = 30222 - Invalid return semantics.

  • invalid_safe_as = 30223 - Invalid safe as.

  • invalid_safe_dereference_type = 30224 - Invalid safe dereference type.

  • invalid_safe_field_type = 30225 - Invalid safe field type.

  • invalid_static_assert_argument_count = 30226 - Invalid static assert argument count.

  • invalid_static_assert_comment_type = 30227 - Invalid static assert comment type.

  • invalid_static_assert_condition_type = 30228 - Invalid static assert condition type.

  • invalid_static_if_condition = 30229 - Invalid static if condition.

  • invalid_storage_type_op = 30230 - Invalid storage type op.

  • invalid_string_builder_argument = 30231 - Invalid string builder argument.

  • invalid_structure = 30232 - Invalid structure.

  • invalid_structure_annotation = 30233 - Invalid structure annotation.

  • invalid_structure_array = 30234 - Invalid structure array.

  • invalid_structure_block_pipe = 30235 - Invalid structure block pipe.

  • invalid_structure_field_init = 30236 - Invalid structure field init.

  • invalid_structure_field_type = 30237 - Invalid structure field type.

  • invalid_structure_initializer_required = 30238 - Invalid structure initializer required.

  • invalid_structure_local = 30239 - Invalid structure local.

  • invalid_structure_name = 30240 - Invalid structure name.

  • invalid_structure_template = 30241 - Invalid structure template.

  • invalid_structure_tuple = 30242 - Invalid structure tuple.

  • invalid_structure_type = 30243 - Invalid structure type.

  • invalid_structure_variant = 30244 - Invalid structure variant.

  • invalid_super_call = 30245 - Invalid super call.

  • invalid_swizzle_mask = 30246 - Invalid swizzle mask.

  • invalid_swizzle_type = 30247 - Invalid swizzle type.

  • invalid_table = 30248 - Invalid table.

  • invalid_table_argument_type = 30249 - Invalid table argument type.

  • invalid_table_expression = 30250 - Invalid table expression.

  • invalid_table_index_type = 30251 - Invalid table index type.

  • invalid_table_key_type = 30252 - Invalid table key type.

  • invalid_table_safe_index_type = 30253 - Invalid table safe index type.

  • invalid_table_type = 30254 - Invalid table type.

  • invalid_tuple = 30255 - Invalid tuple.

  • invalid_tuple_argument_type = 30256 - Invalid tuple argument type.

  • invalid_tuple_block = 30257 - Invalid tuple block.

  • invalid_tuple_key = 30258 - Invalid tuple key.

  • invalid_tuple_key_type = 30259 - Invalid tuple key type.

  • invalid_tuple_type = 30260 - Invalid tuple type.

  • invalid_tuple_variant = 30261 - Invalid tuple variant.

  • invalid_type = 30262 - Invalid type.

  • invalid_type_dimension = 30263 - Invalid type dimension.

  • invalid_type_expression = 30264 - Invalid type expression.

  • invalid_typeinfo = 30265 - Invalid typeinfo.

  • invalid_typeinfo_annotation = 30266 - Invalid typeinfo annotation.

  • invalid_typeinfo_annotation_argument_type = 30267 - Invalid typeinfo annotation argument type.

  • invalid_typeinfo_dim = 30268 - Invalid typeinfo dim.

  • invalid_typeinfo_dim_table = 30269 - Invalid typeinfo dim table.

  • invalid_typeinfo_dim_table_type = 30270 - Invalid typeinfo dim table type.

  • invalid_typeinfo_function = 30271 - Invalid typeinfo function.

  • invalid_typeinfo_has_field_type = 30272 - Invalid typeinfo has field type.

  • invalid_typeinfo_mangled_subexpression = 30273 - Invalid typeinfo mangled subexpression.

  • invalid_typeinfo_module_subexpression = 30274 - Invalid typeinfo module subexpression.

  • invalid_typeinfo_offsetof_type = 30275 - Invalid typeinfo offsetof type.

  • invalid_typeinfo_struct_get_annotation_argument_type = 30276 - Invalid typeinfo struct get annotation argument type.

  • invalid_typeinfo_struct_has_annotation_argument_type = 30277 - Invalid typeinfo struct has annotation argument type.

  • invalid_typeinfo_struct_has_annotation_type = 30278 - Invalid typeinfo struct has annotation type.

  • invalid_typeinfo_struct_modulename = 30279 - Invalid typeinfo struct modulename.

  • invalid_typeinfo_struct_name = 30280 - Invalid typeinfo struct name.

  • invalid_typeinfo_variant_index_type = 30281 - Invalid typeinfo variant index type.

  • invalid_variable_name = 30282 - Invalid variable name.

  • invalid_variable_private = 30283 - Invalid variable private.

  • invalid_variant = 30284 - Invalid variant.

  • invalid_variant_array = 30285 - Invalid variant array.

  • invalid_variant_block = 30286 - Invalid variant block.

  • invalid_variant_initializer_count = 30287 - Invalid variant initializer count.

  • invalid_variant_tuple = 30288 - Invalid variant tuple.

  • invalid_variant_type = 30289 - Invalid variant type.

  • invalid_variant_unique = 30290 - Invalid variant unique.

  • invalid_while_condition_type = 30291 - Invalid while condition type.

  • invalid_with_array_type = 30292 - Invalid with array type.

  • invalid_with_type = 30293 - Invalid with type.

  • invalid_yield = 30294 - Invalid yield.

  • invalid_yield_in_block = 30295 - Invalid yield in block.

  • missing_annotation = 30300 - Missing annotation.

  • missing_assume_type = 30301 - Missing assume type.

  • missing_bitfield_init = 30302 - Missing bitfield init.

  • missing_block_argument_init = 30303 - Missing block argument init.

  • missing_block_result = 30304 - Missing block result.

  • missing_enumeration_zero = 30305 - Missing enumeration zero.

  • missing_finalizer = 30306 - Missing finalizer.

  • missing_for_iterator = 30307 - Missing for iterator.

  • missing_function_body = 30308 - Missing function body.

  • missing_function_name = 30309 - Missing function name.

  • missing_function_result = 30310 - Missing function result.

  • missing_global = 30311 - Missing global.

  • missing_global_init = 30312 - Missing global init.

  • missing_global_shared_init = 30313 - Missing global shared init.

  • missing_local = 30314 - Missing local.

  • missing_local_block_init = 30315 - Missing local block init.

  • missing_local_init = 30316 - Missing local init.

  • missing_local_reference_init = 30317 - Missing local reference init.

  • missing_new_default_initializer = 30318 - Missing new default initializer.

  • missing_result = 30319 - Missing result.

  • missing_structure_field = 30320 - Missing structure field.

  • missing_typeinfo_subexpression = 30321 - Missing typeinfo subexpression.

  • mismatching_array_dimension = 30400 - Mismatching array dimension.

  • mismatching_array_element_type = 30401 - Mismatching array element type.

  • mismatching_block_argument_type = 30402 - Mismatching block argument type.

  • mismatching_clone_type = 30403 - Mismatching clone type.

  • mismatching_function_argument = 30404 - Mismatching function argument.

  • mismatching_function_argument_count = 30405 - Mismatching function argument count.

  • mismatching_numeric_type = 30406 - Mismatching numeric type.

  • mismatching_result_type = 30407 - Mismatching result type.

  • mismatching_structure_dimension = 30408 - Mismatching structure dimension.

  • mismatching_tuple_argument_count = 30409 - Mismatching tuple argument count.

  • mismatching_tuple_field_names = 30410 - Mismatching tuple field names.

  • mismatching_type = 30411 - Mismatching type.

  • mismatching_variant_dimension = 30412 - Mismatching variant dimension.

  • exceeds_argument = 30500 - Argument size exceeds limit.

  • exceeds_array_index = 30502 - Array index size exceeds limit.

  • exceeds_call_depth = 30503 - Call depth size exceeds limit.

  • exceeds_expression_recursion = 30504 - Expression recursion size exceeds limit.

  • exceeds_function_argument = 30505 - Function argument size exceeds limit.

  • exceeds_infer_passes = 30507 - Infer passes size exceeds limit.

  • exceeds_local = 30508 - Local size exceeds limit.

  • exceeds_new_argument = 30509 - New argument size exceeds limit.

  • exceeds_structure = 30510 - Structure size exceeds limit.

  • exceeds_tuple_index = 30511 - Tuple index size exceeds limit.

  • exceeds_type = 30512 - Type size exceeds limit.

  • exceeds_type_alias = 30513 - Type alias size exceeds limit.

  • exceeds_typeinfo_sizeof = 30514 - Typeinfo sizeof size exceeds limit.

  • ambiguous_annotation = 30600 - Ambiguous annotation.

  • ambiguous_bitfield = 30601 - Ambiguous bitfield.

  • ambiguous_call_macro = 30602 - Ambiguous call macro.

  • ambiguous_enumeration = 30603 - Ambiguous enumeration.

  • ambiguous_field = 30604 - Ambiguous field.

  • ambiguous_field_lookup = 30605 - Ambiguous field lookup.

  • ambiguous_finalizer = 30606 - Ambiguous finalizer.

  • ambiguous_function = 30607 - Ambiguous function.

  • ambiguous_macro = 30608 - Ambiguous macro.

  • ambiguous_structure = 30609 - Ambiguous structure.

  • ambiguous_super_call = 30610 - Ambiguous super call.

  • ambiguous_super_constructor = 30611 - Ambiguous super constructor.

  • ambiguous_type = 30612 - Ambiguous type.

  • ambiguous_type_alias = 30613 - Ambiguous type alias.

  • ambiguous_typeinfo_macro = 30614 - Ambiguous typeinfo macro.

  • ambiguous_variable = 30615 - Ambiguous variable.

  • already_declared_assume_alias = 30700 - Assume alias already declared.

  • already_declared_block_argument = 30701 - Block argument already declared.

  • already_declared_function = 30702 - Function already declared.

  • already_declared_label = 30703 - Label already declared.

  • already_declared_local_variable = 30704 - Local variable already declared.

  • already_declared_structure_field_init = 30705 - Structure field init already declared.

  • already_declared_table = 30706 - Table already declared.

  • already_declared_tuple_field = 30707 - Tuple field already declared.

  • already_declared_variable = 30708 - Variable already declared.

  • already_declared_with_shadow = 30709 - With shadow already declared.

  • lookup_annotation_field = 30800 - Annotation field not found.

  • lookup_argument_type = 30801 - Argument type not found.

  • lookup_bitfield = 30802 - Bitfield not found.

  • lookup_block_argument_type = 30803 - Block argument type not found.

  • lookup_block_result_type = 30804 - Block result type not found.

  • lookup_cast_type = 30805 - Cast type not found.

  • lookup_constructor = 30806 - Constructor not found.

  • lookup_expression_type = 30807 - Expression type not found.

  • lookup_field = 30808 - Field not found.

  • lookup_field_type = 30809 - Field type not found.

  • lookup_function = 30810 - Function not found.

  • lookup_function_address_type = 30811 - Function address type not found.

  • lookup_function_argument_type = 30812 - Function argument type not found.

  • lookup_function_mangled_name = 30813 - Function mangled name not found.

  • lookup_function_result_type = 30814 - Function result type not found.

  • lookup_function_type = 30815 - Function type not found.

  • lookup_generator_type = 30816 - Generator type not found.

  • lookup_global_type = 30817 - Global type not found.

  • lookup_is_expression_type = 30818 - Is expression type not found.

  • lookup_label = 30819 - Label not found.

  • lookup_local_type = 30820 - Local type not found.

  • lookup_macro = 30821 - Macro not found.

  • lookup_method = 30822 - Method not found.

  • lookup_new_type = 30823 - New type not found.

  • lookup_safe_field_type = 30824 - Safe field type not found.

  • lookup_structure_field = 30825 - Structure field not found.

  • lookup_structure_field_type = 30826 - Structure field type not found.

  • lookup_super_class = 30827 - Super class not found.

  • lookup_super_constructor = 30828 - Super constructor not found.

  • lookup_super_finalizer = 30829 - Super finalizer not found.

  • lookup_super_method = 30830 - Super method not found.

  • lookup_tuple_field = 30831 - Tuple field not found.

  • lookup_type = 30832 - Type not found.

  • lookup_typeinfo_annotation = 30833 - Typeinfo annotation not found.

  • lookup_typeinfo_annotation_argument = 30834 - Typeinfo annotation argument not found.

  • lookup_typeinfo_macro = 30835 - Typeinfo macro not found.

  • lookup_typeinfo_offsetof_type = 30836 - Typeinfo offsetof type not found.

  • lookup_typeinfo_type = 30837 - Typeinfo type not found.

  • lookup_variable = 30838 - Variable not found.

  • lookup_variant_field = 30839 - Variant field not found.

  • lookup_variant_type = 30840 - Variant type not found.

  • cant_access_private_field = 30900 - Can’t access private field.

  • cant_access_private_structure = 30901 - Can’t access private structure.

  • cant_address_function = 30902 - Can’t address function.

  • cant_address_template_function = 30903 - Can’t address template function.

  • cant_annotation_field = 30904 - Can’t annotation field.

  • cant_apply_op = 30905 - Can’t apply op.

  • cant_argument = 30906 - Can’t argument.

  • cant_argument_structure = 30907 - Can’t argument structure.

  • cant_array_element = 30908 - Can’t array element.

  • cant_ascend = 30909 - Can’t ascend.

  • cant_assign_op = 30910 - Can’t assign op.

  • cant_block = 30911 - Can’t block.

  • cant_capture_variable = 30912 - Can’t capture variable.

  • cant_clone = 30913 - Can’t clone.

  • cant_clone_type = 30914 - Can’t clone type.

  • cant_copy = 30915 - Can’t copy.

  • cant_create_structure_annotation = 30916 - Can’t create structure annotation.

  • cant_delete = 30917 - Can’t delete.

  • cant_delete_local = 30918 - Can’t delete local.

  • cant_delete_smart_pointer = 30919 - Can’t delete smart pointer.

  • cant_delete_super = 30920 - Can’t delete super.

  • cant_dereference = 30921 - Can’t dereference.

  • cant_expression = 30922 - Can’t expression.

  • cant_field_class = 30923 - Can’t field class.

  • cant_finalize_block_annotation = 30924 - Can’t finalize block annotation.

  • cant_finalize_function_annotation = 30925 - Can’t finalize function annotation.

  • cant_finalize_structure_annotation = 30926 - Can’t finalize structure annotation.

  • cant_function = 30927 - Can’t function.

  • cant_get_field = 30928 - Can’t get field.

  • cant_get_field_pointer = 30929 - Can’t get field pointer.

  • cant_global = 30930 - Can’t global.

  • cant_index = 30931 - Can’t index.

  • cant_index_key = 30932 - Can’t index key.

  • cant_index_pointer = 30933 - Can’t index pointer.

  • cant_index_table = 30934 - Can’t index table.

  • cant_initialize_array_element = 30935 - Can’t initialize array element.

  • cant_initialize_private_field = 30936 - Can’t initialize private field.

  • cant_initialize_structure_field = 30937 - Can’t initialize structure field.

  • cant_initialize_variant_field = 30938 - Can’t initialize variant field.

  • cant_iterate_iterator = 30939 - Can’t iterate iterator.

  • cant_local = 30940 - Can’t local.

  • cant_move = 30941 - Can’t move.

  • cant_pointer = 30942 - Can’t pointer.

  • cant_result = 30943 - Can’t result.

  • cant_safe_get_field = 30944 - Can’t safe get field.

  • cant_safe_index = 30945 - Can’t safe index.

  • cant_safe_index_table = 30946 - Can’t safe index table.

  • cant_structure_field = 30947 - Can’t structure field.

  • cant_take_pointer = 30948 - Can’t take pointer.

  • cant_tuple = 30949 - Can’t tuple.

  • cant_type = 30950 - Can’t type.

  • cant_variant_field = 30951 - Can’t variant field.

  • cant_write = 30952 - Can’t write.

  • unsafe_address = 31000 - Unsafe address.

  • unsafe_argument = 31001 - Unsafe argument.

  • unsafe_array_safe_index = 31002 - Unsafe array safe index.

  • unsafe_capture_variable = 31003 - Unsafe capture variable.

  • unsafe_cast = 31004 - Unsafe cast.

  • unsafe_class = 31005 - Unsafe class.

  • unsafe_class_initializer = 31006 - Unsafe class initializer.

  • unsafe_class_local = 31007 - Unsafe class local.

  • unsafe_class_stack_construction = 31008 - Unsafe class stack construction.

  • unsafe_delete = 31009 - Unsafe delete.

  • unsafe_delete_pointer = 31010 - Unsafe delete pointer.

  • unsafe_fixed_array_safe_index = 31011 - Unsafe fixed array safe index.

  • unsafe_function = 31012 - Unsafe function.

  • unsafe_function_call = 31013 - Unsafe function call.

  • unsafe_global = 31014 - Unsafe global.

  • unsafe_global_pointer = 31015 - Unsafe global pointer.

  • unsafe_local = 31016 - Unsafe local.

  • unsafe_local_class = 31017 - Unsafe local class.

  • unsafe_local_in_scope_required = 31018 - Unsafe local in scope required.

  • unsafe_local_reference = 31019 - Unsafe local reference.

  • unsafe_local_type = 31020 - Unsafe local type.

  • unsafe_move = 31021 - Unsafe move.

  • unsafe_operator = 31022 - Unsafe operator.

  • unsafe_pointer_index = 31023 - Unsafe pointer index.

  • unsafe_pointer_safe_index = 31024 - Unsafe pointer safe index.

  • unsafe_return_block = 31025 - Unsafe return block.

  • unsafe_return_function = 31026 - Unsafe return function.

  • unsafe_return_reference = 31027 - Unsafe return reference.

  • unsafe_return_smart_pointer = 31028 - Unsafe return smart pointer.

  • unsafe_smart_pointer = 31029 - Unsafe smart pointer.

  • unsafe_structure_field = 31030 - Unsafe structure field.

  • unsafe_structure_uninitialized = 31031 - Unsafe structure uninitialized.

  • unsafe_structure_visibility = 31032 - Unsafe structure visibility.

  • unsafe_table_index = 31033 - Unsafe table index.

  • unsafe_table_safe_index = 31034 - Unsafe table safe index.

  • unsafe_variant_field = 31035 - Unsafe variant field.

  • unsafe_variant_safe_as = 31036 - Unsafe variant safe as.

  • recursion_argument = 31100 - Disallowed recursion in argument.

  • recursion_assume_alias = 31101 - Disallowed recursion in assume alias.

  • recursion_function = 31102 - Disallowed recursion in function.

  • recursion_function_argument = 31103 - Disallowed recursion in function argument.

  • recursion_global = 31104 - Disallowed recursion in global.

  • recursion_structure = 31105 - Disallowed recursion in structure.

  • recursion_type_alias = 31106 - Disallowed recursion in type alias.

  • runtime_annotation_transform = 31200 - Runtime failure in annotation transform.

  • runtime_call_macro = 31201 - Runtime failure in call macro.

  • runtime_expression = 31202 - Runtime failure in expression.

  • runtime_macro_exception = 31206 - Runtime failure in macro exception.

  • runtime_macro_infer = 31207 - Runtime failure in macro infer.

  • runtime_macro_performance = 31208 - Runtime failure in macro performance.

  • runtime_macro_style = 31209 - Runtime failure in macro style.

  • runtime_structure_annotation = 31210 - Runtime failure in structure annotation.

  • runtime_typeinfo_macro = 31211 - Runtime failure in typeinfo macro.

  • not_resolved_yet_argument_type = 31300 - Argument type not resolved yet.

  • not_resolved_yet_array_dimension = 31301 - Array dimension not resolved yet.

  • not_resolved_yet_array_type = 31302 - Array type not resolved yet.

  • not_resolved_yet_bitfield_type = 31303 - Bitfield type not resolved yet.

  • not_resolved_yet_block = 31304 - Block not resolved yet.

  • not_resolved_yet_block_argument = 31305 - Block argument not resolved yet.

  • not_resolved_yet_block_argument_init = 31306 - Block argument init not resolved yet.

  • not_resolved_yet_class_type = 31307 - Class type not resolved yet.

  • not_resolved_yet_comprehension_type = 31308 - Comprehension type not resolved yet.

  • not_resolved_yet_delete_size_type = 31309 - Delete size type not resolved yet.

  • not_resolved_yet_dereference_type = 31310 - Dereference type not resolved yet.

  • not_resolved_yet_enumerator = 31311 - Enumerator not resolved yet.

  • not_resolved_yet_expression_type = 31312 - Expression type not resolved yet.

  • not_resolved_yet_function = 31313 - Function not resolved yet.

  • not_resolved_yet_function_block = 31314 - Function block not resolved yet.

  • not_resolved_yet_generator_block = 31315 - Generator block not resolved yet.

  • not_resolved_yet_index_type = 31316 - Index type not resolved yet.

  • not_resolved_yet_invoke_argument_type = 31317 - Invoke argument type not resolved yet.

  • not_resolved_yet_is_expression_type = 31318 - Is expression type not resolved yet.

  • not_resolved_yet_label_type = 31319 - Label type not resolved yet.

  • not_resolved_yet_lambda_block = 31320 - Lambda block not resolved yet.

  • not_resolved_yet_local_type = 31321 - Local type not resolved yet.

  • not_resolved_yet_method_call = 31322 - Method call not resolved yet.

  • not_resolved_yet_new_type = 31323 - New type not resolved yet.

  • not_resolved_yet_null_coalescing_type = 31324 - Null coalescing type not resolved yet.

  • not_resolved_yet_structure = 31325 - Structure not resolved yet.

  • not_resolved_yet_structure_field = 31326 - Structure field not resolved yet.

  • not_resolved_yet_structure_type = 31327 - Structure type not resolved yet.

  • not_resolved_yet_table_type = 31328 - Table type not resolved yet.

  • not_resolved_yet_tuple_type = 31329 - Tuple type not resolved yet.

  • not_resolved_yet_type = 31330 - Type not resolved yet.

  • not_resolved_yet_type_alias = 31331 - Type alias not resolved yet.

  • not_resolved_yet_typeinfo = 31332 - Typeinfo not resolved yet.

  • not_resolved_yet_typeinfo_alignof = 31333 - Typeinfo alignof not resolved yet.

  • not_resolved_yet_typeinfo_dim = 31334 - Typeinfo dim not resolved yet.

  • not_resolved_yet_typeinfo_dim_table = 31335 - Typeinfo dim table not resolved yet.

  • not_resolved_yet_typeinfo_sizeof = 31336 - Typeinfo sizeof not resolved yet.

  • concept_failed = 31400 - Concept failed.

  • condition_must_be_bool = 31401 - Condition must be bool.

  • not_expecting_result = 31402 - Not expecting result.

  • static_assert_failed = 31403 - Static assert failed.

  • invalid_options = 50100 - Invalid options.

  • mismatching_runtime_type = 50200 - Mismatching runtime type.

  • mismatching_runtime_type_hash = 50201 - Mismatching runtime type hash.

  • exceeds_array = 50300 - Array size exceeds limit.

  • exceeds_global = 50301 - Global size exceeds limit.

  • exceeds_runtime_buffer = 50302 - Runtime buffer size exceeds limit.

  • cant_hash_block = 50400 - Can’t hash block.

  • cant_hash_context = 50401 - Can’t hash context.

  • cant_hash_iterator = 50402 - Can’t hash iterator.

  • cant_serialize_block = 50403 - Can’t serialize block.

  • cant_serialize_iterator = 50404 - Can’t serialize iterator.

  • cant_serialize_null_pointer = 50405 - Can’t serialize null pointer.

  • cant_serialize_pointer = 50406 - Can’t serialize pointer.

  • cant_serialize_table = 50407 - Can’t serialize table.

  • runtime_function = 50500 - Runtime failure in function.

  • runtime_function_annotation = 50501 - Runtime failure in function annotation.

  • runtime_global = 50502 - Runtime failure in global.

  • runtime_macro = 50503 - Runtime failure in macro.

  • internal_annotation = 50600 - Internal compiler error in annotation.

  • internal_array = 50601 - Internal compiler error in array.

  • internal_array_type = 50602 - Internal compiler error in array type.

  • internal_block = 50603 - Internal compiler error in block.

  • internal_block_missing_return_type = 50604 - Internal compiler error in block missing return type.

  • internal_class = 50605 - Internal compiler error in class.

  • internal_enumeration = 50606 - Internal compiler error in enumeration.

  • internal_expression = 50607 - Internal compiler error in expression.

  • internal_field = 50608 - Internal compiler error in field.

  • internal_function = 50609 - Internal compiler error in function.

  • internal_function_annotation = 50610 - Internal compiler error in function annotation.

  • internal_function_changed = 50611 - Internal compiler error in function changed.

  • internal_function_name = 50612 - Internal compiler error in function name.

  • internal_function_not_resolved_yet = 50613 - Internal compiler error in function not resolved yet.

  • internal_function_refresh = 50614 - Internal compiler error in function refresh.

  • internal_generator = 50615 - Internal compiler error in generator.

  • internal_generator_finalizer = 50616 - Internal compiler error in generator finalizer.

  • internal_generator_finalizer_multiple = 50617 - Internal compiler error in generator finalizer multiple.

  • internal_generator_finalizer_name = 50618 - Internal compiler error in generator finalizer name.

  • internal_generator_function_name = 50619 - Internal compiler error in generator function name.

  • internal_generator_structure_name = 50620 - Internal compiler error in generator structure name.

  • internal_global = 50621 - Internal compiler error in global.

  • internal_label = 50622 - Internal compiler error in label.

  • internal_lambda_finalizer_name = 50623 - Internal compiler error in lambda finalizer name.

  • internal_lambda_function_name = 50624 - Internal compiler error in lambda function name.

  • internal_lambda_in_scope_conversion = 50625 - Internal compiler error in lambda in scope conversion.

  • internal_lambda_structure_name = 50626 - Internal compiler error in lambda structure name.

  • internal_macro = 50627 - Internal compiler error in macro.

  • internal_name = 50628 - Internal compiler error in name.

  • internal_options = 50629 - Internal compiler error in options.

  • internal_pod_analysis_infer = 50630 - Internal compiler error in pod analysis infer.

  • internal_relocate_infer = 50631 - Internal compiler error in relocate infer.

  • internal_structure = 50632 - Internal compiler error in structure.

  • internal_structure_block = 50633 - Internal compiler error in structure block.

  • internal_table = 50634 - Internal compiler error in table.

  • internal_tuple = 50635 - Internal compiler error in tuple.

  • internal_tuple_type = 50636 - Internal compiler error in tuple type.

  • internal_type = 50637 - Internal compiler error in type.

  • internal_type_alias = 50638 - Internal compiler error in type alias.

  • internal_typeinfo_macro = 50639 - Internal compiler error in typeinfo macro.

  • internal_variable = 50640 - Internal compiler error in variable.

  • missing_aot = 50101 - Missing AOT generated code for the function.

  • syntax_error = 20001 - Syntax error, usually invalid grammar.

  • function_not_found = 30341 - Function not found.

  • function_already_declared = 30342 - Function already declared.

  • invalid_return_type = 30343 - Invalid return type.

  • invalid_initialization_type = 30344 - Invalid initialization type.

  • invalid_private = 30345 - Invalid private.

  • invalid_static = 30346 - Invalid static.

  • aot_side_effects = 40500 - AOT side effects.

  • cant_pipe = 30347 - Can’t pipe.

  • enumeration_value_already_declared = 30348 - Enumeration value already declared.

  • invalid_escape_sequence = 10005 - Invalid escape sequence.

  • invalid_option = 30349 - Invalid option.

  • module_already_has_a_name = 30350 - Module already has a name.

  • type_alias_already_declared = 30351 - Type alias already declared.

  • unsupported_read_macro = 30352 - Unsupported read macro.

ConstMatters

Yes or no flag which indicates if constant flag of the type matters (during comparison).

Values:
  • no = 0 - const does not matter, when comparing types.

  • yes = 1 - const matters, when comparing types.

RefMatters

Yes or no flag which indicates if reference flag of the type matters (during comparison).

Values:
  • no = 0 - Ref does not matter, when comparing types.

  • yes = 1 - Ref matters, when comparing types.

TemporaryMatters

Yes or no flag which indicates if temporary flag of the type matters (during comparison).

Values:
  • no = 0 - Temporary does not matter, when comparing types.

  • yes = 1 - Temporary matters, when comparing types.

Type

One of the fundamental (base) types of any type object.

Values:
  • none = 0 - No type specified (not void, not anything).

  • autoinfer = 1 - Auto-inferred type (auto)

  • alias = 2 - Type alias.

  • option = 3 - Optional type (foo|bar|…)

  • typeDecl = 4 - Type declaration typedecl(expr…)

  • typeMacro = 5 - Type macro. $type_macro_name(args…)

  • fakeContext = 6 - Fake context type (used for internal purposes to pass context as argument to C++ functions)

  • fakeLineInfo = 7 - Fake line info type (used for internal purposes to pass line info as argument to C++ functions)

  • anyArgument = 8 - Any argument type (only available for C++ interop functions, TypeInfo is provided)

  • tVoid = 9 - Void type.

  • tBool = 10 - Boolean type.

  • tInt8 = 11 - 8-bit integer type.

  • tUInt8 = 12 - 8-bit unsigned integer type.

  • tInt16 = 13 - 16-bit integer type.

  • tUInt16 = 14 - 16-bit unsigned integer type.

  • tInt64 = 15 - 64-bit integer type.

  • tUInt64 = 16 - 64-bit unsigned integer type.

  • tInt = 17 - 32-bit integer type.

  • tInt2 = 18 - vector of 2 32-bit integers.

  • tInt3 = 19 - vector of 3 32-bit integers.

  • tInt4 = 20 - vector of 4 32-bit integers.

  • tUInt = 21 - 32-bit unsigned integer type.

  • tUInt2 = 22 - vector of 2 32-bit unsigned integers.

  • tUInt3 = 23 - vector of 3 32-bit unsigned integers.

  • tUInt4 = 24 - vector of 4 32-bit unsigned integers.

  • tFloat = 25 - 32-bit floating point type.

  • tFloat2 = 26 - vector of 2 32-bit floating point numbers.

  • tFloat3 = 27 - vector of 3 32-bit floating point numbers.

  • tFloat4 = 28 - vector of 4 32-bit floating point numbers.

  • tDouble = 29 - 64-bit floating point type.

  • tRange = 30 - 32-bit range type, similar to vector of two 32-bit integers.

  • tURange = 31 - 32-bit unsigned range type, similar to vector of two 32-bit unsigned integers.

  • tRange64 = 32 - 64-bit range type, similar to vector of two 64-bit integers.

  • tURange64 = 33 - 64-bit unsigned range type, similar to vector of two 64-bit unsigned integers.

  • tString = 34 - String type.

  • tStructure = 35 - Structure type.

  • tHandle = 36 - Handle type (C++ type specified via annotation).

  • tEnumeration = 37 - 32-bit enumeration type.

  • tEnumeration8 = 38 - 8-bit enumeration type.

  • tEnumeration16 = 39 - 16-bit enumeration type.

  • tEnumeration64 = 40 - 64-bit enumeration type.

  • tBitfield = 41 - 32-bit bitfield type.

  • tBitfield8 = 42 - 8-bit bitfield type.

  • tBitfield16 = 43 - 16-bit bitfield type.

  • tBitfield64 = 44 - 64-bit bitfield type.

  • tPointer = 45 - Pointer type.

  • tFunction = 46 - Function type.

  • tLambda = 47 - Lambda type.

  • tIterator = 48 - Iterator type.

  • tArray = 49 - Array type.

  • tTable = 50 - Table type.

  • tBlock = 51 - Block type.

  • tTuple = 52 - Tuple type.

  • tVariant = 53 - Variant type.

10.1.4. Handled structures

Program
Program.getThisModule(): Module?

Property-like accessor that returns the Module pointer for the module currently being inferred in the given Program.

Program.getDebugger(): bool

Property-like accessor that returns true if the debugger is attached and enabled for the given Program.

Properties:
  • getThisModule : Module?

  • getDebugger : bool

Object representing full information about Daslang program during and after compilation (but not the simulated result of the program).

Fields:
  • thisNamespace : das_string - namespace of the program

  • thisModuleName : das_string - module name

  • totalFunctions : int - total number of functions in the program

  • totalVariables : int - total number of variables in the program

  • errors : vector<Error> - compilation errors and exceptions

  • globalStringHeapSize : uint - size of the global string heap

  • initSemanticHashWithDep : uint64 - initial semantic hash with dependencies

  • flags : ProgramFlags - program flags

  • _options : AnnotationArgumentList - program options

  • policies : CodeOfPolicies - code of policies

SimFunction
SimFunction.lineInfo(): LineInfo const?

Property-like accessor that returns the LineInfo (source location) associated with the given function’s FuncInfo.

Properties:

Object which represents simulated function in the Context.

Fields:
  • name : string - original function name

  • mangledName : string - mangled function name (with arguments and types encoded)

  • debugInfo : FuncInfo? - pointer to the function debug info, if available

  • mangledNameHash : uint64 - hash of the mangled function name

  • stackSize : uint - stack size in bytes

  • flags : SimFunctionFlags - flags associated with the function

AnnotationArgument

Single argument of the annotation, typically part of the AnnotationArgumentList.

Fields:
  • basicType : Type - type of the argument value

  • name : das_string - argument name

  • sValue : das_string - string value

  • fValue : float - integer value

  • iValue : int - float value

  • bValue : bool - boolean value

  • at : LineInfo - line info where the argument is defined

CodeOfPolicies
Fields:
  • aot : bool - Object which holds compilation and simulation settings and restrictions.

  • aot_lib : bool - Whether ahead-of-time compilation is enabled.

  • standalone_context : bool - AOT library mode.

  • aot_module : bool - Whether standalone context AOT compilation is enabled.

  • aot_macros : bool - Specifies to AOT if we are compiling a module, or a final program.

  • paranoid_validation : bool - Enables AOT of macro code (like ‘qmacro_block’ etc).

  • validate_ast : bool - Whether paranoid validation is enabled (extra checks, no optimizations).

  • cross_platform : bool - Whether to validate the AST after compilation (uniqueness checks, etc.). Off by default (slow).

  • aot_result : das_string - Whether cross-platform AOT is enabled (if not, we generate code for the current platform).

  • completion : bool - File name for AOT output (if not set, we generate a temporary file).

  • lint_check : bool - If we are in code completion mode.

  • export_all : bool - Whether we are in lint-check mode (standalone linters set this so modules can adapt behavior).

  • serialize_main_module : bool - Export all functions and global variables.

  • keep_alive : bool - If not set, we recompile main module each time.

  • very_safe_context : bool - Keep context alive after main function.

  • always_report_candidates_threshold : int - Whether to use very safe context (delete of data is delayed, to avoid table[foo]=table[bar] lifetime bugs).

  • max_infer_passes : int - Threshold for reporting candidates for function calls. If less than this number, we always report them.

  • max_call_depth : int - Maximum number of inference passes.

  • stack : uint - Stack size.

  • intern_strings : bool - Whether to intern strings.

  • persistent_heap : bool - Whether to use persistent heap (or linear heap).

  • multiple_contexts : bool - Whether multiple contexts are allowed (pinvokes between contexts).

  • heap_size_hint : uint - Heap size hint.

  • string_heap_size_hint : uint - String heap size hint.

  • solid_context : bool - Whether to use solid context (global variables are cemented at locations, can’t be called from other contexts via pinvoke).

  • macro_context_persistent_heap : bool - Whether macro context uses persistent heap.

  • macro_context_collect : bool - Whether macro context does garbage collection.

  • max_static_variables_size : uint64 - Maximum size of static variables.

  • max_heap_allocated : uint64 - Maximum heap allocated.

  • max_string_heap_allocated : uint64 - Maximum string heap allocated.

  • track_allocations : bool - Track where each heap allocation came from (line info + comment). When enabled, every allocation routes through the large-object map so heap->report() can list leaks with source location.

  • rtti : bool - Whether to enable RTTI.

  • unsafe_table_lookup : bool - Whether to allow unsafe table lookups (via [] operator).

  • relaxed_pointer_const : bool - Whether to relax pointer constness rules.

  • version_2_syntax : bool - Allows use of version 2 syntax.

  • gen2_make_syntax : bool - Whether to use gen2 make syntax.

  • relaxed_assign : bool - Allows relaxing of the assignment rules.

  • no_unsafe : bool - Disables all unsafe operations.

  • local_ref_is_unsafe : bool - Local references are considered unsafe.

  • no_global_variables : bool - Disallows global variables in this context (except for generated).

  • no_global_variables_at_all : bool - Disallows global variables at all in this context.

  • no_global_heap : bool - Disallows global heap in this context.

  • only_fast_aot : bool - Only fast AOT, no C++ name generation.

  • aot_order_side_effects : bool - Whether to consider side effects during AOT ordering.

  • no_unused_function_arguments : bool - Errors on unused function arguments.

  • no_unused_block_arguments : bool - Errors on unused block arguments.

  • allow_block_variable_shadowing : bool - Allows block variable shadowing.

  • allow_local_variable_shadowing : bool - Allows local variable shadowing.

  • allow_shared_lambda : bool - Allows shared lambdas.

  • ignore_shared_modules : bool - Ignore shared modules during compilation.

  • default_module_public : bool - Default module mode is public.

  • no_deprecated : bool - Disallows use of deprecated features.

  • no_aliasing : bool - Disallows aliasing (if aliasing is allowed, temporary lifetimes are extended).

  • strict_smart_pointers : bool - Enables strict smart pointer checks.

  • no_init : bool - Disallows use of ‘init’ in structures.

  • strict_unsafe_delete : bool - Enables strict unsafe delete checks.

  • no_members_functions_in_struct : bool - Disallows member functions in structures.

  • no_local_class_members : bool - Disallows local class members.

  • report_invisible_functions : bool - Report invisible functions.

  • report_private_functions : bool - Report private functions.

  • strict_properties : bool - Enables strict property checks.

  • no_optimizations : bool - Disables all optimizations.

  • no_infer_time_folding : bool - Disables infer-time constant folding.

  • fail_on_no_aot : bool - Fails compilation if AOT is not available.

  • fail_on_lack_of_aot_export : bool - Fails compilation if AOT export is not available.

  • log_compile_time : bool - Log compile time.

  • log_total_compile_time : bool - Log total compile time.

  • no_fast_call : bool - Disables fast call optimization.

  • scoped_stack_allocator : bool - Reuse stack memory after variables go out of scope.

  • force_inscope_pod : bool - Force in-scope for POD-like types.

  • log_inscope_pod : bool - Log in-scope for POD-like types.

  • debugger : bool - Enables debugger support.

  • debug_infer_flag : bool - Enables debug inference flag.

  • profiler : bool - Enables profiler support.

  • threadlock_context : bool - Enables threadlock context.

  • jit_enabled : bool - JIT enabled - if enabled, JIT will be used to compile code at runtime.

  • jit_jit_all_functions : bool - JIT all functions - if enabled, JIT will compile all functions in the module.

  • jit_debug_info : bool - JIT debug info - if enabled, JIT will generate debug info for JIT compiled code.

  • jit_dll_mode : bool - JIT dll mode - if enabled, JIT will generate DLL’s into JIT output folder and load them from there.

  • jit_exe_mode : bool - JIT exe mode - if enabled, JIT will generate standalone executable.

  • emit_prologue : bool - JIT will always emit function prologues, which allows call-stack in debuggers.

  • jit_output_path : das_string - JIT output folder (where JIT compiled code will be stored).

  • jit_opt_level : int - JIT optimization level for compiled code (0-3).

  • jit_size_level : int - JIT size optimization level for compiled code (0-3).

  • jit_path_to_shared_lib : das_string - Path to shared library, which is used in JIT.

  • jit_path_to_linker : das_string - Path to linker, which is used in JIT.

LocalVariableInfo

Object which represents local variable declaration.

Fields:
  • firstType : TypeInfo? - first type parameter

  • secondType : TypeInfo? - second type parameter

  • argTypes : TypeInfo?? - argument types list

  • argNames : string? - argument names list

  • hash : uint64 - hash of the type

  • basicType : Type - basic type category

  • flags : TypeInfoFlags - flags associated with the type

  • size : uint - size of the type in bytes

  • argCount : uint - number of arguments in the type

  • dimSize : uint - number of dimensions in the type

  • visibility : LineInfo - visibility information

  • name : string - name of the variable

  • stackTop : uint - stack top offset

  • localFlags : LocalVariableInfoFlags - local variable flags

AstSerializer

Dummy annotation to strengthen type system. Can only be passed to its API functions.

DebugInfoHelper

Helper object which holds debug information about the simulated program.

Fields:
  • rtti : bool - The RTTI context pointer.

Context
Context.totalFunctions(): int

Property-like accessor that returns the total number of registered SimFunction entries in the given Context.

Context.totalVariables(): int

Property-like accessor that returns the total number of global variables registered in the given Context.

Context.getCodeAllocatorId(): uint64

Property-like accessor that returns a non-persistent unique integer ID of the code (node) allocator associated with the given Context.

Properties:
  • totalFunctions : int

  • totalVariables : int

  • getCodeAllocatorId : uint64

Object which holds single Daslang Context. Context is the result of the simulation of the Daslang program.

Fields:
  • breakOnException : bool - Calls breakpoint when exception is thrown.

  • alwaysErrorOnException : bool - Always error on exception.

  • alwaysStackWalkOnException : bool - Always stack walk on exception.

  • name : das_string - Context name.

  • category : context_category_flags - Context category flags.

  • exceptionAt : LineInfo - Exception at line info.

  • exception : string - Exception message.

  • last_exception : string - Last exception message.

  • contextMutex : recursive_mutex? - Context mutex.

VarInfo

Object which represents variable declaration.

Fields:
  • firstType : TypeInfo? - first type parameter

  • secondType : TypeInfo? - second type parameter

  • argTypes : TypeInfo?? - argument types list

  • argNames : string? - argument names list

  • hash : uint64 - hash of the type

  • basicType : Type - basic type category

  • flags : TypeInfoFlags - flags associated with the type

  • size : uint - size of the type in bytes

  • argCount : uint - number of arguments in the type

  • dimSize : uint - number of dimensions in the type

  • sValue : string - value of the variable

  • value : any - string value of the variable

  • name : string - name of the variable

  • annotation_arguments : AnnotationArguments? - annotation arguments

  • offset : uint - offset of the variable in the structure

  • nextGcField : uint - next garbage collection field in the structure, which requires garbage collection marking

TypeAnnotation
TypeAnnotation.is_any_vector(): bool

Property-like accessor that returns true if the given TypeAnnotation wraps any C++ vector-like container (e.g., std::vector).

TypeAnnotation.canMove(): bool

Property-like accessor that returns true if the given TypeAnnotation supports move semantics.

TypeAnnotation.canCopy(): bool

Property-like accessor that returns true if the given TypeAnnotation supports copy semantics.

TypeAnnotation.canClone(): bool

Property-like accessor that returns true if the given TypeAnnotation supports the clone operation.

TypeAnnotation.isPod(): bool

Property-like accessor that returns true if the given TypeAnnotation is a POD (plain old data) type — no constructor, destructor, or special semantics.

TypeAnnotation.isRawPod(): bool

Property-like accessor that returns true if the given TypeAnnotation is a raw POD type — a basic value type excluding pointers and strings.

TypeAnnotation.isRefType(): bool

Property-like accessor that returns true if the given TypeAnnotation is always passed by reference, or is itself a reference type.

TypeAnnotation.hasNonTrivialCtor(): bool

Property-like accessor that returns true if the given TypeAnnotation has a non-trivial constructor (requires explicit initialization).

TypeAnnotation.hasNonTrivialDtor(): bool

Property-like accessor that returns true if the given TypeAnnotation has a non-trivial destructor (requires explicit finalization).

TypeAnnotation.hasNonTrivialCopy(): bool

Property-like accessor that returns true if the given TypeAnnotation has non-trivial copy semantics (i.e., a custom copy constructor).

TypeAnnotation.canBePlacedInContainer(): bool

Property-like accessor that returns true if values of the given TypeAnnotation can be stored inside arrays, tables, or other containers.

TypeAnnotation.isLocal(): bool

Property-like accessor that returns true if the given TypeAnnotation can be used as a local variable type within a function.

TypeAnnotation.canNew(): bool

Property-like accessor that returns true if the given TypeAnnotation supports heap allocation via new.

TypeAnnotation.canDelete(): bool

Property-like accessor that returns true if values of the given TypeAnnotation can be explicitly deleted.

TypeAnnotation.needDelete(): bool

Property-like accessor that returns true if values of the given TypeAnnotation require explicit delete to free resources.

TypeAnnotation.canDeletePtr(): bool

Property-like accessor that returns true if a pointer to the given TypeAnnotation type can be explicitly deleted.

TypeAnnotation.isIterable(): bool

Property-like accessor that returns true if the given TypeAnnotation supports iteration via for.

TypeAnnotation.isShareable(): bool

Property-like accessor that returns true if the given TypeAnnotation can be shared across multiple Context objects.

TypeAnnotation.isSmart(): bool

Property-like accessor that returns true if the given TypeAnnotation represents a smart_ptr managed type.

TypeAnnotation.avoidNullPtr(): bool

Property-like accessor that returns true if the given TypeAnnotation requires pointers to its type to be non-null (i.e., must be initialized on creation).

TypeAnnotation.sizeOf(): uint64

Property-like accessor that returns the size in bytes of the type described by the given TypeAnnotation.

TypeAnnotation.alignOf(): uint64

Property-like accessor that returns the memory alignment requirement (in bytes) of the type described by the given TypeAnnotation.

Properties:
  • is_any_vector : bool

  • canMove : bool

  • canCopy : bool

  • canClone : bool

  • isPod : bool

  • isRawPod : bool

  • isRefType : bool

  • hasNonTrivialCtor : bool

  • hasNonTrivialDtor : bool

  • hasNonTrivialCopy : bool

  • canBePlacedInContainer : bool

  • isLocal : bool

  • canNew : bool

  • canDelete : bool

  • needDelete : bool

  • canDeletePtr : bool

  • isIterable : bool

  • isShareable : bool

  • isSmart : bool

  • avoidNullPtr : bool

  • sizeOf : uint64

  • alignOf : uint64

Handled type.

Fields:
  • name : das_string - name of the type annotation

  • cppName : das_string - name of the associated C++ type

  • _module : Module? - module where the annotation is defined

FileInfo

Information about a single file stored in the FileAccess object.

Fields:
  • name : das_string - File name.

  • tabSize : int - Tab size for this file.

EnumInfo

Type object which represents enumeration.

Fields:
  • name : string - name of the enumeration

  • module_name : string - module where the enumeration is defined

  • fields : EnumValueInfo?? - fields in the enumeration

  • count : uint - number of fields in the enumeration

  • hash : uint64 - hash of the enumeration

AnnotationDeclaration

Annotation declaration, its location, and arguments.

Fields:
BasicStructureAnnotation
BasicStructureAnnotation.fieldCount(): int

Property-like accessor that returns the number of fields declared in the given BasicStructureAnnotation.

Properties:
  • fieldCount : int

Handled type which represents a structure-like annotation for exposing C++ types to daslang.

Fields:
  • name : das_string - Name of the annotation

  • cppName : das_string - C++ class name used in AOT code generation

FileAccess

Object which holds collection of files as well as means to access them (Project).

Module
Fields:
  • name : das_string - Collection of types, aliases, functions, classes, macros etc under a single namespace.

  • cppClassName : das_string - Module name.

  • fileName : das_string - Module file name.

  • moduleFlags : ModuleFlags - Module flags.

Annotation
Annotation.isTypeAnnotation(): bool

Property-like accessor that returns true if the given Annotation is a TypeAnnotation (defines a handled type).

Annotation.isBasicStructureAnnotation(): bool

Property-like accessor that returns true if the given Annotation is a BasicStructureAnnotation, which exposes C++ struct fields to daslang.

Annotation.isStructureAnnotation(): bool

Property-like accessor that returns true if the given Annotation is a structure annotation (applied to struct declarations).

Annotation.isStructureTypeAnnotation(): bool

Property-like accessor that returns true if the given Annotation is a StructureTypeAnnotation, which binds a C++ class as a daslang handled struct.

Annotation.isFunctionAnnotation(): bool

Property-like accessor that returns true if the given Annotation is a FunctionAnnotation (applied to functions).

Annotation.isEnumerationAnnotation(): bool

Property-like accessor that returns true if the given Annotation is an EnumerationAnnotation.

Properties:
  • isTypeAnnotation : bool

  • isBasicStructureAnnotation : bool

  • isStructureAnnotation : bool

  • isStructureTypeAnnotation : bool

  • isFunctionAnnotation : bool

  • isEnumerationAnnotation : bool

Handled type or macro.

Fields:
  • name : das_string - name of the annotation

  • cppName : das_string - name of the associated C++ type or macro

  • _module : Module? - module where the annotation is defined

Error

Object which holds information about compilation error or exception.

Fields:
LineInfo

Information about a section of the file stored in the FileAccess object.

Fields:
  • fileInfo : FileInfo? - File information object.

  • column : uint - Column number (1-based).

  • line : uint - Line number (1-based).

  • last_column : uint - Last column number (1-based).

  • last_line : uint - Last line number (1-based).

EnumValueInfo

Single element of enumeration, its name and value.

Fields:
  • name : string - name of the enumeration value

  • value : int64 - value of the enumeration value

ModuleGroup

Collection of modules.

StructInfo

Type object which represents structure or class.

Fields:
  • name : string - name of the structure

  • module_name : string - module where the structure is defined

  • fields : VarInfo?? - fields in the structure

  • hash : uint64 - hash of the structure

  • init_mnh : uint64 - hash of the structure initializer

  • flags : StructInfoFlags - flags associated with the structure

  • count : uint - number of fields in the structure

  • size : uint - size of the structure in bytes

  • firstGcField : uint - index of the first GC field in the structure, i.e. field which requires garbage collection marking

TypeInfo
TypeInfo.enumType(): EnumInfo?

Property-like accessor that returns the EnumInfo pointer describing the underlying enumeration for the given enum TypeAnnotation.

TypeInfo.isRef(): bool

Property-like accessor that returns true if the given TypeInfo describes a reference (&) type.

TypeInfo.isRefType(): bool

Property-like accessor that returns true if the given TypeAnnotation is always passed by reference, or is itself a reference type.

TypeInfo.isRefValue(): bool

Property-like accessor that returns true if the given TypeInfo describes a ref-value type (boxed value accessed by reference).

TypeInfo.canCopy(): bool

Property-like accessor that returns true if the given TypeAnnotation supports copy semantics.

TypeInfo.isPod(): bool

Property-like accessor that returns true if the given TypeAnnotation is a POD (plain old data) type — no constructor, destructor, or special semantics.

TypeInfo.isRawPod(): bool

Property-like accessor that returns true if the given TypeAnnotation is a raw POD type — a basic value type excluding pointers and strings.

TypeInfo.isConst(): bool

Property-like accessor that returns true if the given TypeInfo describes a const-qualified type.

TypeInfo.isTemp(): bool

Property-like accessor that returns true if the given TypeInfo describes a temporary (#) type that cannot be captured or stored.

TypeInfo.isImplicit(): bool

Property-like accessor that returns true if the given TypeInfo describes an implicit (compiler-inferred) type.

TypeInfo.annotation(): TypeAnnotation?

Property-like accessor that returns the Annotation pointer associated with the given TypeInfo.

TypeInfo.annotation_or_name(): TypeAnnotation?

Property-like accessor that returns the annotation name if one exists, otherwise returns the raw type name from the given TypeInfo.

TypeInfo.structType(): StructInfo?

Property-like accessor that returns the StructInfo pointer for the struct described by the given TypeInfo, or null if not a struct type.

Properties:
  • enumType : EnumInfo?

  • isRef : bool

  • isRefType : bool

  • isRefValue : bool

  • canCopy : bool

  • isPod : bool

  • isRawPod : bool

  • isConst : bool

  • isTemp : bool

  • isImplicit : bool

  • annotation : TypeAnnotation?

  • annotation_or_name : TypeAnnotation?

  • structType : StructInfo?

Object which represents any Daslang type.

Fields:
  • firstType : TypeInfo? - first type parameter

  • secondType : TypeInfo? - second type parameter

  • argTypes : TypeInfo?? - argument types list

  • argNames : string? - argument names list

  • dim : uint? - dimensions list

  • hash : uint64 - hash of the type

  • _type : Type - kind of the type

  • basicType : Type - basic type category

  • flags : TypeInfoFlags - flags associated with the type

  • size : uint - size of the type in bytes

  • argCount : uint - number of arguments in the type

  • dimSize : uint - number of dimensions in the type

FuncInfo

Object which represents function declaration.

Fields:
  • name : string - function name

  • cppName : string - C++ name (for the builtin functions)

  • fields : VarInfo?? - function parameters

  • result : TypeInfo? - function result type

  • locals : LocalVariableInfo?? - local variables (with visibility info)

  • globals : VarInfo?? - accessed global variables

  • hash : uint64 - hash of the function

  • flags : uint - flags associated with the function

  • count : uint - number of arguments in the function

  • stackSize : uint - stack size in bytes

  • localCount : uint - number of local variables

  • globalCount : uint - number of accessed global variables

10.1.5. Typeinfo macros

rtti_typeinfo

Typeinfo macro that provides compile-time access to RTTI type information structures. Typeinfo macro rtti_typeinfo

10.1.6. Handled types

AnnotationList

Handled type representing all annotations attached to a single object (function, structure, or variable), iterable via each.

AnnotationArgumentList

Handled type representing an ordered list of annotation arguments and properties, providing indexed and named access to argument entries.

recursive_mutex

Handled type wrapping a system std::recursive_mutex, used with lock_mutex for thread-safe access to shared data across contexts.

AnnotationArguments

Handled type representing a collection of annotation arguments, typically the raw argument list parsed from an annotation declaration.

10.1.7. Initialization and finalization

CodeOfPolicies(): CodeOfPolicies

Constructs a default-initialized CodeOfPolicies structure, which controls compiler behavior and optimization settings.

10.1.7.1. LineInfo

LineInfo(): LineInfo

Constructs a default-initialized LineInfo structure representing source file location (file, line, column).

LineInfo(arg0: FileInfo?; arg1: int; arg2: int; arg3: int; arg4: int): LineInfo

RttiValue_nothing(): auto

def RttiValue_nothing () : auto

10.1.7.2. using

using(arg0: block<(CodeOfPolicies):void>)

Creates a temporary RTTI helper object (e.g., Program, DebugInfoHelper) scoped to the given block, automatically finalized on block exit.

Arguments:
using(arg0: block<(ModuleGroup):void>)
using(arg0: block<(recursive_mutex):void>)

10.1.8. Type access

10.1.8.1. arg_names

arg_names(info: TypeInfo): auto

def arg_names (info: TypeInfo) : auto

Arguments:
arg_names(info: VarInfo): auto

10.1.8.2. arg_types

arg_types(info: VarInfo): auto

def arg_types (info: VarInfo) : auto

Arguments:
arg_types(info: TypeInfo): auto

builtin_is_same_type(a: TypeInfo const?; b: TypeInfo const?; refMatters: RefMatters; cosntMatters: ConstMatters; tempMatters: TemporaryMatters; topLevel: bool): bool

Returns true if two TypeInfo pointers describe the same type, with flags controlling whether ref, const, temp, and other qualifiers are included in the comparison.

Arguments:

10.1.8.3. each_dim

each_dim(info: TypeInfo): auto

def each_dim (info: TypeInfo) : auto

Arguments:
each_dim(info: VarInfo): auto

get_das_type_name(type: Type): string

Returns the canonical string name of the given Type enumeration value (e.g., tInt"int").

Arguments:

10.1.8.4. get_dim

get_dim(typeinfo: VarInfo; index: int): int

Returns the dimension size (int) at the specified index for a fixed-size array type described by TypeInfo.

Arguments:
  • typeinfo : VarInfo implicit

  • index : int

get_dim(typeinfo: TypeInfo; index: int): int

get_type_align(type: TypeInfo?): int

Returns the memory alignment (int, in bytes) of the type described by the given TypeInfo.

Arguments:
get_type_size(type: TypeInfo?): int

Returns the size (int, in bytes) of the type described by the given TypeInfo.

Arguments:

10.1.8.5. is_compatible_cast

is_compatible_cast(from: StructInfo const?; to: StructInfo const?): bool

Returns true if an object of type from (StructInfo) can be safely cast to type to (StructInfo), following the class hierarchy.

Arguments:
is_compatible_cast(a: StructInfo; b: StructInfo): auto

is_same_type(a: TypeInfo; b: TypeInfo; refMatters: RefMatters = RefMatters.yes; constMatters: ConstMatters = ConstMatters.yes; temporaryMatters: TemporaryMatters = TemporaryMatters.yes; topLevel: bool = true): auto

def is_same_type (a: TypeInfo; b: TypeInfo; refMatters: RefMatters = RefMatters.yes; constMatters: ConstMatters = ConstMatters.yes; temporaryMatters: TemporaryMatters = TemporaryMatters.yes; topLevel: bool = true) : auto

Arguments:

10.1.9. Rtti context access

class_info(cl: auto): StructInfo const?

def class_info (cl: auto) : StructInfo const?

Arguments:
  • cl : auto

context_for_each_function(blk: block<(info:FuncInfo):void>): auto

def context_for_each_function (blk: block<(info:FuncInfo):void>) : auto

Arguments:
context_for_each_variable(blk: block<(info:VarInfo):void>): auto

def context_for_each_variable (blk: block<(info:VarInfo):void>) : auto

Arguments:
  • blk : block<(info: VarInfo):void>

get_function_by_mnh(context: Context; MNH: uint64) : function<():void>

Returns a SimFunction pointer looked up by mangled name hash — an alternative form of get_function_address.

Arguments:
  • context : Context implicit

  • MNH : uint64

10.1.9.1. get_function_info

get_function_info(context: any; index: int): FuncInfo

Returns the FuncInfo pointer for a function at the given index in the Context, providing access to its name, arguments, and return type.

Arguments:
  • context : any

  • index : int

get_function_info(context: Context; function: function<():void>): FuncInfo const?

10.1.9.2. get_line_info

get_line_info(): LineInfo

Returns a LineInfo structure representing the source location (file, line, column) of the call site where get_line_info is invoked.

get_line_info(depth: int): LineInfo

get_total_functions(context: Context): int

Returns the total number of registered functions (int) in the given Context.

Arguments:
get_total_variables(context: Context): int

Returns the total number of global variables (int) in the given Context.

Arguments:
get_variable_info(context: any; index: int): VarInfo

Returns the VarInfo pointer for a global variable at the given index in the Context, providing access to its name, type, and offset.

Arguments:
  • context : any

  • index : int

get_variable_value(varInfo: VarInfo): RttiValue

Returns an RttiValue variant representing the current value of a global variable, looked up by VarInfo in the given Context.

Arguments:
this_context(): Context&

Returns a pointer to the current Context in which the calling code is executing.

10.1.9.3. type_info

type_info(cl: auto): TypeInfo const?

def type_info (cl: auto) : TypeInfo const?

Arguments:
  • cl : auto

type_info(vinfo: VarInfo): TypeInfo const?
type_info(vinfo: LocalVariableInfo): TypeInfo const?

10.1.10. Program access

get_module(name: string): Module?

Returns a Module pointer looked up by module name string, or null if no such module is registered.

Arguments:
  • name : string implicit

get_this_module(program: smart_ptr<Program>): Module?

Returns the Module pointer for the module currently being compiled or inferred, retrieved from the Program.

Arguments:
  • program : smart_ptr< Program> implicit

has_module(name: string): bool

Returns true if a module with the given name is registered, false otherwise.

Arguments:
  • name : string implicit

program_for_each_module(program: smart_ptr<Program>; block: block<(Module?):void>)

Iterates through all modules referenced by the given Program (including transitive dependencies), yielding a Module pointer for each.

Arguments:
  • program : smart_ptr< Program> implicit

  • block : block<( Module?):void> implicit

program_for_each_registered_module(block: block<(Module?):void>)

Iterates through all modules registered in the daslang runtime (globally, not per-program), yielding a Module pointer for each.

Arguments:
  • block : block<( Module?):void> implicit

10.1.11. Module access

module_for_each_annotation(module: Module?; block: block<(Annotation):void>)

Iterates through each annotation (handled type) in the given Module, yielding an Annotation pointer for each registered annotation.

Arguments:
module_for_each_dependency(module: Module?; block: block<(Module?;bool):void>)

Iterates through each module dependency of the given Module, yielding the dependent Module pointer for each required module.

Arguments:
  • module : Module? implicit

  • block : block<( Module?;bool):void> implicit

module_for_each_enumeration(module: Module?; block: block<(EnumInfo):void>)

Iterates through each enumeration declared in the given Module, yielding an EnumInfo pointer for each enum.

Arguments:
module_for_each_function(module: Module?; block: block<(FuncInfo):void>)

Iterates through each function declared in the given Module, yielding a FuncInfo pointer for each function.

Arguments:
module_for_each_generic(module: Module?; block: block<(FuncInfo):void>)

Iterates through each generic (template) function declared in the given Module, yielding a FuncInfo pointer for each generic.

Arguments:
module_for_each_global(module: Module?; block: block<(VarInfo):void>)

Iterates through each global variable declared in the given Module, yielding a VarInfo pointer for each variable.

Arguments:
  • module : Module? implicit

  • block : block<( VarInfo):void> implicit

module_for_each_structure(module: Module?; block: block<(StructInfo):void>)

Iterates through each structure declaration in the given Module, yielding a StructInfo pointer for each struct.

Arguments:

10.1.12. Annotation access

add_annotation_argument(annotation: AnnotationArgumentList; name: string): int

Appends an annotation argument (name-value pair) to the given AnnotationArgumentList, used when constructing annotations programmatically.

Arguments:
get_annotation_argument_value(info: AnnotationArgument): RttiValue

Returns an RttiValue variant representing the value of a specific named argument from an AnnotationArgumentList.

Arguments:

10.1.13. Compilation and simulation

ast_serializer_get_data(serializer: AstSerializer?; block: block<(array<uint8>#):void>)

Returns content of serializer.

Arguments:
  • serializer : AstSerializer? implicit

  • block : block<(array<uint8>#):void> implicit

10.1.13.1. compile

compile(module_name: string; codeText: string; codeOfPolicies: CodeOfPolicies; exportAll: bool; block: block<(bool;smart_ptr<Program>;das_string):void>)

Compiles a daslang program from a source code string using the provided FileAccess and ModuleGroup, returning a ProgramPtr (null on failure).

Arguments:
  • module_name : string implicit

  • codeText : string implicit

  • codeOfPolicies : CodeOfPolicies implicit

  • exportAll : bool

  • block : block<(bool;smart_ptr< Program>; das_string):void> implicit

compile(module_name: string; codeText: string; codeOfPolicies: CodeOfPolicies; block: block<(bool;smart_ptr<Program>;das_string):void>)

compile_file(module_name: string; fileAccess: smart_ptr<FileAccess>; moduleGroup: ModuleGroup?; codeOfPolicies: CodeOfPolicies; block: block<(bool;smart_ptr<Program>;das_string):void>)

Compiles a daslang program from a file registered in the given FileAccess object, returning a ProgramPtr (null on failure).

Arguments:
create_ast_deserializer(data: array<uint8>): AstSerializer?

Creates deserializer. As an input expects output of ast_serializer_get_data.

Arguments:
  • data : array<uint8> implicit

create_ast_serializer(): AstSerializer?

Creates serializer object.

delete_ast_serializer(serializer: AstSerializer?)

Frees memory for ast_serializer.

Arguments:
deserialize_program(serializer: AstSerializer?; block: block<(bool;smart_ptr<Program>;das_string):void>)

Deserializes all programs from file and calls block on each of them.

Arguments:
for_each_expected_error(program: smart_ptr<Program>; block: block<(CompilationError;int):void>)

Iterates through each expected compilation error declared in the Program (via expect), yielding the error code for each.

Arguments:
for_each_require_declaration(program: smart_ptr<Program>; block: block<(Module?;string#;string#;bool;LineInfo):void>)

Iterates through each require declaration of the compiled Program, yielding the module name, public/private flag, and source LineInfo.

Arguments:
  • program : smart_ptr< Program> implicit

  • block : block<( Module?;string#;string#;bool; LineInfo&):void> implicit

serialize_program(serializer: AstSerializer?; program: smart_ptr<Program> const&): bool

Serializes program to serializer object.

Arguments:
simulate(program: smart_ptr<Program> const&; block: block<(bool;smart_ptr<Context>;das_string):void>)

Simulates (links and initializes) a compiled Program, returning a Context pointer ready for function execution, or null on failure.

Arguments:

10.1.14. File access

add_extra_module(access: smart_ptr<FileAccess>; modName: string; modFile: string)

Adds extra module to FileAccess. All files compiled via this FileAccess will include this extra module.

Arguments:
  • access : smart_ptr< FileAccess> implicit

  • modName : string implicit

  • modFile : string implicit

add_file_access_root(access: smart_ptr<FileAccess>; mod: string; path: string): bool

Adds an extra root directory (search path) to the given FileAccess object, expanding where require resolves files from.

Arguments:
  • access : smart_ptr< FileAccess> implicit

  • mod : string implicit

  • path : string implicit

make_file_access(project: string): smart_ptr<FileAccess>

Creates and returns a new FileAccessPtr (smart_ptr<FileAccess>) initialized as a default file-system-backed project.

Arguments:
  • project : string implicit

set_file_source(access: smart_ptr<FileAccess>; fileName: string; text: string): bool

Registers a source code string for the given file name inside the FileAccess object, allowing in-memory compilation without disk files.

Arguments:
  • access : smart_ptr< FileAccess> implicit

  • fileName : string implicit

  • text : string implicit

10.1.15. Structure access

basic_struct_for_each_field(annotation: BasicStructureAnnotation; block: block<(string;string;TypeInfo;uint):void>)

Iterates through each field of a BasicStructureAnnotation, yielding the field name, C++ name, TypeInfo, and byte offset for each field.

Arguments:
basic_struct_for_each_parent(annotation: BasicStructureAnnotation; block: block<(Annotation?):void>)

Iterates through each parent (base class) of a BasicStructureAnnotation, yielding the parent TypeInfo for each ancestor.

Arguments:
rtti_builtin_structure_for_each_annotation(struct: StructInfo; block: block<():void>)

Iterates through each annotation attached to a StructInfo, yielding the annotation name and its AnnotationArgumentList for each.

Arguments:
  • struct : StructInfo implicit

  • block : block<void> implicit

structure_for_each_annotation(st: StructInfo; subexpr: block<(ann:Annotation;args:AnnotationArguments):void>): auto

def structure_for_each_annotation (st: StructInfo; subexpr: block<(ann:Annotation;args:AnnotationArguments):void>) : auto

Arguments:

10.1.16. Data walking and printing

10.1.16.1. describe

describe(lineinfo: LineInfo; fully: bool = false): string

Returns a human-readable string description of an RTTI object (TypeInfo, VarInfo, FuncInfo, etc.), useful for logging and debug output.

Arguments:
  • lineinfo : LineInfo implicit

  • fully : bool

describe(type: TypeInfo const?): string

get_mangled_name(type: TypeInfo const?): string

Returns the full mangled name string for the given FuncInfo, encoding its module, name, and argument types.

Arguments:

10.1.16.2. sprint_data

sprint_data(data: float4; type: TypeInfo const?; flags: bitfield): string

Returns a string representation of a value given its data pointer and TypeInfo, similar to debug or print but capturing output as a string.

Arguments:
  • data : float4

  • type : TypeInfo? implicit

  • flags : bitfield<>

sprint_data(data: void?; type: TypeInfo const?; flags: bitfield): string

10.1.17. Function and mangled name hash

get_function_address(MNH: uint64; at: Context): uint64

Returns a SimFunction pointer looked up by mangled name hash in the given Context, or null if not found.

Arguments:
  • MNH : uint64

  • at : Context implicit

10.1.17.1. get_function_by_mangled_name_hash

get_function_by_mangled_name_hash(src: uint64; context: Context) : function<():void>

Returns a function<> lambda value looked up by its mangled name hash in the given Context.

Arguments:
  • src : uint64

  • context : Context implicit

get_function_by_mangled_name_hash(src: uint64) : function<():void>

get_function_mangled_name_hash(src: function<():void>): uint64

Returns the uint64 mangled name hash for the given function<> value, which uniquely identifies the function in its Context.

Arguments:
  • src : function<void>

10.1.18. Context and mutex locking

lock_context(lock_context: Context; block: block<():void>)

Acquires a recursive lock on the given Context and executes a block, ensuring thread-safe access to context data within the scope.

Arguments:
  • lock_context : Context implicit

  • block : block<void> implicit

lock_mutex(mutex: recursive_mutex; block: block<():void>)

Acquires a recursive lock on the given recursive_mutex and executes a block, releasing the lock when the block exits.

Arguments:
lock_this_context(block: block<():void>)

Acquires a recursive lock on the current Context and executes a block, ensuring thread-safe access within the scope.

Arguments:
  • block : block<void> implicit

10.1.19. Runtime data access

get_table_key_index(table: void?; key: any; baseType: Type; valueTypeSize: int): int

Returns the internal slot index (int) for the given key within a table value, or -1 if the key is not present.

Arguments:
  • table : void? implicit

  • key : any

  • baseType : Type

  • valueTypeSize : int

10.1.20. Tuple and variant access

get_tuple_field_offset(type: TypeInfo?; index: int): int

Returns the byte offset (int) of a field at the given index within a tuple type described by TypeInfo.

Arguments:
get_variant_field_offset(type: TypeInfo?; index: int): int

Returns the byte offset (int) of a field at the given index within a variant type described by TypeInfo.

Arguments:

10.1.21. Iteration

10.1.21.1. each

each(info: FuncInfo const implicit ==const): iterator<VarInfo const&>

Iterates through each element of an RTTI container (e.g., AnnotationArguments, AnnotationArgumentList, AnnotationList), yielding individual entries.

Arguments:
each(info: FuncInfo implicit ==const): iterator<VarInfo&>
each(info: StructInfo const implicit ==const): iterator<VarInfo const&>
each(info: StructInfo implicit ==const): iterator<VarInfo&>
each(info: EnumInfo const implicit ==const): iterator<EnumValueInfo const&>
each(info: EnumInfo implicit ==const): iterator<EnumValueInfo&>