#define V_COMMIT_HASH "7bfb35d" #ifndef V_COMMIT_HASH #define V_COMMIT_HASH "a685088" #endif #ifndef V_CURRENT_COMMIT_HASH #define V_CURRENT_COMMIT_HASH "7bfb35d" #endif #define V_USE_SIGNAL_H // V comptime_definitions: #define __VTHREADS__ (1) #define _VAUTOFREE (0) // V typedefs: typedef struct IError IError; typedef struct rand__PRNG rand__PRNG; typedef struct hash__Hasher hash__Hasher; typedef struct hash__Hash32er hash__Hash32er; typedef struct hash__Hash64er hash__Hash64er; typedef struct v__ast__walker__Visitor v__ast__walker__Visitor; typedef struct none none; typedef struct v__ast__TypeDecl v__ast__TypeDecl; typedef struct v__ast__Expr v__ast__Expr; typedef struct v__ast__Stmt v__ast__Stmt; typedef struct v__ast__ScopeObject v__ast__ScopeObject; typedef struct v__ast__Node v__ast__Node; typedef struct v__ast__ComptTimeConstValue v__ast__ComptTimeConstValue; typedef struct v__ast__IdentInfo v__ast__IdentInfo; typedef struct v__ast__AsmArg v__ast__AsmArg; typedef struct v__ast__TypeInfo v__ast__TypeInfo; typedef struct v__checker__ORMExpr v__checker__ORMExpr; // BEGIN_array_fixed_return_typedefs // END_array_fixed_return_typedefs // BEGIN_multi_return_typedefs typedef struct multi_return_u32_u32 multi_return_u32_u32; typedef struct multi_return_string_string multi_return_string_string; typedef struct multi_return_int_int multi_return_int_int; typedef struct multi_return_u32_u32_u32 multi_return_u32_u32_u32; typedef struct multi_return_strconv__ParserState_strconv__PrepNumber multi_return_strconv__ParserState_strconv__PrepNumber; typedef struct multi_return_u64_int multi_return_u64_int; typedef struct multi_return_strconv__Dec32_bool multi_return_strconv__Dec32_bool; typedef struct multi_return_strconv__Dec64_bool multi_return_strconv__Dec64_bool; typedef struct multi_return_string_int multi_return_string_int; typedef struct multi_return_int_bool multi_return_int_bool; typedef struct multi_return_ref_v__pref__Preferences_string multi_return_ref_v__pref__Preferences_string; typedef struct multi_return_u64_u64 multi_return_u64_u64; typedef struct multi_return_f64_int multi_return_f64_int; typedef struct multi_return_f64_f64 multi_return_f64_f64; typedef struct multi_return_int_int_int multi_return_int_int_int; typedef struct multi_return_int_int_int_int_int_i64_bool multi_return_int_int_int_int_int_i64_bool; typedef struct multi_return_Array_string_int multi_return_Array_string_int; typedef struct multi_return_Array_string_v__vmod__ModFileAndFolder multi_return_Array_string_v__vmod__ModFileAndFolder; typedef struct multi_return_string_bool multi_return_string_bool; typedef struct multi_return_v__ast__Fn_Array_v__ast__Type multi_return_v__ast__Fn_Array_v__ast__Type; typedef struct multi_return_v__ast__StructField_Array_v__ast__Type multi_return_v__ast__StructField_Array_v__ast__Type; typedef struct multi_return_ref_v__ast__TypeSymbol_int multi_return_ref_v__ast__TypeSymbol_int; typedef struct multi_return_bool_bool_int multi_return_bool_bool_int; typedef struct multi_return_string_v__token__Pos multi_return_string_v__token__Pos; typedef struct multi_return_bool_int_int multi_return_bool_int_int; typedef struct multi_return_Array_v__ast__Param_bool_bool multi_return_Array_v__ast__Param_bool_bool; typedef struct multi_return_Array_v__ast__Expr_Array_v__ast__Comment multi_return_Array_v__ast__Expr_Array_v__ast__Comment; typedef struct multi_return_ref_v__ast__File_Array_v__vet__Error_Array_v__vet__Error multi_return_ref_v__ast__File_Array_v__vet__Error_Array_v__vet__Error; typedef struct multi_return_Array_v__ast__Stmt_v__token__Pos multi_return_Array_v__ast__Stmt_v__token__Pos; typedef struct multi_return_Array_v__ast__Type_Array_string multi_return_Array_v__ast__Type_Array_string; typedef struct multi_return_Map_string_v__ast__FnDecl_Map_string_v__ast__ConstField_Map_string_v__ast__GlobalField multi_return_Map_string_v__ast__FnDecl_Map_string_v__ast__ConstField_Map_string_v__ast__GlobalField; typedef struct multi_return_bool_Array_string multi_return_bool_Array_string; typedef struct multi_return_Array_string_Array_string_Array_string multi_return_Array_string_Array_string_Array_string; typedef struct multi_return_string_string_string_Array_int multi_return_string_string_string_Array_int; typedef struct multi_return_string_string_string_string multi_return_string_string_string_string; typedef struct multi_return_int_string_string_string multi_return_int_string_string_string; typedef struct multi_return_v__ast__StructField_string multi_return_v__ast__StructField_string; typedef struct multi_return_bool_bool multi_return_bool_bool; typedef struct multi_return_Array_string_Array_string_Array_bool multi_return_Array_string_Array_string_Array_bool; typedef struct multi_return_u64_string multi_return_u64_string; typedef struct multi_return_int_string multi_return_int_string; typedef struct multi_return_ref_u16_ref_sync__Subscription multi_return_ref_u16_ref_sync__Subscription; // END_multi_return_typedefs typedef struct strconv__BF_param strconv__BF_param; typedef struct strconv__PrepNumber strconv__PrepNumber; typedef struct strconv__Dec32 strconv__Dec32; typedef struct strconv__Dec64 strconv__Dec64; typedef struct strconv__Uint128 strconv__Uint128; typedef union strconv__Uf32 strconv__Uf32; typedef union strconv__Uf64 strconv__Uf64; typedef union strconv__Float64u strconv__Float64u; typedef union strconv__Float32u strconv__Float32u; typedef struct array array; typedef struct GCHeapUsage GCHeapUsage; typedef struct VCastTypeIndexName VCastTypeIndexName; typedef struct VAssertMetaInfo VAssertMetaInfo; typedef struct MethodArgs MethodArgs; typedef struct FunctionData FunctionData; typedef struct EnumData EnumData; typedef struct FieldData FieldData; typedef struct StructAttribute StructAttribute; typedef struct DenseArray DenseArray; typedef struct map map; typedef struct Error Error; typedef struct MessageError MessageError; typedef struct None__ None__; typedef struct Option Option; typedef struct _option _option; typedef struct _result _result; typedef struct VMemoryBlock VMemoryBlock; typedef struct SortedMap SortedMap; typedef struct mapnode mapnode; typedef struct string string; typedef struct RepIndex RepIndex; typedef union StrIntpMem StrIntpMem; typedef struct StrIntpCgenData StrIntpCgenData; typedef struct StrIntpData StrIntpData; typedef struct strings__textscanner__TextScanner strings__textscanner__TextScanner; typedef struct term__termios__Termios term__termios__Termios; typedef struct v__token__KeywordsMatcherTrie v__token__KeywordsMatcherTrie; typedef struct v__token__TrieNode v__token__TrieNode; typedef struct v__token__Pos v__token__Pos; typedef struct v__token__Token v__token__Token; typedef struct time__DateTimeParser time__DateTimeParser; typedef struct time__TimeParseError time__TimeParseError; typedef struct time__StopWatchOptions time__StopWatchOptions; typedef struct time__StopWatch time__StopWatch; typedef struct time__Time time__Time; typedef struct v__dotgraph__DotGraph v__dotgraph__DotGraph; typedef struct v__dotgraph__NewNodeConfig v__dotgraph__NewNodeConfig; typedef struct v__dotgraph__NewEdgeConfig v__dotgraph__NewEdgeConfig; typedef struct rand__buffer__PRNGBuffer rand__buffer__PRNGBuffer; typedef struct flag__Flag flag__Flag; typedef struct flag__UnknownFlagError flag__UnknownFlagError; typedef struct flag__ArgsCountError flag__ArgsCountError; typedef struct flag__FlagParser flag__FlagParser; typedef struct semver__RawVersion semver__RawVersion; typedef struct semver__Comparator semver__Comparator; typedef struct semver__ComparatorSet semver__ComparatorSet; typedef struct semver__Range semver__Range; typedef struct semver__InvalidComparatorFormatError semver__InvalidComparatorFormatError; typedef struct semver__Version semver__Version; typedef struct semver__EmptyInputError semver__EmptyInputError; typedef struct semver__InvalidVersionFormatError semver__InvalidVersionFormatError; typedef struct os__Eof os__Eof; typedef struct os__NotExpected os__NotExpected; typedef struct os__File os__File; typedef struct os__FileInfo os__FileInfo; typedef struct os__FileNotOpenedError os__FileNotOpenedError; typedef struct os__SizeOfTypeIs0Error os__SizeOfTypeIs0Error; typedef struct os__FilePermission os__FilePermission; typedef struct os__FileMode os__FileMode; typedef struct os__PathKind os__PathKind; typedef struct os__Result os__Result; typedef struct os__Command os__Command; typedef struct os__ExecutableNotFoundError os__ExecutableNotFoundError; typedef struct os__MkdirParams os__MkdirParams; typedef struct os__Uname os__Uname; typedef struct os__Process os__Process; typedef struct v__errors__CompilerMessage v__errors__CompilerMessage; typedef struct v__errors__Error v__errors__Error; typedef struct v__errors__Warning v__errors__Warning; typedef struct v__errors__Notice v__errors__Notice; typedef struct v__depgraph__DepGraphNode v__depgraph__DepGraphNode; typedef struct v__depgraph__DepGraph v__depgraph__DepGraph; typedef struct v__depgraph__OrderedDepMap v__depgraph__OrderedDepMap; typedef struct v__depgraph__NodeNames v__depgraph__NodeNames; typedef struct v__vet__Error v__vet__Error; typedef struct term__Coord term__Coord; typedef struct v__vcache__CacheManager v__vcache__CacheManager; typedef struct v__vmod__Manifest v__vmod__Manifest; typedef struct v__vmod__Scanner v__vmod__Scanner; typedef struct v__vmod__Parser v__vmod__Parser; typedef struct v__vmod__Token v__vmod__Token; typedef struct v__vmod__ModFileAndFolder v__vmod__ModFileAndFolder; typedef struct v__vmod__ModFileCacher v__vmod__ModFileCacher; typedef struct v__cflag__CFlag v__cflag__CFlag; typedef struct rand__config__PRNGConfigStruct rand__config__PRNGConfigStruct; typedef struct rand__config__NormalConfigStruct rand__config__NormalConfigStruct; typedef struct rand__config__ShuffleConfigStruct rand__config__ShuffleConfigStruct; typedef struct rand__wyrand__WyRandRNG rand__wyrand__WyRandRNG; typedef struct v__pkgconfig__Main v__pkgconfig__Main; typedef struct v__pkgconfig__MainOptions v__pkgconfig__MainOptions; typedef struct v__pkgconfig__Options v__pkgconfig__Options; typedef struct v__pkgconfig__PkgConfig v__pkgconfig__PkgConfig; typedef struct v__pref__Preferences v__pref__Preferences; typedef struct v__pref__LineInfo v__pref__LineInfo; typedef struct sync__Subscription sync__Subscription; typedef struct sync__Channel sync__Channel; typedef struct sync__ManyTimes sync__ManyTimes; typedef struct sync__Once sync__Once; typedef struct sync__WaitGroup sync__WaitGroup; typedef struct sync__Mutex sync__Mutex; typedef struct sync__RwMutex sync__RwMutex; typedef struct sync__RwMutexAttr sync__RwMutexAttr; typedef struct sync__Semaphore sync__Semaphore; typedef struct v__util__EManager v__util__EManager; typedef struct v__util__LinesCache v__util__LinesCache; typedef struct v__util__Possibility v__util__Possibility; typedef struct v__util__Suggestion v__util__Suggestion; typedef struct v__util__Surrounder v__util__Surrounder; typedef struct v__util__Timers v__util__Timers; typedef struct v__util__TimerParams v__util__TimerParams; typedef struct v__util__SourceCache v__util__SourceCache; typedef struct sync__pool__PoolProcessor sync__pool__PoolProcessor; typedef struct sync__pool__PoolProcessorConfig sync__pool__PoolProcessorConfig; typedef struct v__ast__TypeNode v__ast__TypeNode; typedef struct v__ast__ComptimeType v__ast__ComptimeType; typedef struct v__ast__EmptyStmt v__ast__EmptyStmt; typedef struct v__ast__EmptyNode v__ast__EmptyNode; typedef struct v__ast__Block v__ast__Block; typedef struct v__ast__ExprStmt v__ast__ExprStmt; typedef struct v__ast__IntegerLiteral v__ast__IntegerLiteral; typedef struct v__ast__FloatLiteral v__ast__FloatLiteral; typedef struct v__ast__StringLiteral v__ast__StringLiteral; typedef struct v__ast__StringInterLiteral v__ast__StringInterLiteral; typedef struct v__ast__CharLiteral v__ast__CharLiteral; typedef struct v__ast__BoolLiteral v__ast__BoolLiteral; typedef struct v__ast__Nil v__ast__Nil; typedef struct v__ast__SelectorExpr v__ast__SelectorExpr; typedef struct v__ast__Module v__ast__Module; typedef struct v__ast__SemicolonStmt v__ast__SemicolonStmt; typedef struct v__ast__StructField v__ast__StructField; typedef struct v__ast__ConstField v__ast__ConstField; typedef struct v__ast__ConstDecl v__ast__ConstDecl; typedef struct v__ast__StructDecl v__ast__StructDecl; typedef struct v__ast__Embed v__ast__Embed; typedef struct v__ast__InterfaceEmbedding v__ast__InterfaceEmbedding; typedef struct v__ast__InterfaceDecl v__ast__InterfaceDecl; typedef struct v__ast__StructInitField v__ast__StructInitField; typedef struct v__ast__StructInit v__ast__StructInit; typedef struct v__ast__Import v__ast__Import; typedef struct v__ast__ImportSymbol v__ast__ImportSymbol; typedef struct v__ast__AnonFn v__ast__AnonFn; typedef struct v__ast__FnDecl v__ast__FnDecl; typedef struct v__ast__Fn v__ast__Fn; typedef struct v__ast__Param v__ast__Param; typedef struct v__ast__BranchStmt v__ast__BranchStmt; typedef struct v__ast__CallExpr v__ast__CallExpr; typedef struct v__ast__CallArg v__ast__CallArg; typedef struct v__ast__Return v__ast__Return; typedef struct v__ast__Var v__ast__Var; typedef struct v__ast__ScopeStructField v__ast__ScopeStructField; typedef struct v__ast__GlobalField v__ast__GlobalField; typedef struct v__ast__GlobalDecl v__ast__GlobalDecl; typedef struct v__ast__EmbeddedFile v__ast__EmbeddedFile; typedef struct v__ast__File v__ast__File; typedef struct v__ast__IdentFn v__ast__IdentFn; typedef struct v__ast__IdentVar v__ast__IdentVar; typedef struct v__ast__Ident v__ast__Ident; typedef struct v__ast__InfixExpr v__ast__InfixExpr; typedef struct v__ast__PostfixExpr v__ast__PostfixExpr; typedef struct v__ast__PrefixExpr v__ast__PrefixExpr; typedef struct v__ast__IndexExpr v__ast__IndexExpr; typedef struct v__ast__IfExpr v__ast__IfExpr; typedef struct v__ast__IfBranch v__ast__IfBranch; typedef struct v__ast__UnsafeExpr v__ast__UnsafeExpr; typedef struct v__ast__LockExpr v__ast__LockExpr; typedef struct v__ast__MatchExpr v__ast__MatchExpr; typedef struct v__ast__MatchBranch v__ast__MatchBranch; typedef struct v__ast__SelectExpr v__ast__SelectExpr; typedef struct v__ast__SelectBranch v__ast__SelectBranch; typedef struct v__ast__ComptimeFor v__ast__ComptimeFor; typedef struct v__ast__ForStmt v__ast__ForStmt; typedef struct v__ast__ForInStmt v__ast__ForInStmt; typedef struct v__ast__ForCStmt v__ast__ForCStmt; typedef struct v__ast__HashStmt v__ast__HashStmt; typedef struct v__ast__AssignStmt v__ast__AssignStmt; typedef struct v__ast__AsCast v__ast__AsCast; typedef struct v__ast__EnumVal v__ast__EnumVal; typedef struct v__ast__EnumField v__ast__EnumField; typedef struct v__ast__EnumDecl v__ast__EnumDecl; typedef struct v__ast__AliasTypeDecl v__ast__AliasTypeDecl; typedef struct v__ast__SumTypeDecl v__ast__SumTypeDecl; typedef struct v__ast__FnTypeDecl v__ast__FnTypeDecl; typedef struct v__ast__DeferStmt v__ast__DeferStmt; typedef struct v__ast__ParExpr v__ast__ParExpr; typedef struct v__ast__GoExpr v__ast__GoExpr; typedef struct v__ast__SpawnExpr v__ast__SpawnExpr; typedef struct v__ast__GotoLabel v__ast__GotoLabel; typedef struct v__ast__GotoStmt v__ast__GotoStmt; typedef struct v__ast__ArrayInit v__ast__ArrayInit; typedef struct v__ast__ArrayDecompose v__ast__ArrayDecompose; typedef struct v__ast__ChanInit v__ast__ChanInit; typedef struct v__ast__MapInit v__ast__MapInit; typedef struct v__ast__RangeExpr v__ast__RangeExpr; typedef struct v__ast__CastExpr v__ast__CastExpr; typedef struct v__ast__AsmStmt v__ast__AsmStmt; typedef struct v__ast__AsmTemplate v__ast__AsmTemplate; typedef struct v__ast__AsmRegister v__ast__AsmRegister; typedef struct v__ast__AsmDisp v__ast__AsmDisp; typedef struct v__ast__AsmAlias v__ast__AsmAlias; typedef struct v__ast__AsmAddressing v__ast__AsmAddressing; typedef struct v__ast__AsmClobbered v__ast__AsmClobbered; typedef struct v__ast__AsmIO v__ast__AsmIO; typedef struct v__ast__AssertStmt v__ast__AssertStmt; typedef struct v__ast__IfGuardVar v__ast__IfGuardVar; typedef struct v__ast__IfGuardExpr v__ast__IfGuardExpr; typedef struct v__ast__OrExpr v__ast__OrExpr; typedef struct v__ast__Assoc v__ast__Assoc; typedef struct v__ast__SizeOf v__ast__SizeOf; typedef struct v__ast__IsRefType v__ast__IsRefType; typedef struct v__ast__OffsetOf v__ast__OffsetOf; typedef struct v__ast__LambdaExpr v__ast__LambdaExpr; typedef struct v__ast__Likely v__ast__Likely; typedef struct v__ast__TypeOf v__ast__TypeOf; typedef struct v__ast__DumpExpr v__ast__DumpExpr; typedef struct v__ast__Comment v__ast__Comment; typedef struct v__ast__ConcatExpr v__ast__ConcatExpr; typedef struct v__ast__AtExpr v__ast__AtExpr; typedef struct v__ast__ComptimeSelector v__ast__ComptimeSelector; typedef struct v__ast__ComptimeCall v__ast__ComptimeCall; typedef struct v__ast__None v__ast__None; typedef struct v__ast__SqlStmt v__ast__SqlStmt; typedef struct v__ast__SqlStmtLine v__ast__SqlStmtLine; typedef struct v__ast__SqlExpr v__ast__SqlExpr; typedef struct v__ast__NodeError v__ast__NodeError; typedef struct v__ast__CTempVar v__ast__CTempVar; typedef struct v__ast__Attr v__ast__Attr; typedef struct v__ast__Scope v__ast__Scope; typedef struct v__ast__StringifyModReplacement v__ast__StringifyModReplacement; typedef struct v__ast__Table v__ast__Table; typedef struct v__ast__GetEmbedsOptions v__ast__GetEmbedsOptions; typedef struct v__ast__TypeSymbol v__ast__TypeSymbol; typedef struct v__ast__MultiReturn v__ast__MultiReturn; typedef struct v__ast__FnType v__ast__FnType; typedef struct v__ast__Struct v__ast__Struct; typedef struct v__ast__GenericInst v__ast__GenericInst; typedef struct v__ast__Interface v__ast__Interface; typedef struct v__ast__Enum v__ast__Enum; typedef struct v__ast__Alias v__ast__Alias; typedef struct v__ast__Aggregate v__ast__Aggregate; typedef struct v__ast__Array v__ast__Array; typedef struct v__ast__ArrayFixed v__ast__ArrayFixed; typedef struct v__ast__Chan v__ast__Chan; typedef struct v__ast__Thread v__ast__Thread; typedef struct v__ast__Map v__ast__Map; typedef struct v__ast__SumType v__ast__SumType; typedef struct v__ast__FnSignatureOpts v__ast__FnSignatureOpts; typedef struct v__transformer__KeyVal v__transformer__KeyVal; typedef struct v__transformer__IndexState v__transformer__IndexState; typedef struct v__transformer__Transformer v__transformer__Transformer; typedef struct v__markused__Walker v__markused__Walker; typedef struct v__gen__c__UnsupportedAssertCtempTransform v__gen__c__UnsupportedAssertCtempTransform; typedef struct v__gen__c__StrType v__gen__c__StrType; typedef struct v__gen__c__Gen v__gen__c__Gen; typedef struct v__gen__c__GlobalConstDef v__gen__c__GlobalConstDef; typedef struct v__gen__c__SumtypeCastingFn v__gen__c__SumtypeCastingFn; typedef struct v__gen__c__CurrentComptimeValues v__gen__c__CurrentComptimeValues; typedef struct v__gen__c__GenSafeIntegerCfg v__gen__c__GenSafeIntegerCfg; typedef struct v__gen__c__PastTmpVar v__gen__c__PastTmpVar; typedef struct v__gen__c__ProfileCounterMeta v__gen__c__ProfileCounterMeta; typedef struct v__gen__c__Type v__gen__c__Type; typedef struct v__scanner__Scanner v__scanner__Scanner; typedef struct v__ast__walker__Inspector v__ast__walker__Inspector; typedef struct v__checker__Checker v__checker__Checker; typedef struct v__checker__ACFieldMethod v__checker__ACFieldMethod; typedef struct v__checker__LoHiLimit v__checker__LoHiLimit; typedef struct v__parser__ReceiverParsingInfo v__parser__ReceiverParsingInfo; typedef struct v__parser__Parser v__parser__Parser; typedef struct v__parser__ParamsForUnexpected v__parser__ParamsForUnexpected; typedef struct v__parser__EatCommentsConfig v__parser__EatCommentsConfig; typedef struct v__parser__ParserShowParams v__parser__ParserShowParams; typedef struct v__callgraph__Mapper v__callgraph__Mapper; typedef struct v__builder__Builder v__builder__Builder; typedef struct v__builder__FunctionRedefinition v__builder__FunctionRedefinition; typedef struct v__builder__CcompilerOptions v__builder__CcompilerOptions; typedef struct v__builder__MsvcResult v__builder__MsvcResult; typedef struct v__builder__WindowsKit v__builder__WindowsKit; typedef struct v__builder__VsInstallation v__builder__VsInstallation; typedef struct v__builder__MsvcStringFlags v__builder__MsvcStringFlags; typedef struct __shared__Array_string __shared__Array_string; typedef struct __shared__Map_string_bool __shared__Map_string_bool; typedef struct _result_int _result_int; typedef struct _result_f64 _result_f64; typedef struct _result_u64 _result_u64; typedef struct _result_i64 _result_i64; typedef struct _result_rune _result_rune; typedef struct _result_string _result_string; typedef struct _result_v__token__Kind _result_v__token__Kind; typedef struct _result_void _result_void; typedef struct _result_Array_string _result_Array_string; typedef struct _result_time__Time _result_time__Time; typedef struct _result_multi_return_int_int_int _result_multi_return_int_int_int; typedef struct _result_multi_return_int_int_int_int_int_i64_bool _result_multi_return_int_int_int_int_int_i64_bool; typedef struct _result_bool _result_bool; typedef struct _result_flag__Flag _result_flag__Flag; typedef struct _result_semver__Range _result_semver__Range; typedef struct _result_semver__Version _result_semver__Version; typedef struct _result_semver__ComparatorSet _result_semver__ComparatorSet; typedef struct _result_os__File _result_os__File; typedef struct _result_FILE_ptr _result_FILE_ptr; typedef struct _result_Array_u8 _result_Array_u8; typedef struct _result_strings__Builder _result_strings__Builder; typedef struct _result_anon_fn_os__signal _result_anon_fn_os__signal; typedef struct _result_term__Coord _result_term__Coord; typedef struct _result_v__vmod__Manifest _result_v__vmod__Manifest; typedef struct _result_multi_return_Array_string_int _result_multi_return_Array_string_int; typedef struct _result_v__pkgconfig__PkgConfig_ptr _result_v__pkgconfig__PkgConfig_ptr; typedef struct _result_v__pkgconfig__Main_ptr _result_v__pkgconfig__Main_ptr; typedef struct _result_u32 _result_u32; typedef struct _result_f32 _result_f32; typedef struct _result_multi_return_f64_f64 _result_multi_return_f64_f64; typedef struct _result_v__pref__OS _result_v__pref__OS; typedef struct _result_v__pref__Arch _result_v__pref__Arch; typedef struct _result_v__pref__Backend _result_v__pref__Backend; typedef struct _result_v__ast__Fn _result_v__ast__Fn; typedef struct _result_multi_return_v__ast__Fn_Array_v__ast__Type _result_multi_return_v__ast__Fn_Array_v__ast__Type; typedef struct _result_v__ast__StructField _result_v__ast__StructField; typedef struct _result_multi_return_v__ast__StructField_Array_v__ast__Type _result_multi_return_v__ast__StructField_Array_v__ast__Type; typedef struct _result_v__ast__Expr _result_v__ast__Expr; typedef struct _result_v__scanner__Scanner_ptr _result_v__scanner__Scanner_ptr; typedef struct _result_v__builder__MsvcResult _result_v__builder__MsvcResult; typedef struct _result_v__builder__WindowsKit _result_v__builder__WindowsKit; typedef struct _result_v__builder__VsInstallation _result_v__builder__VsInstallation; typedef struct _option_multi_return_string_string _option_multi_return_string_string; typedef struct _option_int _option_int; typedef struct _option_u8 _option_u8; typedef struct _option_semver__Version _option_semver__Version; typedef struct _option_semver__ComparatorSet _option_semver__ComparatorSet; typedef struct _option_semver__Comparator _option_semver__Comparator; typedef struct _option_string _option_string; typedef struct _option_Array_string _option_Array_string; typedef struct _option_rune _option_rune; typedef struct _option_time__StopWatch _option_time__StopWatch; typedef struct _option_v__ast__Ident _option_v__ast__Ident; typedef struct _option_v__ast__Attr _option_v__ast__Attr; typedef struct _option_i8 _option_i8; typedef struct _option_i64 _option_i64; typedef struct _option_i16 _option_i16; typedef struct _option_voidptr _option_voidptr; typedef struct _option_u64 _option_u64; typedef struct _option_u16 _option_u16; typedef struct _option_u32 _option_u32; typedef struct _option_f32 _option_f32; typedef struct _option_f64 _option_f64; typedef struct _option_v__ast__ComptTimeConstValue _option_v__ast__ComptTimeConstValue; typedef struct _option_v__ast__ScopeObject _option_v__ast__ScopeObject; typedef struct _option_v__ast__ScopeStructField _option_v__ast__ScopeStructField; typedef struct _option_v__ast__Var_ptr _option_v__ast__Var_ptr; typedef struct _option_v__ast__GlobalField_ptr _option_v__ast__GlobalField_ptr; typedef struct _option_v__ast__ConstField_ptr _option_v__ast__ConstField_ptr; typedef struct _option_v__ast__Fn _option_v__ast__Fn; typedef struct _option_v__ast__StructField _option_v__ast__StructField; typedef struct _option_v__ast__TypeSymbol_ptr _option_v__ast__TypeSymbol_ptr; typedef struct _option_Array_Array_v__ast__Type _option_Array_Array_v__ast__Type; typedef struct _option_v__ast__Type _option_v__ast__Type; typedef struct _option_Array_v__ast__Type _option_Array_v__ast__Type; typedef struct _option_v__ast__ConstField _option_v__ast__ConstField; typedef struct _option_v__ast__GlobalField _option_v__ast__GlobalField; typedef struct _option_v__ast__FnDecl _option_v__ast__FnDecl; typedef struct _option_v__gen__c__GlobalConstDef _option_v__gen__c__GlobalConstDef; typedef struct _option_v__ast__Stmt_ptr _option_v__ast__Stmt_ptr; typedef struct _option_v__ast__EnumDecl _option_v__ast__EnumDecl; typedef struct _option_v__ast__InterfaceDecl _option_v__ast__InterfaceDecl; typedef struct _option_bool _option_bool; typedef struct _option_v__ast__Param _option_v__ast__Param; typedef struct _option_v__checker__LoHiLimit _option_v__checker__LoHiLimit; typedef struct _option_v__ast__LambdaExpr _option_v__ast__LambdaExpr; // V preincludes: #if defined(__TINYC__) && defined(__has_include) // tcc does not support has_include properly yet, turn it off completely #undef __has_include #endif // V cheaders: // Generated by the V compiler #if defined(__TINYC__) && defined(__has_include) // tcc does not support has_include properly yet, turn it off completely #undef __has_include #endif #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE The C compiler can not find . Please install build-essentials #endif #else #include #endif #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE The C compiler can not find . Please install build-essentials #endif #else #include #endif //================================== builtin types ================================*/ typedef int64_t i64; typedef int16_t i16; typedef int8_t i8; typedef uint64_t u64; typedef uint32_t u32; typedef uint8_t u8; typedef uint16_t u16; typedef u8 byte; typedef int i32; typedef uint32_t rune; typedef size_t usize; typedef ptrdiff_t isize; #ifndef VNOFLOAT typedef float f32; typedef double f64; #else typedef int32_t f32; typedef int64_t f64; #endif typedef int64_t int_literal; #ifndef VNOFLOAT typedef double float_literal; #else typedef int64_t float_literal; #endif typedef unsigned char* byteptr; typedef void* voidptr; typedef char* charptr; typedef u8 array_fixed_byte_300 [300]; typedef struct sync__Channel* chan; #ifndef __cplusplus #ifndef bool #ifdef CUSTOM_DEFINE_4bytebool typedef int bool; #else typedef u8 bool; #endif #define true 1 #define false 0 #endif #endif typedef u64 (*MapHashFn)(voidptr); typedef bool (*MapEqFn)(voidptr, voidptr); typedef void (*MapCloneFn)(voidptr, voidptr); typedef void (*MapFreeFn)(voidptr); //============================== HELPER C MACROS =============================*/ // _SLIT0 is used as NULL string for literal arguments // `"" s` is used to enforce a string literal argument #define _SLIT0 (string){.str=(byteptr)(""), .len=0, .is_lit=1} #define _SLIT(s) ((string){.str=(byteptr)("" s), .len=(sizeof(s)-1), .is_lit=1}) #define _SLEN(s, n) ((string){.str=(byteptr)("" s), .len=n, .is_lit=1}) // take the address of an rvalue #define ADDR(type, expr) (&((type[]){expr}[0])) // copy something to the heap #define HEAP(type, expr) ((type*)memdup((void*)&((type[]){expr}[0]), sizeof(type))) #define HEAP_noscan(type, expr) ((type*)memdup_noscan((void*)&((type[]){expr}[0]), sizeof(type))) #define _PUSH_MANY(arr, val, tmp, tmp_typ) {tmp_typ tmp = (val); array_push_many(arr, tmp.data, tmp.len);} #define _PUSH_MANY_noscan(arr, val, tmp, tmp_typ) {tmp_typ tmp = (val); array_push_many_noscan(arr, tmp.data, tmp.len);} // unsigned/signed comparisons static inline bool _us32_gt(uint32_t a, int32_t b) { return a > INT32_MAX || (int32_t)a > b; } static inline bool _us32_ge(uint32_t a, int32_t b) { return a >= INT32_MAX || (int32_t)a >= b; } static inline bool _us32_eq(uint32_t a, int32_t b) { return a <= INT32_MAX && (int32_t)a == b; } static inline bool _us32_ne(uint32_t a, int32_t b) { return a > INT32_MAX || (int32_t)a != b; } static inline bool _us32_le(uint32_t a, int32_t b) { return a <= INT32_MAX && (int32_t)a <= b; } static inline bool _us32_lt(uint32_t a, int32_t b) { return a < INT32_MAX && (int32_t)a < b; } static inline bool _us64_gt(uint64_t a, int64_t b) { return a > INT64_MAX || (int64_t)a > b; } static inline bool _us64_ge(uint64_t a, int64_t b) { return a >= INT64_MAX || (int64_t)a >= b; } static inline bool _us64_eq(uint64_t a, int64_t b) { return a <= INT64_MAX && (int64_t)a == b; } static inline bool _us64_ne(uint64_t a, int64_t b) { return a > INT64_MAX || (int64_t)a != b; } static inline bool _us64_le(uint64_t a, int64_t b) { return a <= INT64_MAX && (int64_t)a <= b; } static inline bool _us64_lt(uint64_t a, int64_t b) { return a < INT64_MAX && (int64_t)a < b; } #define EMPTY_VARG_INITIALIZATION 0 #define EMPTY_STRUCT_DECLARATION #define EMPTY_STRUCT_INITIALIZATION // Due to a tcc bug, the length of an array needs to be specified, but GCC crashes if it is... #define EMPTY_ARRAY_OF_ELEMS(x,n) (x[]) #define TCCSKIP(x) x #define __NOINLINE __attribute__((noinline)) #define __IRQHANDLER __attribute__((interrupt)) #define __V_architecture 0 #if defined(__x86_64__) || defined(_M_AMD64) #define __V_amd64 1 #undef __V_architecture #define __V_architecture 1 #endif #if defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) #define __V_arm64 1 #undef __V_architecture #define __V_architecture 2 #endif #if defined(__arm__) || defined(_M_ARM) #define __V_arm32 1 #undef __V_architecture #define __V_architecture 3 #endif #if defined(__riscv) && __riscv_xlen == 64 #define __V_rv64 1 #undef __V_architecture #define __V_architecture 4 #endif #if defined(__riscv) && __riscv_xlen == 32 #define __V_rv32 1 #undef __V_architecture #define __V_architecture 5 #endif #if defined(__i386__) || defined(_M_IX86) #define __V_x86 1 #undef __V_architecture #define __V_architecture 6 #endif // Using just __GNUC__ for detecting gcc, is not reliable because other compilers define it too: #ifdef __GNUC__ #define __V_GCC__ #endif #ifdef __TINYC__ #undef __V_GCC__ #endif #ifdef __cplusplus #undef __V_GCC__ #endif #ifdef __clang__ #undef __V_GCC__ #endif #ifdef _MSC_VER #undef __V_GCC__ #undef EMPTY_STRUCT_DECLARATION #undef EMPTY_STRUCT_INITIALIZATION #define EMPTY_STRUCT_DECLARATION unsigned char _dummy_pad #define EMPTY_STRUCT_INITIALIZATION 0 #endif #ifndef _WIN32 #if defined __has_include #if __has_include () #include #else // On linux: int backtrace(void **__array, int __size); // On BSD: size_t backtrace(void **, size_t); #endif #endif #endif #ifdef __TINYC__ #define _Atomic volatile #undef EMPTY_STRUCT_DECLARATION #undef EMPTY_STRUCT_INITIALIZATION #define EMPTY_STRUCT_DECLARATION unsigned char _dummy_pad #define EMPTY_STRUCT_INITIALIZATION 0 #undef EMPTY_ARRAY_OF_ELEMS #define EMPTY_ARRAY_OF_ELEMS(x,n) (x[n]) #undef __NOINLINE #undef __IRQHANDLER // tcc does not support inlining at all #define __NOINLINE #define __IRQHANDLER #undef TCCSKIP #define TCCSKIP(x) // #include #ifndef _WIN32 int tcc_backtrace(const char *fmt, ...); #endif #endif // Use __offsetof_ptr instead of __offset_of, when you *do* have a valid pointer, to avoid UB: #ifndef __offsetof_ptr #define __offsetof_ptr(ptr,PTYPE,FIELDNAME) ((size_t)((byte *)&((PTYPE *)ptr)->FIELDNAME - (byte *)ptr)) #endif // for __offset_of #ifndef __offsetof #define __offsetof(PTYPE,FIELDNAME) ((size_t)((char *)&((PTYPE *)0)->FIELDNAME - (char *)0)) #endif #define OPTION_CAST(x) (x) #ifndef V64_PRINTFORMAT #ifdef PRIx64 #define V64_PRINTFORMAT "0x%"PRIx64 #elif defined(__WIN32__) #define V64_PRINTFORMAT "0x%I64x" #elif defined(__linux__) && defined(__LP64__) #define V64_PRINTFORMAT "0x%lx" #else #define V64_PRINTFORMAT "0x%llx" #endif #endif #if defined(_WIN32) || defined(__CYGWIN__) #define VV_EXPORTED_SYMBOL extern __declspec(dllexport) #define VV_LOCAL_SYMBOL static #else // 4 < gcc < 5 is used by some older Ubuntu LTS and Centos versions, // and does not support __has_attribute(visibility) ... #ifndef __has_attribute #define __has_attribute(x) 0 // Compatibility with non-clang compilers. #endif #if (defined(__GNUC__) && (__GNUC__ >= 4)) || (defined(__clang__) && __has_attribute(visibility)) #ifdef ARM #define VV_EXPORTED_SYMBOL extern __attribute__((externally_visible,visibility("default"))) #else #define VV_EXPORTED_SYMBOL extern __attribute__((visibility("default"))) #endif #if defined(__clang__) && (defined(_VUSECACHE) || defined(_VBUILDMODULE)) #define VV_LOCAL_SYMBOL static #else #define VV_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) #endif #else #define VV_EXPORTED_SYMBOL extern #define VV_LOCAL_SYMBOL static #endif #endif #ifdef __cplusplus #include #define _MOV std::move #else #define _MOV #endif // tcc does not support has_include properly yet, turn it off completely #if defined(__TINYC__) && defined(__has_include) #undef __has_include #endif #if !defined(VWEAK) #define VWEAK __attribute__((weak)) #ifdef _MSC_VER #undef VWEAK #define VWEAK #endif #if defined(__MINGW32__) || defined(__MINGW64__) #undef VWEAK #define VWEAK #endif #endif #if !defined(VNORETURN) #if defined(__TINYC__) #include #define VNORETURN noreturn #endif # if !defined(__TINYC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L # define VNORETURN _Noreturn # elif !defined(VNORETURN) && defined(__GNUC__) && __GNUC__ >= 2 # define VNORETURN __attribute__((noreturn)) # endif #ifndef VNORETURN #define VNORETURN #endif #endif #if !defined(VUNREACHABLE) #if defined(__GNUC__) && !defined(__clang__) #define V_GCC_VERSION (__GNUC__ * 10000L + __GNUC_MINOR__ * 100L + __GNUC_PATCHLEVEL__) #if (V_GCC_VERSION >= 40500L) && !defined(__TINYC__) #define VUNREACHABLE() do { __builtin_unreachable(); } while (0) #endif #endif #if defined(__clang__) && defined(__has_builtin) && !defined(__TINYC__) #if __has_builtin(__builtin_unreachable) #define VUNREACHABLE() do { __builtin_unreachable(); } while (0) #endif #endif #ifndef VUNREACHABLE #define VUNREACHABLE() do { } while (0) #endif #endif //likely and unlikely macros #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__) #define _likely_(x) __builtin_expect(x,1) #define _unlikely_(x) __builtin_expect(x,0) #else #define _likely_(x) (x) #define _unlikely_(x) (x) #endif // c_headers typedef int (*qsort_callback_func)(const void*, const void*); #include // TODO remove all these includes, define all function signatures and types manually #include #include #include // for va_list //================================== GLOBALS =================================*/ int load_so(byteptr); void _vinit(int ___argc, voidptr ___argv); void _vcleanup(void); #define sigaction_size sizeof(sigaction); #define _ARR_LEN(a) ( (sizeof(a)) / (sizeof(a[0])) ) void v_free(voidptr ptr); voidptr memdup(voidptr src, int sz); #if INTPTR_MAX == INT32_MAX #define TARGET_IS_32BIT 1 #elif INTPTR_MAX == INT64_MAX #define TARGET_IS_64BIT 1 #else #error "The environment is not 32 or 64-bit." #endif #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ || defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) #define TARGET_ORDER_IS_BIG 1 #elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ || defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) || defined(_M_AMD64) || defined(_M_X64) || defined(_M_IX86) #define TARGET_ORDER_IS_LITTLE 1 #else #error "Unknown architecture endianness" #endif #ifndef _WIN32 #include #include // tolower #include #include // sleep extern char **environ; #endif #if defined(__CYGWIN__) && !defined(_WIN32) #error Cygwin is not supported, please use MinGW or Visual Studio. #endif #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__vinix__) || defined(__serenity__) || defined(__sun) #include #include // os__wait uses wait on nix #endif #if defined(__plan9__) #include #include #endif #ifdef __OpenBSD__ #include #include #include // os__wait uses wait on nix #endif #ifdef __NetBSD__ #include // os__wait uses wait on nix #endif #ifdef _WIN32 #define WINVER 0x0600 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0600 #ifndef WIN32_FULL #define WIN32_LEAN_AND_MEAN #endif #ifndef _UNICODE #define _UNICODE #endif #ifndef UNICODE #define UNICODE #endif #include #include // _waccess #include // _wgetcwd #ifdef V_USE_SIGNAL_H #include // signal and SIGSEGV for segmentation fault handler #endif #ifdef _MSC_VER // On MSVC these are the same (as long as /volatile:ms is passed) #define _Atomic volatile // MSVC cannot parse some things properly #undef OPTION_CAST #define OPTION_CAST(x) #undef __NOINLINE #undef __IRQHANDLER #define __NOINLINE __declspec(noinline) #define __IRQHANDLER __declspec(naked) #include #pragma comment(lib, "Dbghelp") #endif #else #include #ifndef PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP // musl does not have that #define pthread_rwlockattr_setkind_np(a, b) #endif #endif // g_live_info is used by live.info() static void* g_live_info = NULL; #if defined(__MINGW32__) || defined(__MINGW64__) || (defined(_WIN32) && defined(__TINYC__)) #undef PRId64 #undef PRIi64 #undef PRIo64 #undef PRIu64 #undef PRIx64 #undef PRIX64 #define PRId64 "lld" #define PRIi64 "lli" #define PRIo64 "llo" #define PRIu64 "llu" #define PRIx64 "llx" #define PRIX64 "llX" #endif #ifdef _VFREESTANDING #undef _VFREESTANDING #endif // ============== wyhash ============== #ifndef wyhash_final_version_3 #define wyhash_final_version_3 #ifndef WYHASH_CONDOM // protections that produce different results: // 1: normal valid behavior // 2: extra protection against entropy loss (probability=2^-63), aka. "blind multiplication" #define WYHASH_CONDOM 1 #endif #ifndef WYHASH_32BIT_MUM // 0: normal version, slow on 32 bit systems // 1: faster on 32 bit systems but produces different results, incompatible with wy2u0k function #define WYHASH_32BIT_MUM 0 #endif // includes #include #if defined(_MSC_VER) && defined(_M_X64) #include #pragma intrinsic(_umul128) #endif // 128bit multiply function static inline uint64_t _wyrot(uint64_t x) { return (x>>32)|(x<<32); } static inline void _wymum(uint64_t *A, uint64_t *B){ #if(WYHASH_32BIT_MUM) uint64_t hh=(*A>>32)*(*B>>32), hl=(*A>>32)*(uint32_t)*B, lh=(uint32_t)*A*(*B>>32), ll=(uint64_t)(uint32_t)*A*(uint32_t)*B; #if(WYHASH_CONDOM>1) *A^=_wyrot(hl)^hh; *B^=_wyrot(lh)^ll; #else *A=_wyrot(hl)^hh; *B=_wyrot(lh)^ll; #endif #elif defined(__SIZEOF_INT128__) && !defined(VWASM) __uint128_t r=*A; r*=*B; #if(WYHASH_CONDOM>1) *A^=(uint64_t)r; *B^=(uint64_t)(r>>64); #else *A=(uint64_t)r; *B=(uint64_t)(r>>64); #endif #elif defined(_MSC_VER) && defined(_M_X64) #if(WYHASH_CONDOM>1) uint64_t a, b; a=_umul128(*A,*B,&b); *A^=a; *B^=b; #else *A=_umul128(*A,*B,B); #endif #else uint64_t ha=*A>>32, hb=*B>>32, la=(uint32_t)*A, lb=(uint32_t)*B, hi, lo; uint64_t rh=ha*hb, rm0=ha*lb, rm1=hb*la, rl=la*lb, t=rl+(rm0<<32), c=t>32)+(rm1>>32)+c; #if(WYHASH_CONDOM>1) *A^=lo; *B^=hi; #else *A=lo; *B=hi; #endif #endif } // multiply and xor mix function, aka MUM static inline uint64_t _wymix(uint64_t A, uint64_t B){ _wymum(&A,&B); return A^B; } // endian macros #ifndef WYHASH_LITTLE_ENDIAN #ifdef TARGET_ORDER_IS_LITTLE #define WYHASH_LITTLE_ENDIAN 1 #else #define WYHASH_LITTLE_ENDIAN 0 #endif #endif // read functions #if (WYHASH_LITTLE_ENDIAN) static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return v;} static inline uint64_t _wyr4(const uint8_t *p) { uint32_t v; memcpy(&v, p, 4); return v;} #elif !defined(__TINYC__) && (defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)) static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return __builtin_bswap64(v);} static inline uint64_t _wyr4(const uint8_t *p) { uint32_t v; memcpy(&v, p, 4); return __builtin_bswap32(v);} #elif defined(_MSC_VER) static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return _byteswap_uint64(v);} static inline uint64_t _wyr4(const uint8_t *p) { uint32_t v; memcpy(&v, p, 4); return _byteswap_ulong(v);} #else static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return (((v >> 56) & 0xff)| ((v >> 40) & 0xff00)| ((v >> 24) & 0xff0000)| ((v >> 8) & 0xff000000)| ((v << 8) & 0xff00000000)| ((v << 24) & 0xff0000000000)| ((v << 40) & 0xff000000000000)| ((v << 56) & 0xff00000000000000)); } static inline uint64_t _wyr4(const uint8_t *p) { uint32_t v; memcpy(&v, p, 4); return (((v >> 24) & 0xff)| ((v >> 8) & 0xff00)| ((v << 8) & 0xff0000)| ((v << 24) & 0xff000000)); } #endif static inline uint64_t _wyr3(const uint8_t *p, size_t k) { return (((uint64_t)p[0])<<16)|(((uint64_t)p[k>>1])<<8)|p[k-1];} // wyhash main function static inline uint64_t wyhash(const void *key, size_t len, uint64_t seed, const uint64_t *secret){ const uint8_t *p=(const uint8_t *)key; seed^=*secret; uint64_t a, b; if (_likely_(len<=16)) { if (_likely_(len>=4)) { a=(_wyr4(p)<<32)|_wyr4(p+((len>>3)<<2)); b=(_wyr4(p+len-4)<<32)|_wyr4(p+len-4-((len>>3)<<2)); } else if (_likely_(len>0)) { a=_wyr3(p,len); b=0; } else a=b=0; } else { size_t i=len; if (_unlikely_(i>48)) { uint64_t see1=seed, see2=seed; do { seed=_wymix(_wyr8(p)^secret[1],_wyr8(p+8)^seed); see1=_wymix(_wyr8(p+16)^secret[2],_wyr8(p+24)^see1); see2=_wymix(_wyr8(p+32)^secret[3],_wyr8(p+40)^see2); p+=48; i-=48; } while(_likely_(i>48)); seed^=see1^see2; } while(_unlikely_(i>16)) { seed=_wymix(_wyr8(p)^secret[1],_wyr8(p+8)^seed); i-=16; p+=16; } a=_wyr8(p+i-16); b=_wyr8(p+i-8); } return _wymix(secret[1]^len,_wymix(a^secret[1],b^seed)); } // the default secret parameters static const uint64_t _wyp[4] = {0xa0761d6478bd642full, 0xe7037ed1a0b428dbull, 0x8ebc6af09c88c6e3ull, 0x589965cc75374cc3ull}; // a useful 64bit-64bit mix function to produce deterministic pseudo random numbers that can pass BigCrush and PractRand static inline uint64_t wyhash64(uint64_t A, uint64_t B){ A^=0xa0761d6478bd642full; B^=0xe7037ed1a0b428dbull; _wymum(&A,&B); return _wymix(A^0xa0761d6478bd642full,B^0xe7037ed1a0b428dbull);} // the wyrand PRNG that pass BigCrush and PractRand static inline uint64_t wyrand(uint64_t *seed){ *seed+=0xa0761d6478bd642full; return _wymix(*seed,*seed^0xe7037ed1a0b428dbull);} #ifndef __vinix__ // convert any 64 bit pseudo random numbers to uniform distribution [0,1). It can be combined with wyrand, wyhash64 or wyhash. static inline double wy2u01(uint64_t r){ const double _wynorm=1.0/(1ull<<52); return (r>>12)*_wynorm;} // convert any 64 bit pseudo random numbers to APPROXIMATE Gaussian distribution. It can be combined with wyrand, wyhash64 or wyhash. static inline double wy2gau(uint64_t r){ const double _wynorm=1.0/(1ull<<20); return ((r&0x1fffff)+((r>>21)&0x1fffff)+((r>>42)&0x1fffff))*_wynorm-3.0;} #endif #if(!WYHASH_32BIT_MUM) // fast range integer random number generation on [0,k) credit to Daniel Lemire. May not work when WYHASH_32BIT_MUM=1. It can be combined with wyrand, wyhash64 or wyhash. static inline uint64_t wy2u0k(uint64_t r, uint64_t k){ _wymum(&r,&k); return k; } #endif #endif #define _IN_MAP(val, m) map_exists(m, val) // V includes: #if defined(__TINYC__) && defined(__has_include) // tcc does not support has_include properly yet, turn it off completely #undef __has_include #endif // added by module `builtin`, file: float.c.v:9: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `builtin` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `term.termios`, file: termios_linux.c.v:10: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `term.termios` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `term.termios`, file: termios_linux.c.v:11: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `term.termios` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `time`, file: time.c.v:6: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `time` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `time`, file: time_nix.c.v:7: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `time` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `time`, file: time_nix.c.v:8: #include #if defined(_WIN32) // inserted by module `sync.stdatomic`, file: 1.declarations.c.v:8: /* * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H #define COMPAT_ATOMICS_WIN32_STDATOMIC_H #define WIN32_LEAN_AND_MEAN #include #include #include #ifdef __TINYC__ #endif #define ATOMIC_FLAG_INIT 0 #define ATOMIC_VAR_INIT(value) (value) #define atomic_init(obj, value) \ do \ { \ *(obj) = (value); \ } while (0) #define kill_dependency(y) ((void)0) #define atomic_thread_fence(order) \ MemoryBarrier(); #define atomic_signal_fence(order) \ ((void)0) #define atomic_is_lock_free(obj) 0 typedef intptr_t atomic_flag; typedef intptr_t atomic_bool; typedef intptr_t atomic_char; typedef intptr_t atomic_schar; typedef intptr_t atomic_uchar; typedef intptr_t atomic_short; typedef intptr_t atomic_ushort; typedef intptr_t atomic_int; typedef intptr_t atomic_uint; typedef intptr_t atomic_long; typedef intptr_t atomic_ulong; typedef intptr_t atomic_llong; typedef intptr_t atomic_ullong; typedef intptr_t atomic_wchar_t; typedef intptr_t atomic_int_least8_t; typedef intptr_t atomic_uint_least8_t; typedef intptr_t atomic_int_least16_t; typedef intptr_t atomic_uint_least16_t; typedef intptr_t atomic_int_least32_t; typedef intptr_t atomic_uint_least32_t; typedef intptr_t atomic_int_least64_t; typedef intptr_t atomic_uint_least64_t; typedef intptr_t atomic_int_fast8_t; typedef intptr_t atomic_uint_fast8_t; typedef intptr_t atomic_int_fast16_t; typedef intptr_t atomic_uint_fast16_t; typedef intptr_t atomic_int_fast32_t; typedef intptr_t atomic_uint_fast32_t; typedef intptr_t atomic_int_fast64_t; typedef intptr_t atomic_uint_fast64_t; typedef intptr_t atomic_intptr_t; typedef intptr_t atomic_uintptr_t; typedef intptr_t atomic_size_t; typedef intptr_t atomic_ptrdiff_t; typedef intptr_t atomic_intmax_t; typedef intptr_t atomic_uintmax_t; #ifdef __TINYC__ /* For TCC it is missing the x64 version of _InterlockedExchangeAdd64 so we fake it (works the same) with InterlockedCompareExchange64 until it succeeds */ __CRT_INLINE LONGLONG _InterlockedExchangeAdd64(LONGLONG volatile *Addend, LONGLONG Value) { LONGLONG Old; do { Old = *Addend; } while (InterlockedCompareExchange64(Addend, Old + Value, Old) != Old); return Old; } __CRT_INLINE LONG _InterlockedExchangeAdd(LONG volatile *Addend, LONG Value) { LONG Old; do { Old = *Addend; } while (InterlockedCompareExchange(Addend, Old + Value, Old) != Old); return Old; } __CRT_INLINE SHORT _InterlockedExchangeAdd16(SHORT volatile *Addend, SHORT Value) { SHORT Old; do { Old = *Addend; } while (InterlockedCompareExchange16(Addend, Old + Value, Old) != Old); return Old; } #define InterlockedIncrement64 _InterlockedExchangeAdd64 #endif #define atomic_store(object, desired) \ do \ { \ *(object) = (desired); \ MemoryBarrier(); \ } while (0) #define atomic_store_explicit(object, desired, order) \ atomic_store(object, desired) #define atomic_load(object) \ (MemoryBarrier(), *(object)) #define atomic_load_explicit(object, order) \ atomic_load(object) #define atomic_exchange(object, desired) \ InterlockedExchangePointer(object, desired) #define atomic_exchange_explicit(object, desired, order) \ atomic_exchange(object, desired) static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, intptr_t desired) { intptr_t old = *expected; *expected = (intptr_t)InterlockedCompareExchangePointer( (PVOID *)object, (PVOID)desired, (PVOID)old); return *expected == old; } #define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ atomic_compare_exchange_strong(object, expected, desired) #define atomic_compare_exchange_weak(object, expected, desired) \ atomic_compare_exchange_strong(object, expected, desired) #define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ atomic_compare_exchange_weak(object, expected, desired) #ifdef _WIN64 #define atomic_fetch_add(object, operand) \ InterlockedExchangeAdd64(object, operand) #define atomic_fetch_sub(object, operand) \ InterlockedExchangeAdd64(object, -(operand)) #define atomic_fetch_or(object, operand) \ InterlockedOr64(object, operand) #define atomic_fetch_xor(object, operand) \ InterlockedXor64(object, operand) #define atomic_fetch_and(object, operand) \ InterlockedAnd64(object, operand) #else #define atomic_fetch_add(object, operand) \ InterlockedExchangeAdd(object, operand) #define atomic_fetch_sub(object, operand) \ InterlockedExchangeAdd(object, -(operand)) #define atomic_fetch_or(object, operand) \ InterlockedOr(object, operand) #define atomic_fetch_xor(object, operand) \ InterlockedXor(object, operand) #define atomic_fetch_and(object, operand) \ InterlockedAnd(object, operand) #endif /* _WIN64 */ /* specialized versions with explicit object size */ #define atomic_load_ptr atomic_load #define atomic_store_ptr atomic_store #define atomic_compare_exchange_weak_ptr atomic_compare_exchange_weak #define atomic_compare_exchange_strong_ptr atomic_compare_exchange_strong #define atomic_exchange_ptr atomic_exchange #define atomic_fetch_add_ptr atomic_fetch_add #define atomic_fetch_sub_ptr atomic_fetch_sub #define atomic_fetch_and_ptr atomic_fetch_and #define atomic_fetch_or_ptr atomic_fetch_or #define atomic_fetch_xor_ptr atomic_fetch_xor static inline void atomic_store_u64(unsigned long long* object, unsigned long long desired) { do { *(object) = (desired); MemoryBarrier(); } while (0); } static inline unsigned long long atomic_load_u64(unsigned long long* object) { return (MemoryBarrier(), *(object)); } #define atomic_exchange_u64(object, desired) \ InterlockedExchange64(object, desired) static inline int atomic_compare_exchange_strong_u64(unsigned long long* object, unsigned long long* expected, unsigned long long desired) { unsigned long long old = *expected; *expected = InterlockedCompareExchange64(object, desired, old); return *expected == old; } #define atomic_compare_exchange_weak_u64(object, expected, desired) \ atomic_compare_exchange_strong_u64(object, expected, desired) #define atomic_fetch_add_u64(object, operand) \ InterlockedExchangeAdd64(object, operand) #define atomic_fetch_sub_u64(object, operand) \ InterlockedExchangeAdd64(object, -(operand)) #define atomic_fetch_or_u64(object, operand) \ InterlockedOr64(object, operand) #define atomic_fetch_xor_u64(object, operand) \ InterlockedXor64(object, operand) #define atomic_fetch_and_u64(object, operand) \ InterlockedAnd64(object, operand) static inline void atomic_store_u32(unsigned* object, unsigned desired) { do { *(object) = (desired); MemoryBarrier(); } while (0); } static inline unsigned atomic_load_u32(unsigned* object) { return (MemoryBarrier(), *(object)); } #define atomic_exchange_u32(object, desired) \ InterlockedExchange(object, desired) static inline int atomic_compare_exchange_strong_u32(unsigned* object, unsigned* expected, unsigned desired) { unsigned old = *expected; *expected = InterlockedCompareExchange(object, desired, old); return *expected == old; } #define atomic_compare_exchange_weak_u32(object, expected, desired) \ atomic_compare_exchange_strong_u32(object, expected, desired) #define atomic_fetch_add_u32(object, operand) \ InterlockedExchangeAdd(object, operand) #define atomic_fetch_sub_u32(object, operand) \ InterlockedExchangeAdd(object, -(operand)) #define atomic_fetch_or_u32(object, operand) \ InterlockedOr(object, operand) #define atomic_fetch_xor_u32(object, operand) \ InterlockedXor(object, operand) #define atomic_fetch_and_u32(object, operand) \ InterlockedAnd(object, operand) static inline void atomic_store_u16(unsigned short* object, unsigned short desired) { do { *(object) = (desired); MemoryBarrier(); } while (0); } static inline unsigned short atomic_load_u16(unsigned short* object) { return (MemoryBarrier(), *(object)); } #define atomic_exchange_u16(object, desired) \ InterlockedExchange16(object, desired) static inline int atomic_compare_exchange_strong_u16(unsigned short* object, unsigned short* expected, unsigned short desired) { unsigned short old = *expected; *expected = InterlockedCompareExchange16(object, desired, old); return *expected == old; } #define atomic_compare_exchange_weak_u16(object, expected, desired) \ atomic_compare_exchange_strong_u16(object, expected, desired) #define atomic_fetch_add_u16(object, operand) \ InterlockedExchangeAdd16(object, operand) #define atomic_fetch_sub_u16(object, operand) \ InterlockedExchangeAdd16(object, -(operand)) #define atomic_fetch_or_u16(object, operand) \ InterlockedOr16(object, operand) #define atomic_fetch_xor_u16(object, operand) \ InterlockedXor16(object, operand) #define atomic_fetch_and_u16(object, operand) \ InterlockedAnd16(object, operand) #define atomic_fetch_add_explicit(object, operand, order) \ atomic_fetch_add(object, operand) #define atomic_fetch_sub_explicit(object, operand, order) \ atomic_fetch_sub(object, operand) #define atomic_fetch_or_explicit(object, operand, order) \ atomic_fetch_or(object, operand) #define atomic_fetch_xor_explicit(object, operand, order) \ atomic_fetch_xor(object, operand) #define atomic_fetch_and_explicit(object, operand, order) \ atomic_fetch_and(object, operand) #define atomic_flag_test_and_set(object) \ atomic_exchange(object, 1) #define atomic_flag_test_and_set_explicit(object, order) \ atomic_flag_test_and_set(object) #define atomic_flag_clear(object) \ atomic_store(object, 0) #define atomic_flag_clear_explicit(object, order) \ atomic_flag_clear(object) #endif /* COMPAT_ATOMICS_WIN32_STDATOMIC_H */ #endif // $if defined(_WIN32) #if 1 // inserted by module `sync.stdatomic`, file: 1.declarations.c.v:11: /* Compatibility header for stdatomic.h that works for all compilers supported by V. For TCC, we use libatomic from the OS. */ #ifndef __ATOMIC_H #define __ATOMIC_H #ifndef __cplusplus // If C just use stdatomic.h #ifndef __TINYC__ #include #endif #else // CPP wrapper for atomic operations that are compatible with C #include "atomic_cpp.h" #endif #ifdef __TINYC__ typedef volatile long long atomic_llong; typedef volatile unsigned long long atomic_ullong; typedef volatile uintptr_t atomic_uintptr_t; // use functions for 64, 32 and 8 bit from libatomic directly // since tcc is not capible to use "generic" C functions // there is no header file for libatomic so we provide function declarations here extern unsigned long long __atomic_load_8(unsigned long long* x, int mo); extern void __atomic_store_8(unsigned long long* x, unsigned long long y, int mo); extern _Bool __atomic_compare_exchange_8(unsigned long long* x, unsigned long long* expected, unsigned long long y, int mo, int mo2); extern _Bool __atomic_compare_exchange_8(unsigned long long* x, unsigned long long* expected, unsigned long long y, int mo, int mo2); extern unsigned long long __atomic_exchange_8(unsigned long long* x, unsigned long long y, int mo); extern unsigned long long __atomic_fetch_add_8(unsigned long long* x, unsigned long long y, int mo); extern unsigned long long __atomic_fetch_sub_8(unsigned long long* x, unsigned long long y, int mo); extern unsigned long long __atomic_fetch_and_8(unsigned long long* x, unsigned long long y, int mo); extern unsigned long long __atomic_fetch_or_8(unsigned long long* x, unsigned long long y, int mo); extern unsigned long long __atomic_fetch_xor_8(unsigned long long* x, unsigned long long y, int mo); extern unsigned int __atomic_load_4(unsigned int* x, int mo); extern void __atomic_store_4(unsigned int* x, unsigned int y, int mo); extern _Bool __atomic_compare_exchange_4(unsigned int* x, unsigned int* expected, unsigned int y, int mo, int mo2); extern _Bool __atomic_compare_exchange_4(unsigned int* x, unsigned int* expected, unsigned int y, int mo, int mo2); extern unsigned int __atomic_exchange_4(unsigned int* x, unsigned int y, int mo); extern unsigned int __atomic_fetch_add_4(unsigned int* x, unsigned int y, int mo); extern unsigned int __atomic_fetch_sub_4(unsigned int* x, unsigned int y, int mo); extern unsigned int __atomic_fetch_and_4(unsigned int* x, unsigned int y, int mo); extern unsigned int __atomic_fetch_or_4(unsigned int* x, unsigned int y, int mo); extern unsigned int __atomic_fetch_xor_4(unsigned int* x, unsigned int y, int mo); extern unsigned short __atomic_load_2(unsigned short* x, int mo); extern void __atomic_store_2(unsigned short* x, unsigned short y, int mo); extern _Bool __atomic_compare_exchange_2(unsigned short* x, unsigned short* expected, unsigned short y, int mo, int mo2); extern _Bool __atomic_compare_exchange_2(unsigned short* x, unsigned short* expected, unsigned short y, int mo, int mo2); extern unsigned short __atomic_exchange_2(unsigned short* x, unsigned short y, int mo); extern unsigned short __atomic_fetch_add_2(unsigned short* x, unsigned short y, int mo); extern unsigned short __atomic_fetch_sub_2(unsigned short* x, unsigned short y, int mo); extern unsigned short __atomic_fetch_and_2(unsigned short* x, unsigned short y, int mo); extern unsigned short __atomic_fetch_or_2(unsigned short* x, unsigned short y, int mo); extern unsigned short __atomic_fetch_xor_2(unsigned short* x, unsigned short y, int mo); extern unsigned char __atomic_load_1(unsigned char* x, int mo); extern void __atomic_store_1(unsigned char* x, unsigned char y, int mo); extern _Bool __atomic_compare_exchange_1(unsigned char* x, unsigned char* expected, unsigned char y, int mo, int mo2); extern _Bool __atomic_compare_exchange_1(unsigned char* x, unsigned char* expected, unsigned char y, int mo, int mo2); extern unsigned char __atomic_exchange_1(unsigned char* x, unsigned char y, int mo); extern unsigned char __atomic_fetch_add_1(unsigned char* x, unsigned char y, int mo); extern unsigned char __atomic_fetch_sub_1(unsigned char* x, unsigned char y, int mo); extern unsigned char __atomic_fetch_and_1(unsigned char* x, unsigned char y, int mo); extern unsigned char __atomic_fetch_or_1(unsigned char* x, unsigned char y, int mo); extern unsigned char __atomic_fetch_xor_1(unsigned char* x, unsigned char y, int mo); // The default functions should work with pointers so we have to decide based on pointer size #if UINTPTR_MAX == 0xFFFFFFFF #define atomic_load_explicit __atomic_load_4 #define atomic_store_explicit __atomic_store_4 #define atomic_compare_exchange_weak_explicit __atomic_compare_exchange_4 #define atomic_compare_exchange_strong_explicit __atomic_compare_exchange_4 #define atomic_exchange_explicit __atomic_exchange_4 #define atomic_fetch_add_explicit __atomic_fetch_add_4 #define atomic_fetch_sub_explicit __atomic_sub_fetch_4 #else #define atomic_load_explicit __atomic_load_8 #define atomic_store_explicit __atomic_store_8 #define atomic_compare_exchange_weak_explicit __atomic_compare_exchange_8 #define atomic_compare_exchange_strong_explicit __atomic_compare_exchange_8 #define atomic_exchange_explicit __atomic_exchange_8 #define atomic_fetch_add_explicit __atomic_fetch_add_8 #define atomic_fetch_sub_explicit __atomic_sub_fetch_8 #endif // memory order policies - we use "sequentially consistent" by default #define memory_order_relaxed 0 #define memory_order_consume 1 #define memory_order_acquire 2 #define memory_order_release 3 #define memory_order_acq_rel 4 #define memory_order_seq_cst 5 static inline void** atomic_load(void** x) { return (void**)atomic_load_explicit((unsigned long long*)x, memory_order_seq_cst); } static inline void atomic_store(void** x, void* y) { atomic_store_explicit((unsigned long long*)x, (uintptr_t)y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak(void** x, void** expected, void* y) { return (int)atomic_compare_exchange_weak_explicit((unsigned long long*)x, (unsigned long long*)expected, (uintptr_t)y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong(void** x, void** expected, void* y) { return (int)atomic_compare_exchange_strong_explicit((unsigned long long*)x, (unsigned long long*)expected, (uintptr_t)y, memory_order_seq_cst, memory_order_seq_cst); } static inline uintptr_t atomic_exchange(void** x, void* y) { return atomic_exchange_explicit((unsigned long long*)x, (uintptr_t)y, memory_order_seq_cst); } static inline uintptr_t atomic_fetch_add(uintptr_t* x, uintptr_t y) { return atomic_fetch_add_explicit(x, y, memory_order_seq_cst); } static inline uintptr_t atomic_fetch_sub(uintptr_t* x, uintptr_t y) { return atomic_fetch_sub_explicit(x, y, memory_order_seq_cst); } static inline uintptr_t atomic_fetch_and(uintptr_t* x, uintptr_t y) { return atomic_fetch_and_explicit(x, y, memory_order_seq_cst); } static inline uintptr_t atomic_fetch_or(uintptr_t* x, uintptr_t y) { return atomic_fetch_or_explicit(x, y, memory_order_seq_cst); } static inline uintptr_t atomic_fetch_xor(uintptr_t* x, uintptr_t y) { return atomic_fetch_xor_explicit(x, y, memory_order_seq_cst); } #define atomic_load_ptr atomic_load #define atomic_store_ptr atomic_store #define atomic_compare_exchange_weak_ptr atomic_compare_exchange_weak #define atomic_compare_exchange_strong_ptr atomic_compare_exchange_strong #define atomic_exchange_ptr atomic_exchange #define atomic_fetch_add_ptr atomic_fetch_add #define atomic_fetch_sub_ptr atomic_fetch_sub #define atomic_fetch_and_ptr atomic_fetch_and #define atomic_fetch_or_ptr atomic_fetch_or #define atomic_fetch_xor_ptr atomic_fetch_xor // specialized versions for 64 bit static inline unsigned long long atomic_load_u64(unsigned long long* x) { return __atomic_load_8(x, memory_order_seq_cst); } static inline void atomic_store_u64(unsigned long long* x, unsigned long long y) { __atomic_store_8(x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_u64(unsigned long long* x, unsigned long long* expected, unsigned long long y) { return (int)__atomic_compare_exchange_8(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_u64(unsigned long long* x, unsigned long long* expected, unsigned long long y) { return (int)__atomic_compare_exchange_8(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned long long atomic_exchange_u64(unsigned long long* x, unsigned long long y) { return __atomic_exchange_8(x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_add_u64(unsigned long long* x, unsigned long long y) { return __atomic_fetch_add_8(x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_sub_u64(unsigned long long* x, unsigned long long y) { return __atomic_fetch_sub_8(x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_and_u64(unsigned long long* x, unsigned long long y) { return __atomic_fetch_and_8(x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_or_u64(unsigned long long* x, unsigned long long y) { return __atomic_fetch_or_8(x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_xor_u64(unsigned long long* x, unsigned long long y) { return __atomic_fetch_xor_8(x, y, memory_order_seq_cst); } static inline unsigned atomic_load_u32(unsigned* x) { return __atomic_load_4(x, memory_order_seq_cst); } static inline void atomic_store_u32(unsigned* x, unsigned y) { __atomic_store_4(x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_u32(unsigned* x, unsigned* expected, unsigned y) { return (int)__atomic_compare_exchange_4(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_u32(unsigned* x, unsigned* expected, unsigned y) { return (int)__atomic_compare_exchange_4(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned atomic_exchange_u32(unsigned* x, unsigned y) { return __atomic_exchange_4(x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_add_u32(unsigned* x, unsigned y) { return __atomic_fetch_add_4(x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_sub_u32(unsigned* x, unsigned y) { return __atomic_fetch_sub_4(x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_and_u32(unsigned* x, unsigned y) { return __atomic_fetch_and_4(x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_or_u32(unsigned* x, unsigned y) { return __atomic_fetch_or_4(x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_xor_u32(unsigned* x, unsigned y) { return __atomic_fetch_xor_4(x, y, memory_order_seq_cst); } static inline unsigned short atomic_load_u16(unsigned short* x) { return __atomic_load_2(x, memory_order_seq_cst); } static inline void atomic_store_u16(void* x, unsigned short y) { __atomic_store_2(x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_u16(void* x, unsigned short* expected, unsigned short y) { return (int)__atomic_compare_exchange_2(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_u16(unsigned short* x, unsigned short* expected, unsigned short y) { return (int)__atomic_compare_exchange_2(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned short atomic_exchange_u16(unsigned short* x, unsigned short y) { return __atomic_exchange_2(x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_add_u16(unsigned short* x, unsigned short y) { return __atomic_fetch_add_2(x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_sub_u16(unsigned short* x, unsigned short y) { return __atomic_fetch_sub_2(x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_and_u16(unsigned short* x, unsigned short y) { return __atomic_fetch_and_2(x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_or_u16(unsigned short* x, unsigned short y) { return __atomic_fetch_or_2(x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_xor_u16(unsigned short* x, unsigned short y) { return __atomic_fetch_xor_2(x, y, memory_order_seq_cst); } static inline unsigned char atomic_load_byte(unsigned char* x) { return __atomic_load_1(x, memory_order_seq_cst); } static inline void atomic_store_byte(unsigned char* x, unsigned char y) { __atomic_store_1(x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_byte(unsigned char* x, unsigned char* expected, unsigned char y) { return __atomic_compare_exchange_1(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_byte(unsigned char* x, unsigned char* expected, unsigned char y) { return __atomic_compare_exchange_1(x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned char atomic_exchange_byte(unsigned char* x, unsigned char y) { return __atomic_exchange_1(x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_add_byte(unsigned char* x, unsigned char y) { return __atomic_fetch_add_1(x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_sub_byte(unsigned char* x, unsigned char y) { return __atomic_fetch_sub_1(x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_and_byte(unsigned char* x, unsigned char y) { return __atomic_fetch_and_1(x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_or_byte(unsigned char* x, unsigned char y) { return __atomic_fetch_or_1(x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_xor_byte(unsigned char* x, unsigned char y) { return __atomic_fetch_xor_1(x, y, memory_order_seq_cst); } #else // Since V might be confused with "generic" C functions either we provide special versions // for gcc/clang, too static inline unsigned long long atomic_load_u64(unsigned long long* x) { return atomic_load_explicit((_Atomic (unsigned long long)*)x, memory_order_seq_cst); } static inline void atomic_store_u64(unsigned long long* x, unsigned long long y) { atomic_store_explicit((_Atomic(unsigned long long)*)x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_u64(unsigned long long* x, unsigned long long* expected, unsigned long long y) { return (int)atomic_compare_exchange_weak_explicit((_Atomic(unsigned long long)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_u64(unsigned long long* x, unsigned long long* expected, unsigned long long y) { return (int)atomic_compare_exchange_strong_explicit((_Atomic(unsigned long long)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned long long atomic_exchange_u64(unsigned long long* x, unsigned long long y) { return atomic_exchange_explicit((_Atomic(unsigned long long)*)x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_add_u64(unsigned long long* x, unsigned long long y) { return atomic_fetch_add_explicit((_Atomic(unsigned long long)*)x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_sub_u64(unsigned long long* x, unsigned long long y) { return atomic_fetch_sub_explicit((_Atomic(unsigned long long)*)x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_and_u64(unsigned long long* x, unsigned long long y) { return atomic_fetch_and_explicit((_Atomic(unsigned long long)*)x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_or_u64(unsigned long long* x, unsigned long long y) { return atomic_fetch_or_explicit((_Atomic(unsigned long long)*)x, y, memory_order_seq_cst); } static inline unsigned long long atomic_fetch_xor_u64(unsigned long long* x, unsigned long long y) { return atomic_fetch_xor_explicit((_Atomic(unsigned long long)*)x, y, memory_order_seq_cst); } static inline void* atomic_load_ptr(void** x) { return (void*)atomic_load_explicit((_Atomic(uintptr_t)*)x, memory_order_seq_cst); } static inline void atomic_store_ptr(void** x, void* y) { atomic_store_explicit((_Atomic(uintptr_t)*)x, (uintptr_t)y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_ptr(void** x, void** expected, void* y) { return (int)atomic_compare_exchange_weak_explicit((_Atomic(uintptr_t)*)x, (unsigned long *)expected, (uintptr_t)y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_ptr(void** x, void** expected, void* y) { return (int)atomic_compare_exchange_strong_explicit((_Atomic(uintptr_t)*)x, (unsigned long *)expected, (uintptr_t)y, memory_order_seq_cst, memory_order_seq_cst); } static inline void* atomic_exchange_ptr(void** x, void* y) { return (void*)atomic_exchange_explicit((_Atomic(uintptr_t)*)x, (uintptr_t)y, memory_order_seq_cst); } static inline void* atomic_fetch_add_ptr(void** x, void* y) { return (void*)atomic_fetch_add_explicit((_Atomic(uintptr_t)*)x, (uintptr_t)y, memory_order_seq_cst); } static inline void* atomic_fetch_sub_ptr(void** x, void* y) { return (void*)atomic_fetch_sub_explicit((_Atomic(uintptr_t)*)x, (uintptr_t)y, memory_order_seq_cst); } static inline void* atomic_fetch_and_ptr(void** x, void* y) { return (void*)atomic_fetch_and_explicit((_Atomic(uintptr_t)*)x, (uintptr_t)y, memory_order_seq_cst); } static inline void* atomic_fetch_or_ptr(void** x, void* y) { return (void*)atomic_fetch_or_explicit((_Atomic(uintptr_t)*)x, (uintptr_t)y, memory_order_seq_cst); } static inline void* atomic_fetch_xor_ptr(void** x, void* y) { return (void*)atomic_fetch_xor_explicit((_Atomic(uintptr_t)*)x, (uintptr_t)y, memory_order_seq_cst); } static inline unsigned atomic_load_u32(unsigned* x) { return atomic_load_explicit((_Atomic(unsigned)*)x, memory_order_seq_cst); } static inline void atomic_store_u32(unsigned* x, unsigned y) { atomic_store_explicit((_Atomic(unsigned)*)x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_u32(unsigned* x, unsigned* expected, unsigned y) { return (int)atomic_compare_exchange_weak_explicit((_Atomic(unsigned)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_u32(unsigned* x, unsigned* expected, unsigned y) { return (int)atomic_compare_exchange_strong_explicit((_Atomic(unsigned)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned atomic_exchange_u32(unsigned* x, unsigned y) { return atomic_exchange_explicit((_Atomic(unsigned)*)x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_add_u32(unsigned* x, unsigned y) { return atomic_fetch_add_explicit((_Atomic(unsigned)*)x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_sub_u32(unsigned* x, unsigned y) { return atomic_fetch_sub_explicit((_Atomic(unsigned)*)x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_and_u32(unsigned* x, unsigned y) { return atomic_fetch_and_explicit((_Atomic(unsigned)*)x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_or_u32(unsigned* x, unsigned y) { return atomic_fetch_or_explicit((_Atomic(unsigned)*)x, y, memory_order_seq_cst); } static inline unsigned atomic_fetch_xor_u32(unsigned* x, unsigned y) { return atomic_fetch_xor_explicit((_Atomic(unsigned)*)x, y, memory_order_seq_cst); } static inline unsigned short atomic_load_u16(unsigned short* x) { return atomic_load_explicit((_Atomic(unsigned short)*)x, memory_order_seq_cst); } static inline void atomic_store_u16(void* x, unsigned short y) { atomic_store_explicit((_Atomic(unsigned short)*)x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_u16(void* x, unsigned short* expected, unsigned short y) { return (int)atomic_compare_exchange_weak_explicit((_Atomic(unsigned short)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_u16(unsigned short* x, unsigned short* expected, unsigned short y) { return (int)atomic_compare_exchange_strong_explicit((_Atomic(unsigned short)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned short atomic_exchange_u16(unsigned short* x, unsigned short y) { return atomic_exchange_explicit((_Atomic(unsigned short)*)x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_add_u16(unsigned short* x, unsigned short y) { return atomic_fetch_add_explicit((_Atomic(unsigned short)*)x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_sub_u16(unsigned short* x, unsigned short y) { return atomic_fetch_sub_explicit((_Atomic(unsigned short)*)x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_and_u16(unsigned short* x, unsigned short y) { return atomic_fetch_and_explicit((_Atomic(unsigned short)*)x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_or_u16(unsigned short* x, unsigned short y) { return atomic_fetch_or_explicit((_Atomic(unsigned short)*)x, y, memory_order_seq_cst); } static inline unsigned short atomic_fetch_xor_u16(unsigned short* x, unsigned short y) { return atomic_fetch_xor_explicit((_Atomic(unsigned short)*)x, y, memory_order_seq_cst); } static inline unsigned char atomic_load_byte(unsigned char* x) { return atomic_load_explicit((_Atomic(unsigned char)*)x, memory_order_seq_cst); } static inline void atomic_store_byte(unsigned char* x, unsigned char y) { atomic_store_explicit((_Atomic(unsigned char)*)x, y, memory_order_seq_cst); } static inline int atomic_compare_exchange_weak_byte(unsigned char* x, unsigned char* expected, unsigned char y) { return (int)atomic_compare_exchange_weak_explicit((_Atomic(unsigned char)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline int atomic_compare_exchange_strong_byte(unsigned char* x, unsigned char* expected, unsigned char y) { return (int)atomic_compare_exchange_strong_explicit((_Atomic(unsigned char)*)x, expected, y, memory_order_seq_cst, memory_order_seq_cst); } static inline unsigned char atomic_exchange_byte(unsigned char* x, unsigned char y) { return atomic_exchange_explicit((_Atomic(unsigned char)*)x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_add_byte(unsigned char* x, unsigned char y) { return atomic_fetch_add_explicit((_Atomic(unsigned char)*)x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_sub_byte(unsigned char* x, unsigned char y) { return atomic_fetch_sub_explicit((_Atomic(unsigned char)*)x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_and_byte(unsigned char* x, unsigned char y) { return atomic_fetch_and_explicit((_Atomic(unsigned char)*)x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_or_byte(unsigned char* x, unsigned char y) { return atomic_fetch_or_explicit((_Atomic(unsigned char)*)x, y, memory_order_seq_cst); } static inline unsigned char atomic_fetch_xor_byte(unsigned char* x, unsigned char y) { return atomic_fetch_xor_explicit((_Atomic(unsigned char)*)x, y, memory_order_seq_cst); } #endif #endif #endif // $if 1 // added by module `os`, file: debugger_linux.c.v:3: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: os.c.v:5: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: os.c.v:6: #include #if defined(__FreeBSD__) // added by module `os`, file: os.c.v:9: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif #endif // $if defined(__FreeBSD__) // added by module `os`, file: os_nix.c.v:5: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: os_nix.c.v:6: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: os_nix.c.v:7: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: os_nix.c.v:8: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: os_nix.c.v:9: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: os_nix.c.v:10: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `os`, file: signal.c.v:3: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `os` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `term`, file: term_nix.c.v:6: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `term` was not found. Please install the corresponding development headers. #endif #else #include #endif // added by module `sync`, file: sync_default.c.v:14: #if defined(__has_include) #if __has_include() #include #else #error VERROR_MESSAGE Header file , needed for module `sync` was not found. Please install the corresponding development headers. #endif #else #include #endif // Enum definitions: typedef enum { strconv__ParserState__ok, // strconv__ParserState__pzero, // +1 strconv__ParserState__mzero, // +2 strconv__ParserState__pinf, // +3 strconv__ParserState__minf, // +4 strconv__ParserState__invalid_number, // +5 } strconv__ParserState; typedef enum { strconv__Align_text__right = 0, // 0 strconv__Align_text__left, // 0+1 strconv__Align_text__center, // 0+2 } strconv__Align_text; typedef enum { strconv__Char_parse_state__start, // strconv__Char_parse_state__norm_char, // +1 strconv__Char_parse_state__field_char, // +2 strconv__Char_parse_state__pad_ch, // +3 strconv__Char_parse_state__len_set_start, // +4 strconv__Char_parse_state__len_set_in, // +5 strconv__Char_parse_state__check_type, // +6 strconv__Char_parse_state__check_float, // +7 strconv__Char_parse_state__check_float_in, // +8 strconv__Char_parse_state__reset_params, // +9 } strconv__Char_parse_state; typedef enum { ArrayFlags__noslices = 1U, // u64(1) << 0 ArrayFlags__noshrink = 2U, // u64(1) << 1 ArrayFlags__nogrow = 4U, // u64(1) << 2 ArrayFlags__nofree = 8U, // u64(1) << 3 } ArrayFlags; typedef enum { AttributeKind__plain, // AttributeKind__string, // +1 AttributeKind__number, // +2 AttributeKind__comptime_define, // +3 } AttributeKind; typedef enum { ChanState__success, // ChanState__not_ready, // +1 ChanState__closed, // +2 } ChanState; typedef enum { StrIntpType__si_no_str = 0, // 0 StrIntpType__si_c, // 0+1 StrIntpType__si_u8, // 0+2 StrIntpType__si_i8, // 0+3 StrIntpType__si_u16, // 0+4 StrIntpType__si_i16, // 0+5 StrIntpType__si_u32, // 0+6 StrIntpType__si_i32, // 0+7 StrIntpType__si_u64, // 0+8 StrIntpType__si_i64, // 0+9 StrIntpType__si_e32, // 0+10 StrIntpType__si_e64, // 0+11 StrIntpType__si_f32, // 0+12 StrIntpType__si_f64, // 0+13 StrIntpType__si_g32, // 0+14 StrIntpType__si_g64, // 0+15 StrIntpType__si_s, // 0+16 StrIntpType__si_p, // 0+17 StrIntpType__si_vp, // 0+18 } StrIntpType; typedef enum { v__token__Kind__unknown, // v__token__Kind__eof, // +1 v__token__Kind__name, // +2 v__token__Kind__number, // +3 v__token__Kind__string, // +4 v__token__Kind__str_inter, // +5 v__token__Kind__chartoken, // +6 v__token__Kind__plus, // +7 v__token__Kind__minus, // +8 v__token__Kind__mul, // +9 v__token__Kind__div, // +10 v__token__Kind__mod, // +11 v__token__Kind__xor, // +12 v__token__Kind__pipe, // +13 v__token__Kind__inc, // +14 v__token__Kind__dec, // +15 v__token__Kind__and, // +16 v__token__Kind__logical_or, // +17 v__token__Kind__not, // +18 v__token__Kind__bit_not, // +19 v__token__Kind__question, // +20 v__token__Kind__comma, // +21 v__token__Kind__semicolon, // +22 v__token__Kind__colon, // +23 v__token__Kind__arrow, // +24 v__token__Kind__amp, // +25 v__token__Kind__hash, // +26 v__token__Kind__dollar, // +27 v__token__Kind__at, // +28 v__token__Kind__str_dollar, // +29 v__token__Kind__left_shift, // +30 v__token__Kind__right_shift, // +31 v__token__Kind__unsigned_right_shift, // +32 v__token__Kind__not_in, // +33 v__token__Kind__not_is, // +34 v__token__Kind__assign, // +35 v__token__Kind__decl_assign, // +36 v__token__Kind__plus_assign, // +37 v__token__Kind__minus_assign, // +38 v__token__Kind__div_assign, // +39 v__token__Kind__mult_assign, // +40 v__token__Kind__xor_assign, // +41 v__token__Kind__mod_assign, // +42 v__token__Kind__or_assign, // +43 v__token__Kind__and_assign, // +44 v__token__Kind__right_shift_assign, // +45 v__token__Kind__left_shift_assign, // +46 v__token__Kind__unsigned_right_shift_assign, // +47 v__token__Kind__lcbr, // +48 v__token__Kind__rcbr, // +49 v__token__Kind__lpar, // +50 v__token__Kind__rpar, // +51 v__token__Kind__lsbr, // +52 v__token__Kind__nilsbr, // +53 v__token__Kind__rsbr, // +54 v__token__Kind__eq, // +55 v__token__Kind__ne, // +56 v__token__Kind__gt, // +57 v__token__Kind__lt, // +58 v__token__Kind__ge, // +59 v__token__Kind__le, // +60 v__token__Kind__comment, // +61 v__token__Kind__nl, // +62 v__token__Kind__dot, // +63 v__token__Kind__dotdot, // +64 v__token__Kind__ellipsis, // +65 v__token__Kind__keyword_beg, // +66 v__token__Kind__key_as, // +67 v__token__Kind__key_asm, // +68 v__token__Kind__key_assert, // +69 v__token__Kind__key_atomic, // +70 v__token__Kind__key_break, // +71 v__token__Kind__key_const, // +72 v__token__Kind__key_continue, // +73 v__token__Kind__key_defer, // +74 v__token__Kind__key_else, // +75 v__token__Kind__key_enum, // +76 v__token__Kind__key_false, // +77 v__token__Kind__key_for, // +78 v__token__Kind__key_fn, // +79 v__token__Kind__key_global, // +80 v__token__Kind__key_go, // +81 v__token__Kind__key_goto, // +82 v__token__Kind__key_if, // +83 v__token__Kind__key_import, // +84 v__token__Kind__key_in, // +85 v__token__Kind__key_interface, // +86 v__token__Kind__key_is, // +87 v__token__Kind__key_match, // +88 v__token__Kind__key_module, // +89 v__token__Kind__key_mut, // +90 v__token__Kind__key_nil, // +91 v__token__Kind__key_shared, // +92 v__token__Kind__key_lock, // +93 v__token__Kind__key_rlock, // +94 v__token__Kind__key_none, // +95 v__token__Kind__key_return, // +96 v__token__Kind__key_select, // +97 v__token__Kind__key_like, // +98 v__token__Kind__key_sizeof, // +99 v__token__Kind__key_isreftype, // +100 v__token__Kind__key_likely, // +101 v__token__Kind__key_unlikely, // +102 v__token__Kind__key_offsetof, // +103 v__token__Kind__key_struct, // +104 v__token__Kind__key_true, // +105 v__token__Kind__key_type, // +106 v__token__Kind__key_typeof, // +107 v__token__Kind__key_dump, // +108 v__token__Kind__key_orelse, // +109 v__token__Kind__key_union, // +110 v__token__Kind__key_pub, // +111 v__token__Kind__key_static, // +112 v__token__Kind__key_volatile, // +113 v__token__Kind__key_unsafe, // +114 v__token__Kind__key_spawn, // +115 v__token__Kind__keyword_end, // +116 v__token__Kind___end_, // +117 } v__token__Kind; typedef enum { v__token__AtKind__unknown, // v__token__AtKind__fn_name, // +1 v__token__AtKind__method_name, // +2 v__token__AtKind__mod_name, // +3 v__token__AtKind__struct_name, // +4 v__token__AtKind__vexe_path, // +5 v__token__AtKind__file_path, // +6 v__token__AtKind__line_nr, // +7 v__token__AtKind__column_nr, // +8 v__token__AtKind__vhash, // +9 v__token__AtKind__vmod_file, // +10 v__token__AtKind__vmodroot_path, // +11 v__token__AtKind__vroot_path, // +12 v__token__AtKind__vexeroot_path, // +13 v__token__AtKind__file_path_line_nr, // +14 } v__token__AtKind; typedef enum { v__token__Precedence__lowest, // v__token__Precedence__cond, // +1 v__token__Precedence__in_as, // +2 v__token__Precedence__assign, // +3 v__token__Precedence__eq, // +4 v__token__Precedence__sum, // +5 v__token__Precedence__product, // +6 v__token__Precedence__prefix, // +7 v__token__Precedence__postfix, // +8 v__token__Precedence__call, // +9 v__token__Precedence__index, // +10 v__token__Precedence__highest, // +11 } v__token__Precedence; typedef enum { time__FormatTime__hhmm12, // time__FormatTime__hhmm24, // +1 time__FormatTime__hhmmss12, // +2 time__FormatTime__hhmmss24, // +3 time__FormatTime__hhmmss24_milli, // +4 time__FormatTime__hhmmss24_micro, // +5 time__FormatTime__hhmmss24_nano, // +6 time__FormatTime__no_time, // +7 } time__FormatTime; typedef enum { time__FormatDate__ddmmyy, // time__FormatDate__ddmmyyyy, // +1 time__FormatDate__mmddyy, // +2 time__FormatDate__mmddyyyy, // +3 time__FormatDate__mmmd, // +4 time__FormatDate__mmmdd, // +5 time__FormatDate__mmmddyy, // +6 time__FormatDate__mmmddyyyy, // +7 time__FormatDate__no_date, // +8 time__FormatDate__yyyymmdd, // +9 time__FormatDate__yymmdd, // +10 } time__FormatDate; typedef enum { time__FormatDelimiter__dot, // time__FormatDelimiter__hyphen, // +1 time__FormatDelimiter__slash, // +2 time__FormatDelimiter__space, // +3 time__FormatDelimiter__no_delimiter, // +4 } time__FormatDelimiter; typedef enum { semver__Operator__gt, // semver__Operator__lt, // +1 semver__Operator__ge, // +2 semver__Operator__le, // +3 semver__Operator__eq, // +4 } semver__Operator; typedef enum { semver__Increment__major, // semver__Increment__minor, // +1 semver__Increment__patch, // +2 } semver__Increment; typedef enum { os__SeekMode__start, // os__SeekMode__current, // +1 os__SeekMode__end, // +2 } os__SeekMode; typedef enum { os__FileType__regular, // os__FileType__directory, // +1 os__FileType__character_device, // +2 os__FileType__block_device, // +3 os__FileType__fifo, // +4 os__FileType__symbolic_link, // +5 os__FileType__socket, // +6 } os__FileType; typedef enum { os__GlobMatch__exact, // os__GlobMatch__ends_with, // +1 os__GlobMatch__starts_with, // +2 os__GlobMatch__start_and_ends_with, // +3 os__GlobMatch__contains, // +4 os__GlobMatch__any, // +5 } os__GlobMatch; typedef enum { os__ProcessState__not_started, // os__ProcessState__running, // +1 os__ProcessState__stopped, // +2 os__ProcessState__exited, // +3 os__ProcessState__aborted, // +4 os__ProcessState__closed, // +5 } os__ProcessState; typedef enum { os__Signal__hup = 1, // 1 os__Signal__int = 2, // 2 os__Signal__quit = 3, // 3 os__Signal__ill = 4, // 4 os__Signal__trap = 5, // 5 os__Signal__abrt = 6, // 6 os__Signal__bus = 7, // 7 os__Signal__fpe = 8, // 8 os__Signal__kill = 9, // 9 os__Signal__usr1 = 10, // 10 os__Signal__segv = 11, // 11 os__Signal__usr2 = 12, // 12 os__Signal__pipe = 13, // 13 os__Signal__alrm = 14, // 14 os__Signal__term = 15, // 15 os__Signal__stkflt = 16, // 16 os__Signal__chld = 17, // 17 os__Signal__cont = 18, // 18 os__Signal__stop = 19, // 19 os__Signal__tstp = 20, // 20 os__Signal__ttin = 21, // 21 os__Signal__ttou = 22, // 22 os__Signal__urg = 23, // 23 os__Signal__xcpu = 24, // 24 os__Signal__xfsz = 25, // 25 os__Signal__vtalrm = 26, // 26 os__Signal__prof = 27, // 27 os__Signal__winch = 28, // 28 os__Signal__poll = 29, // 29 os__Signal__pwr = 30, // 30 os__Signal__sys = 31, // 31 } os__Signal; typedef enum { v__errors__Reporter__scanner, // v__errors__Reporter__parser, // +1 v__errors__Reporter__checker, // +2 v__errors__Reporter__builder, // +3 v__errors__Reporter__gen, // +4 } v__errors__Reporter; typedef enum { v__vet__ErrorKind__error, // v__vet__ErrorKind__warning, // +1 v__vet__ErrorKind__notice, // +2 } v__vet__ErrorKind; typedef enum { v__vet__FixKind__unknown, // v__vet__FixKind__doc, // +1 v__vet__FixKind__vfmt, // +2 } v__vet__FixKind; typedef enum { v__vet__ErrorType__default, // v__vet__ErrorType__space_indent, // +1 v__vet__ErrorType__trailing_space, // +2 } v__vet__ErrorType; typedef enum { v__vmod__TokenKind__module_keyword, // v__vmod__TokenKind__field_key, // +1 v__vmod__TokenKind__lcbr, // +2 v__vmod__TokenKind__rcbr, // +3 v__vmod__TokenKind__labr, // +4 v__vmod__TokenKind__rabr, // +5 v__vmod__TokenKind__comma, // +6 v__vmod__TokenKind__colon, // +7 v__vmod__TokenKind__eof, // +8 v__vmod__TokenKind__str, // +9 v__vmod__TokenKind__ident, // +10 v__vmod__TokenKind__unknown, // +11 } v__vmod__TokenKind; typedef enum { v__pref__OS___auto, // v__pref__OS__ios, // +1 v__pref__OS__macos, // +2 v__pref__OS__linux, // +3 v__pref__OS__windows, // +4 v__pref__OS__freebsd, // +5 v__pref__OS__openbsd, // +6 v__pref__OS__netbsd, // +7 v__pref__OS__dragonfly, // +8 v__pref__OS__js_node, // +9 v__pref__OS__js_browser, // +10 v__pref__OS__js_freestanding, // +11 v__pref__OS__android, // +12 v__pref__OS__termux, // +13 v__pref__OS__solaris, // +14 v__pref__OS__qnx, // +15 v__pref__OS__serenity, // +16 v__pref__OS__plan9, // +17 v__pref__OS__vinix, // +18 v__pref__OS__haiku, // +19 v__pref__OS__wasm32, // +20 v__pref__OS__wasm32_emscripten, // +21 v__pref__OS__wasm32_wasi, // +22 v__pref__OS__browser, // +23 v__pref__OS__wasi, // +24 v__pref__OS__raw, // +25 v__pref__OS__all, // +26 } v__pref__OS; typedef enum { v__pref__BuildMode__default_mode, // v__pref__BuildMode__build_module, // +1 } v__pref__BuildMode; typedef enum { v__pref__AssertFailureMode__default, // v__pref__AssertFailureMode__aborts, // +1 v__pref__AssertFailureMode__backtraces, // +2 v__pref__AssertFailureMode__continues, // +3 } v__pref__AssertFailureMode; typedef enum { v__pref__GarbageCollectionMode__unknown, // v__pref__GarbageCollectionMode__no_gc, // +1 v__pref__GarbageCollectionMode__boehm_full, // +2 v__pref__GarbageCollectionMode__boehm_incr, // +3 v__pref__GarbageCollectionMode__boehm_full_opt, // +4 v__pref__GarbageCollectionMode__boehm_incr_opt, // +5 v__pref__GarbageCollectionMode__boehm_leak, // +6 } v__pref__GarbageCollectionMode; typedef enum { v__pref__OutputMode__stdout, // v__pref__OutputMode__silent, // +1 } v__pref__OutputMode; typedef enum { v__pref__ColorOutput__auto, // v__pref__ColorOutput__always, // +1 v__pref__ColorOutput__never, // +2 } v__pref__ColorOutput; typedef enum { v__pref__Backend__c, // v__pref__Backend__golang, // +1 v__pref__Backend__interpret, // +2 v__pref__Backend__js_node, // +3 v__pref__Backend__js_browser, // +4 v__pref__Backend__js_freestanding, // +5 v__pref__Backend__native, // +6 v__pref__Backend__wasm, // +7 } v__pref__Backend; typedef enum { v__pref__CompilerType__gcc, // v__pref__CompilerType__tinyc, // +1 v__pref__CompilerType__clang, // +2 v__pref__CompilerType__mingw, // +3 v__pref__CompilerType__msvc, // +4 v__pref__CompilerType__cplusplus, // +5 } v__pref__CompilerType; typedef enum { v__pref__Arch___auto, // v__pref__Arch__amd64, // +1 v__pref__Arch__arm64, // +2 v__pref__Arch__arm32, // +3 v__pref__Arch__rv64, // +4 v__pref__Arch__rv32, // +5 v__pref__Arch__i386, // +6 v__pref__Arch__js_node, // +7 v__pref__Arch__js_browser, // +8 v__pref__Arch__js_freestanding, // +9 v__pref__Arch__wasm32, // +10 v__pref__Arch___max, // +11 } v__pref__Arch; typedef enum { sync__BufferElemStat__unused = 0, // 0 sync__BufferElemStat__writing, // 0+1 sync__BufferElemStat__written, // 0+2 sync__BufferElemStat__reading, // 0+3 } sync__BufferElemStat; typedef enum { sync__Direction__pop, // sync__Direction__push, // +1 } sync__Direction; typedef enum { v__ast__ComptimeTypeKind__map_, // v__ast__ComptimeTypeKind__int, // +1 v__ast__ComptimeTypeKind__float, // +2 v__ast__ComptimeTypeKind__struct_, // +3 v__ast__ComptimeTypeKind__iface, // +4 v__ast__ComptimeTypeKind__array, // +5 v__ast__ComptimeTypeKind__sum_type, // +6 v__ast__ComptimeTypeKind__enum_, // +7 v__ast__ComptimeTypeKind__alias, // +8 v__ast__ComptimeTypeKind__function, // +9 v__ast__ComptimeTypeKind__option, // +10 } v__ast__ComptimeTypeKind; typedef enum { v__ast__GenericKindField__unknown, // v__ast__GenericKindField__name, // +1 v__ast__GenericKindField__typ, // +2 } v__ast__GenericKindField; typedef enum { v__ast__StructInitKind__normal, // v__ast__StructInitKind__short_syntax, // +1 v__ast__StructInitKind__anon, // +2 } v__ast__StructInitKind; typedef enum { v__ast__ComptimeVarKind__no_comptime, // v__ast__ComptimeVarKind__key_var, // +1 v__ast__ComptimeVarKind__value_var, // +2 v__ast__ComptimeVarKind__field_var, // +3 v__ast__ComptimeVarKind__generic_param, // +4 } v__ast__ComptimeVarKind; typedef enum { v__ast__IdentKind__unresolved, // v__ast__IdentKind__blank_ident, // +1 v__ast__IdentKind__variable, // +2 v__ast__IdentKind__constant, // +3 v__ast__IdentKind__global, // +4 v__ast__IdentKind__function, // +5 } v__ast__IdentKind; typedef enum { v__ast__ComptimeForKind__methods, // v__ast__ComptimeForKind__fields, // +1 v__ast__ComptimeForKind__attributes, // +2 v__ast__ComptimeForKind__values, // +3 } v__ast__ComptimeForKind; typedef enum { v__ast__AddressingMode__invalid, // v__ast__AddressingMode__displacement, // +1 v__ast__AddressingMode__base, // +2 v__ast__AddressingMode__base_plus_displacement, // +3 v__ast__AddressingMode__index_times_scale_plus_displacement, // +4 v__ast__AddressingMode__base_plus_index_plus_displacement, // +5 v__ast__AddressingMode__base_plus_index_times_scale_plus_displacement, // +6 v__ast__AddressingMode__rip_plus_displacement, // +7 } v__ast__AddressingMode; typedef enum { v__ast__OrKind__absent, // v__ast__OrKind__block, // +1 v__ast__OrKind__propagate_option, // +2 v__ast__OrKind__propagate_result, // +3 } v__ast__OrKind; typedef enum { v__ast__SqlStmtKind__insert, // v__ast__SqlStmtKind__update, // +1 v__ast__SqlStmtKind__delete, // +2 v__ast__SqlStmtKind__create, // +3 v__ast__SqlStmtKind__drop, // +4 } v__ast__SqlStmtKind; typedef enum { v__ast__AttrKind__plain, // v__ast__AttrKind__string, // +1 v__ast__AttrKind__number, // +2 v__ast__AttrKind__bool, // +3 v__ast__AttrKind__comptime_define, // +4 } v__ast__AttrKind; typedef enum { v__ast__Language__v, // v__ast__Language__c, // +1 v__ast__Language__js, // +2 v__ast__Language__wasm, // +3 v__ast__Language__amd64, // +4 v__ast__Language__i386, // +5 v__ast__Language__arm64, // +6 v__ast__Language__arm32, // +7 v__ast__Language__rv64, // +8 v__ast__Language__rv32, // +9 v__ast__Language__wasm32, // +10 } v__ast__Language; typedef enum { v__ast__TypeFlag__option, // v__ast__TypeFlag__result, // +1 v__ast__TypeFlag__variadic, // +2 v__ast__TypeFlag__generic, // +3 v__ast__TypeFlag__shared_f, // +4 v__ast__TypeFlag__atomic_f, // +5 } v__ast__TypeFlag; typedef enum { v__ast__ShareType__mut_t, // v__ast__ShareType__shared_t, // +1 v__ast__ShareType__atomic_t, // +2 } v__ast__ShareType; typedef enum { v__ast__Kind__placeholder, // v__ast__Kind__void, // +1 v__ast__Kind__voidptr, // +2 v__ast__Kind__byteptr, // +3 v__ast__Kind__charptr, // +4 v__ast__Kind__i8, // +5 v__ast__Kind__i16, // +6 v__ast__Kind__int, // +7 v__ast__Kind__i64, // +8 v__ast__Kind__isize, // +9 v__ast__Kind__u8, // +10 v__ast__Kind__u16, // +11 v__ast__Kind__u32, // +12 v__ast__Kind__u64, // +13 v__ast__Kind__usize, // +14 v__ast__Kind__f32, // +15 v__ast__Kind__f64, // +16 v__ast__Kind__char, // +17 v__ast__Kind__rune, // +18 v__ast__Kind__bool, // +19 v__ast__Kind__none_, // +20 v__ast__Kind__string, // +21 v__ast__Kind__array, // +22 v__ast__Kind__array_fixed, // +23 v__ast__Kind__map, // +24 v__ast__Kind__chan, // +25 v__ast__Kind__any, // +26 v__ast__Kind__struct_, // +27 v__ast__Kind__generic_inst, // +28 v__ast__Kind__multi_return, // +29 v__ast__Kind__sum_type, // +30 v__ast__Kind__alias, // +31 v__ast__Kind__enum_, // +32 v__ast__Kind__function, // +33 v__ast__Kind__interface_, // +34 v__ast__Kind__float_literal, // +35 v__ast__Kind__int_literal, // +36 v__ast__Kind__aggregate, // +37 v__ast__Kind__thread, // +38 } v__ast__Kind; typedef enum { v__gen__c__AssertMetainfoKind__pass, // v__gen__c__AssertMetainfoKind__fail, // +1 v__gen__c__AssertMetainfoKind__panic, // +2 } v__gen__c__AssertMetainfoKind; typedef enum { v__gen__c__SqlExprSide__left, // v__gen__c__SqlExprSide__right, // +1 } v__gen__c__SqlExprSide; typedef enum { v__gen__c__SpawnGoMode__spawn_, // v__gen__c__SpawnGoMode__go_, // +1 } v__gen__c__SpawnGoMode; typedef enum { v__scanner__CommentsMode__skip_comments, // v__scanner__CommentsMode__parse_comments, // +1 v__scanner__CommentsMode__toplevel_comments, // +2 } v__scanner__CommentsMode; typedef enum { v__checker__ComptimeBranchSkipState__eval, // v__checker__ComptimeBranchSkipState__skip, // +1 v__checker__ComptimeBranchSkipState__unknown, // +2 } v__checker__ComptimeBranchSkipState; typedef enum { v__parser__OrBlockErrVarMode__no_err_var, // v__parser__OrBlockErrVarMode__with_err_var, // +1 } v__parser__OrBlockErrVarMode; typedef enum { v__parser__State__simple, // v__parser__State__html, // +1 v__parser__State__css, // +2 v__parser__State__js, // +3 } v__parser__State; // Thread definitions: typedef pthread_t __v_thread; // V type definitions: struct IError { union { void* _object; None__* _None__; voidptr* _voidptr; Error* _Error; MessageError* _MessageError; time__TimeParseError* _time__TimeParseError; flag__UnknownFlagError* _flag__UnknownFlagError; flag__ArgsCountError* _flag__ArgsCountError; semver__InvalidComparatorFormatError* _semver__InvalidComparatorFormatError; semver__EmptyInputError* _semver__EmptyInputError; semver__InvalidVersionFormatError* _semver__InvalidVersionFormatError; os__Eof* _os__Eof; os__NotExpected* _os__NotExpected; os__FileNotOpenedError* _os__FileNotOpenedError; os__SizeOfTypeIs0Error* _os__SizeOfTypeIs0Error; os__ExecutableNotFoundError* _os__ExecutableNotFoundError; v__gen__c__UnsupportedAssertCtempTransform* _v__gen__c__UnsupportedAssertCtempTransform; }; int _typ; string* msg; int* code; }; struct string { u8* str; int len; int is_lit; }; struct array { voidptr data; int offset; int len; int cap; ArrayFlags flags; int element_size; }; struct DenseArray { int key_bytes; int value_bytes; int cap; int len; u32 deletes; u8* all_deleted; u8* keys; u8* values; }; struct map { int key_bytes; int value_bytes; u32 even_index; u8 cached_hashbits; u8 shift; DenseArray key_values; u32* metas; u32 extra_metas; bool has_string_keys; MapHashFn hash_fn; MapEqFn key_eq_fn; MapCloneFn clone_fn; MapFreeFn free_fn; int len; }; struct Error { EMPTY_STRUCT_DECLARATION; }; struct _option { u8 state; IError err; }; struct _result { bool is_error; IError err; }; typedef array Array_string; typedef array Array_u8; typedef array Array_voidptr; typedef array Array_VCastTypeIndexName; typedef array Array_MethodArgs; typedef array Array_u8_ptr; typedef array Array_rune; typedef string Array_fixed_string_11 [11]; typedef voidptr Array_fixed_voidptr_11 [11]; typedef array Array_int; typedef array Array_RepIndex; typedef map Map_string_int; typedef map Map_string_string; typedef array Array_char_ptr; typedef int Array_fixed_int_3 [3]; typedef char Array_fixed_char_256 [256]; typedef int Array_fixed_int_10 [10]; typedef array Array_Array_string; typedef map Map_string_bool; typedef map Map_string_Array_string; typedef array Array_v__util__Possibility; typedef map Map_string_time__StopWatch; typedef array Array_v__ast__File_ptr; typedef array Array_v__builder__FunctionRedefinition; typedef array Array_v__cflag__CFlag; typedef array Array_os__File; typedef array Array_u32; typedef array Array_v__token__TrieNode_ptr; typedef map Map_string_T; typedef map Map_string_v__token__Kind; typedef array Array_v__token__Precedence; typedef array Array_v__vmod__Token; typedef map Map_string_v__vmod__ModFileAndFolder; typedef array Array_v__ast__Comment; typedef array Array_v__ast__Stmt; typedef array Array_bool; typedef array Array_v__token__Pos; typedef array Array_v__ast__Expr; typedef array Array_v__ast__Type; typedef array Array_v__ast__Attr; typedef array Array_v__ast__ConstField; typedef array Array_v__ast__Embed; typedef array Array_v__ast__StructField; typedef array Array_v__ast__FnDecl; typedef array Array_v__ast__InterfaceEmbedding; typedef array Array_v__ast__StructInitField; typedef array Array_v__ast__ImportSymbol; typedef array Array_v__ast__Param; typedef array Array_v__ast__DeferStmt; typedef array Array_v__ast__CallArg; typedef array Array_v__ast__GlobalField; typedef array Array_v__ast__Import; typedef array Array_v__ast__EmbeddedFile; typedef array Array_v__errors__Error; typedef array Array_v__errors__Warning; typedef array Array_v__errors__Notice; typedef array Array_v__ast__FnDecl_ptr; typedef array Array_v__ast__IfBranch; typedef array Array_v__ast__MatchBranch; typedef array Array_Array_v__ast__Comment; typedef array Array_v__ast__SelectBranch; typedef array Array_v__ast__EnumField; typedef array Array_v__ast__TypeNode; typedef array Array_v__ast__Ident; typedef array Array_v__ast__AsmClobbered; typedef array Array_v__ast__AsmTemplate; typedef array Array_v__ast__AsmIO; typedef array Array_v__ast__AsmArg; typedef array Array_v__ast__IfGuardVar; typedef array Array_v__ast__SqlStmtLine; typedef map Map_int_v__ast__SqlStmtLine; typedef map Map_int_v__ast__SqlExpr; typedef array Array_v__ast__Node; typedef map Map_string_v__ast__ScopeObject; typedef map Map_string_v__ast__ScopeStructField; typedef array Array_v__ast__Scope_ptr; typedef array Array_v__ast__StringifyModReplacement; typedef array Array_v__ast__TypeSymbol_ptr; typedef map Map_string_v__ast__Fn; typedef map Map_string_Array_v__ast__Type; typedef map Map_int_string; typedef array Array_Array_v__ast__Type; typedef map Map_string_Array_Array_v__ast__Type; typedef map Map_int_v__ast__InterfaceDecl; typedef map Map_string_v__ast__EnumDecl; typedef map Map_string_Array_v__ast__Attr; typedef map Map_u64_string; typedef array Array_v__ast__Fn; typedef array Array_i64; typedef map Map_string_v__ast__StructField; typedef map Map_int_Array_v__ast__Type; typedef array Array_v__ast__TypeFlag; typedef array Array_v__ast__Kind; typedef array Array_v__checker__ACFieldMethod; typedef map Map_string_v__ast__Type; typedef map Map_string_v__ast__GotoLabel; typedef map Map_int_v__ast__InterfaceEmbedding; typedef array Array_u64; typedef map Map_int_v__ast__Type; typedef array Array_v__transformer__KeyVal; typedef array Array_Array_v__transformer__KeyVal; typedef array Array_v__vet__Error; typedef map Map_string_v__ast__FnDecl; typedef map Map_string_v__ast__ConstField; typedef map Map_string_v__ast__GlobalField; typedef array Array_v__depgraph__DepGraphNode; typedef map Map_string_i64; typedef map Map_string_strings__Builder; typedef map Map_string_v__gen__c__GlobalConstDef; typedef map Map_string_v__ast__Stmt_ptr; typedef array Array_v__gen__c__StrType; typedef array Array_v__gen__c__SumtypeCastingFn; typedef map Map_int_bool; typedef array Array_v__gen__c__ProfileCounterMeta; typedef array Array_v__gen__c__CurrentComptimeValues; typedef array Array_v__ast__InfixExpr; typedef array Array_v__ast__TypeSymbol; typedef array Array_Array_int; typedef array Array_sync__Channel_ptr; typedef array Array_sync__Direction; typedef array Array_sync__Subscription; typedef array Array_v__token__Token; typedef array Array_flag__Flag; typedef array Array_f64; typedef array Array_semver__Comparator; typedef array Array_semver__ComparatorSet; typedef u8 Array_fixed_u8_5 [5]; typedef u8 Array_fixed_u8_32 [32]; typedef u8 Array_fixed_u8_64 [64]; typedef u8 Array_fixed_u8_256 [256]; typedef u64 Array_fixed_u64_309 [309]; typedef u64 Array_fixed_u64_324 [324]; typedef u32 Array_fixed_u32_12 [12]; typedef u64 Array_fixed_u64_20 [20]; typedef u64 Array_fixed_u64_584 [584]; typedef u64 Array_fixed_u64_652 [652]; typedef f64 Array_fixed_f64_20 [20]; typedef u8 Array_fixed_u8_26 [26]; typedef u64 Array_fixed_u64_18 [18]; typedef u64 Array_fixed_u64_47 [47]; typedef u64 Array_fixed_u64_31 [31]; typedef voidptr Array_fixed_voidptr_100 [100]; typedef u8 Array_fixed_u8_1000 [1000]; typedef u8 Array_fixed_u8_17 [17]; typedef array Array_StrIntpType; typedef array Array_v__token__Kind; typedef char Array_fixed_char_1024 [1024]; typedef u8 Array_fixed_u8_4096 [4096]; typedef u8 Array_fixed_u8_1024 [1024]; typedef array Array_os__ProcessState; typedef int Array_fixed_int_6 [6]; typedef u8 Array_fixed_u8_50 [50]; typedef array Array_v__vmod__TokenKind; typedef array Array_v__pref__Backend; typedef array Array_v__pref__OS; typedef map Map_int_Array_string; typedef map Map_int_Map_string_int; typedef array Array_v__ast__IdentKind; typedef array Array_v__pref__GarbageCollectionMode; typedef array Array_v__ast__StringLiteral; typedef array Array_v__ast__SelectorExpr; typedef array Array_v__gen__c__Gen_ptr; typedef array Array_v__ast__Return; typedef array Array_v__ast__StructInit; typedef array Array_v__ast__IfExpr; typedef array Array_v__ast__Struct; typedef array Array_v__ast__ComptimeVarKind; typedef array Array_v__ast__BoolLiteral; typedef array Array_v__ast__ComptimeType; typedef array Array_v__ast__OrKind; typedef array Array_v__ast__IndexExpr; typedef array Array_v__ast__IntegerLiteral; typedef array Array_v__ast__Var; typedef map Map_rune_v__checker__LoHiLimit; typedef array Array_v__ast__CallExpr; typedef array Array_v__pref__Arch; typedef Array_u8 strings__Builder; typedef voidptr v__builder__RegKey; typedef int term__termios__TcFlag; typedef int term__termios__Speed; typedef u8 term__termios__Cc; typedef i64 time__Duration; typedef u8 v__ast__EmptyExpr; typedef int v__ast__Type; typedef bool (*anon_fn_voidptr__bool)(voidptr); typedef voidptr (*anon_fn_voidptr__voidptr)(voidptr); typedef int (*anon_fn_voidptr_voidptr__int)(voidptr,voidptr); typedef void (*FnExitCb)(); typedef int (*FnSortCB)(voidptr,voidptr); typedef void (*anon_fn_string)(string); typedef void (*os__FnWalkContextCB)(voidptr,string); typedef void (*os__SignalHandler)(os__Signal); typedef void (*os__FN_SA_Handler)(int); typedef string (*anon_fn_string__string)(string); typedef void (*v__builder__FnBackend)(v__builder__Builder*); typedef void (*v__ast__FnPanicHandler)(v__ast__Table*,string); typedef string (*v__dotgraph__FnLabel2NodeName)(string,voidptr); typedef void (*anon_fn_)(); typedef void (*anon_fn_voidptr)(voidptr); typedef voidptr (*sync__pool__ThreadCB)(sync__pool__PoolProcessor*,int,int); typedef bool (*v__ast__walker__InspectorFn)(v__ast__Node*,voidptr); struct rand__PRNG { union { void* _object; rand__wyrand__WyRandRNG* _rand__wyrand__WyRandRNG; voidptr* _voidptr; }; int _typ; }; struct hash__Hasher { union { void* _object; }; int _typ; }; struct hash__Hash32er { union { void* _object; }; int _typ; }; struct hash__Hash64er { union { void* _object; }; int _typ; }; struct v__ast__walker__Visitor { union { void* _object; v__ast__walker__Inspector* _v__ast__walker__Inspector; voidptr* _voidptr; v__callgraph__Mapper* _v__callgraph__Mapper; }; int _typ; }; // #start sorted_symbols struct none { EMPTY_STRUCT_DECLARATION; }; struct None__ { Error Error; }; struct StrIntpCgenData { string str; string fmt; string d; }; struct os__Eof { Error Error; }; struct os__FileNotOpenedError { Error Error; }; struct os__SizeOfTypeIs0Error { Error Error; }; struct os__ExecutableNotFoundError { Error Error; }; struct os__Uname { string sysname; string nodename; string release; string version; string machine; }; struct v__cflag__CFlag { string mod; string os; string name; string value; string cached; }; struct v__builder__WindowsKit { string um_lib_path; string ucrt_lib_path; string um_include_path; string ucrt_include_path; string shared_include_path; }; struct v__builder__VsInstallation { string include_path; string lib_path; string exe_path; }; typedef v__token__TrieNode* Array_fixed_v__token__TrieNode_ptr1_123 [123]; struct v__vmod__ModFileAndFolder { string vmod_file; string vmod_folder; }; // Union sum type v__ast__TypeDecl = // | 257 = v__ast__AliasTypeDecl // | 258 = v__ast__FnTypeDecl // | 259 = v__ast__SumTypeDecl struct v__ast__TypeDecl { union { v__ast__AliasTypeDecl* _v__ast__AliasTypeDecl; v__ast__FnTypeDecl* _v__ast__FnTypeDecl; v__ast__SumTypeDecl* _v__ast__SumTypeDecl; }; int _typ; string* name; bool* is_pub; v__ast__Type* typ; v__token__Pos* pos; }; // Union sum type v__ast__Expr = // | 261 = v__ast__AnonFn // | 262 = v__ast__ArrayDecompose // | 263 = v__ast__ArrayInit // | 264 = v__ast__AsCast // | 265 = v__ast__Assoc // | 266 = v__ast__AtExpr // | 267 = v__ast__BoolLiteral // | 268 = v__ast__CTempVar // | 269 = v__ast__CallExpr // | 270 = v__ast__CastExpr // | 271 = v__ast__ChanInit // | 272 = v__ast__CharLiteral // | 273 = v__ast__Comment // | 274 = v__ast__ComptimeCall // | 275 = v__ast__ComptimeSelector // | 276 = v__ast__ComptimeType // | 277 = v__ast__ConcatExpr // | 278 = v__ast__DumpExpr // | 279 = v__ast__EmptyExpr // | 280 = v__ast__EnumVal // | 281 = v__ast__FloatLiteral // | 282 = v__ast__GoExpr // | 283 = v__ast__Ident // | 284 = v__ast__IfExpr // | 285 = v__ast__IfGuardExpr // | 286 = v__ast__IndexExpr // | 287 = v__ast__InfixExpr // | 288 = v__ast__IntegerLiteral // | 289 = v__ast__IsRefType // | 290 = v__ast__LambdaExpr // | 291 = v__ast__Likely // | 292 = v__ast__LockExpr // | 293 = v__ast__MapInit // | 294 = v__ast__MatchExpr // | 295 = v__ast__Nil // | 296 = v__ast__NodeError // | 297 = v__ast__None // | 298 = v__ast__OffsetOf // | 299 = v__ast__OrExpr // | 300 = v__ast__ParExpr // | 301 = v__ast__PostfixExpr // | 302 = v__ast__PrefixExpr // | 303 = v__ast__RangeExpr // | 304 = v__ast__SelectExpr // | 305 = v__ast__SelectorExpr // | 306 = v__ast__SizeOf // | 307 = v__ast__SpawnExpr // | 308 = v__ast__SqlExpr // | 309 = v__ast__StringInterLiteral // | 310 = v__ast__StringLiteral // | 311 = v__ast__StructInit // | 312 = v__ast__TypeNode // | 313 = v__ast__TypeOf // | 314 = v__ast__UnsafeExpr struct v__ast__Expr { union { v__ast__AnonFn* _v__ast__AnonFn; v__ast__ArrayDecompose* _v__ast__ArrayDecompose; v__ast__ArrayInit* _v__ast__ArrayInit; v__ast__AsCast* _v__ast__AsCast; v__ast__Assoc* _v__ast__Assoc; v__ast__AtExpr* _v__ast__AtExpr; v__ast__BoolLiteral* _v__ast__BoolLiteral; v__ast__CTempVar* _v__ast__CTempVar; v__ast__CallExpr* _v__ast__CallExpr; v__ast__CastExpr* _v__ast__CastExpr; v__ast__ChanInit* _v__ast__ChanInit; v__ast__CharLiteral* _v__ast__CharLiteral; v__ast__Comment* _v__ast__Comment; v__ast__ComptimeCall* _v__ast__ComptimeCall; v__ast__ComptimeSelector* _v__ast__ComptimeSelector; v__ast__ComptimeType* _v__ast__ComptimeType; v__ast__ConcatExpr* _v__ast__ConcatExpr; v__ast__DumpExpr* _v__ast__DumpExpr; v__ast__EmptyExpr* _v__ast__EmptyExpr; v__ast__EnumVal* _v__ast__EnumVal; v__ast__FloatLiteral* _v__ast__FloatLiteral; v__ast__GoExpr* _v__ast__GoExpr; v__ast__Ident* _v__ast__Ident; v__ast__IfExpr* _v__ast__IfExpr; v__ast__IfGuardExpr* _v__ast__IfGuardExpr; v__ast__IndexExpr* _v__ast__IndexExpr; v__ast__InfixExpr* _v__ast__InfixExpr; v__ast__IntegerLiteral* _v__ast__IntegerLiteral; v__ast__IsRefType* _v__ast__IsRefType; v__ast__LambdaExpr* _v__ast__LambdaExpr; v__ast__Likely* _v__ast__Likely; v__ast__LockExpr* _v__ast__LockExpr; v__ast__MapInit* _v__ast__MapInit; v__ast__MatchExpr* _v__ast__MatchExpr; v__ast__Nil* _v__ast__Nil; v__ast__NodeError* _v__ast__NodeError; v__ast__None* _v__ast__None; v__ast__OffsetOf* _v__ast__OffsetOf; v__ast__OrExpr* _v__ast__OrExpr; v__ast__ParExpr* _v__ast__ParExpr; v__ast__PostfixExpr* _v__ast__PostfixExpr; v__ast__PrefixExpr* _v__ast__PrefixExpr; v__ast__RangeExpr* _v__ast__RangeExpr; v__ast__SelectExpr* _v__ast__SelectExpr; v__ast__SelectorExpr* _v__ast__SelectorExpr; v__ast__SizeOf* _v__ast__SizeOf; v__ast__SpawnExpr* _v__ast__SpawnExpr; v__ast__SqlExpr* _v__ast__SqlExpr; v__ast__StringInterLiteral* _v__ast__StringInterLiteral; v__ast__StringLiteral* _v__ast__StringLiteral; v__ast__StructInit* _v__ast__StructInit; v__ast__TypeNode* _v__ast__TypeNode; v__ast__TypeOf* _v__ast__TypeOf; v__ast__UnsafeExpr* _v__ast__UnsafeExpr; }; int _typ; }; // Union sum type v__ast__Stmt = // | 316 = v__ast__AsmStmt // | 317 = v__ast__AssertStmt // | 318 = v__ast__AssignStmt // | 319 = v__ast__Block // | 320 = v__ast__BranchStmt // | 321 = v__ast__ComptimeFor // | 322 = v__ast__ConstDecl // | 323 = v__ast__DeferStmt // | 324 = v__ast__EmptyStmt // | 325 = v__ast__EnumDecl // | 326 = v__ast__ExprStmt // | 194 = v__ast__FnDecl // | 327 = v__ast__ForCStmt // | 328 = v__ast__ForInStmt // | 329 = v__ast__ForStmt // | 330 = v__ast__GlobalDecl // | 331 = v__ast__GotoLabel // | 332 = v__ast__GotoStmt // | 333 = v__ast__HashStmt // | 334 = v__ast__Import // | 335 = v__ast__InterfaceDecl // | 336 = v__ast__Module // | 296 = v__ast__NodeError // | 337 = v__ast__Return // | 338 = v__ast__SemicolonStmt // | 339 = v__ast__SqlStmt // | 340 = v__ast__StructDecl // | 260 = v__ast__TypeDecl struct v__ast__Stmt { union { v__ast__AsmStmt* _v__ast__AsmStmt; v__ast__AssertStmt* _v__ast__AssertStmt; v__ast__AssignStmt* _v__ast__AssignStmt; v__ast__Block* _v__ast__Block; v__ast__BranchStmt* _v__ast__BranchStmt; v__ast__ComptimeFor* _v__ast__ComptimeFor; v__ast__ConstDecl* _v__ast__ConstDecl; v__ast__DeferStmt* _v__ast__DeferStmt; v__ast__EmptyStmt* _v__ast__EmptyStmt; v__ast__EnumDecl* _v__ast__EnumDecl; v__ast__ExprStmt* _v__ast__ExprStmt; v__ast__FnDecl* _v__ast__FnDecl; v__ast__ForCStmt* _v__ast__ForCStmt; v__ast__ForInStmt* _v__ast__ForInStmt; v__ast__ForStmt* _v__ast__ForStmt; v__ast__GlobalDecl* _v__ast__GlobalDecl; v__ast__GotoLabel* _v__ast__GotoLabel; v__ast__GotoStmt* _v__ast__GotoStmt; v__ast__HashStmt* _v__ast__HashStmt; v__ast__Import* _v__ast__Import; v__ast__InterfaceDecl* _v__ast__InterfaceDecl; v__ast__Module* _v__ast__Module; v__ast__NodeError* _v__ast__NodeError; v__ast__Return* _v__ast__Return; v__ast__SemicolonStmt* _v__ast__SemicolonStmt; v__ast__SqlStmt* _v__ast__SqlStmt; v__ast__StructDecl* _v__ast__StructDecl; v__ast__TypeDecl* _v__ast__TypeDecl; }; int _typ; v__token__Pos* pos; }; // Union sum type v__ast__ScopeObject = // | 342 = v__ast__AsmRegister // | 343 = v__ast__ConstField // | 344 = v__ast__GlobalField // | 345 = v__ast__Var struct v__ast__ScopeObject { union { v__ast__AsmRegister* _v__ast__AsmRegister; v__ast__ConstField* _v__ast__ConstField; v__ast__GlobalField* _v__ast__GlobalField; v__ast__Var* _v__ast__Var; }; int _typ; string* name; v__ast__Type* typ; }; // Union sum type v__ast__Node = // | 347 = v__ast__CallArg // | 343 = v__ast__ConstField // | 348 = v__ast__EmptyNode // | 349 = v__ast__EnumField // | 315 = v__ast__Expr // | 185 = v__ast__File // | 344 = v__ast__GlobalField // | 350 = v__ast__IfBranch // | 351 = v__ast__MatchBranch // | 296 = v__ast__NodeError // | 352 = v__ast__Param // | 346 = v__ast__ScopeObject // | 353 = v__ast__SelectBranch // | 341 = v__ast__Stmt // | 354 = v__ast__StructField // | 355 = v__ast__StructInitField struct v__ast__Node { union { v__ast__CallArg* _v__ast__CallArg; v__ast__ConstField* _v__ast__ConstField; v__ast__EmptyNode* _v__ast__EmptyNode; v__ast__EnumField* _v__ast__EnumField; v__ast__Expr* _v__ast__Expr; v__ast__File* _v__ast__File; v__ast__GlobalField* _v__ast__GlobalField; v__ast__IfBranch* _v__ast__IfBranch; v__ast__MatchBranch* _v__ast__MatchBranch; v__ast__NodeError* _v__ast__NodeError; v__ast__Param* _v__ast__Param; v__ast__ScopeObject* _v__ast__ScopeObject; v__ast__SelectBranch* _v__ast__SelectBranch; v__ast__Stmt* _v__ast__Stmt; v__ast__StructField* _v__ast__StructField; v__ast__StructInitField* _v__ast__StructInitField; }; int _typ; }; // Union sum type v__ast__ComptTimeConstValue = // | 279 = v__ast__EmptyExpr // | 15 = f32 // | 16 = f64 // | 6 = i16 // | 8 = i64 // | 5 = i8 // | 7 = int // | 21 = rune // | 20 = string // | 11 = u16 // | 12 = u32 // | 13 = u64 // | 10 = u8 // | 2 = voidptr struct v__ast__ComptTimeConstValue { union { v__ast__EmptyExpr* _v__ast__EmptyExpr; f32* _f32; f64* _f64; i16* _i16; i64* _i64; i8* _i8; int* _int; rune* _rune; string* _string; u16* _u16; u32* _u32; u64* _u64; u8* _u8; voidptr* _voidptr; }; int _typ; }; // Union sum type v__ast__IdentInfo = // | 397 = v__ast__IdentFn // | 398 = v__ast__IdentVar struct v__ast__IdentInfo { union { v__ast__IdentFn* _v__ast__IdentFn; v__ast__IdentVar* _v__ast__IdentVar; }; int _typ; }; // Union sum type v__ast__AsmArg = // | 418 = v__ast__AsmAddressing // | 419 = v__ast__AsmAlias // | 420 = v__ast__AsmDisp // | 342 = v__ast__AsmRegister // | 267 = v__ast__BoolLiteral // | 272 = v__ast__CharLiteral // | 281 = v__ast__FloatLiteral // | 288 = v__ast__IntegerLiteral // | 20 = string struct v__ast__AsmArg { union { v__ast__AsmAddressing* _v__ast__AsmAddressing; v__ast__AsmAlias* _v__ast__AsmAlias; v__ast__AsmDisp* _v__ast__AsmDisp; v__ast__AsmRegister* _v__ast__AsmRegister; v__ast__BoolLiteral* _v__ast__BoolLiteral; v__ast__CharLiteral* _v__ast__CharLiteral; v__ast__FloatLiteral* _v__ast__FloatLiteral; v__ast__IntegerLiteral* _v__ast__IntegerLiteral; string* _string; }; int _typ; }; // Union sum type v__ast__TypeInfo = // | 453 = v__ast__Aggregate // | 455 = v__ast__Alias // | 433 = v__ast__Array // | 464 = v__ast__ArrayFixed // | 465 = v__ast__Chan // | 470 = v__ast__Enum // | 468 = v__ast__FnType // | 469 = v__ast__GenericInst // | 458 = v__ast__Interface // | 434 = v__ast__Map // | 467 = v__ast__MultiReturn // | 437 = v__ast__Struct // | 460 = v__ast__SumType // | 466 = v__ast__Thread struct v__ast__TypeInfo { union { v__ast__Aggregate* _v__ast__Aggregate; v__ast__Alias* _v__ast__Alias; v__ast__Array* _v__ast__Array; v__ast__ArrayFixed* _v__ast__ArrayFixed; v__ast__Chan* _v__ast__Chan; v__ast__Enum* _v__ast__Enum; v__ast__FnType* _v__ast__FnType; v__ast__GenericInst* _v__ast__GenericInst; v__ast__Interface* _v__ast__Interface; v__ast__Map* _v__ast__Map; v__ast__MultiReturn* _v__ast__MultiReturn; v__ast__Struct* _v__ast__Struct; v__ast__SumType* _v__ast__SumType; v__ast__Thread* _v__ast__Thread; }; int _typ; }; struct v__checker__ACFieldMethod { string name; string typ; }; // Union sum type v__checker__ORMExpr = // | 308 = v__ast__SqlExpr // | 339 = v__ast__SqlStmt struct v__checker__ORMExpr { union { v__ast__SqlExpr* _v__ast__SqlExpr; v__ast__SqlStmt* _v__ast__SqlStmt; }; int _typ; v__token__Pos* pos; v__ast__Expr* db_expr; v__ast__OrExpr* or_expr; }; struct v__checker__LoHiLimit { string lower; string higher; }; struct v__parser__ParamsForUnexpected { string got; string expecting; string prepend_msg; string additional_msg; }; struct v__gen__c__UnsupportedAssertCtempTransform { Error Error; }; struct v__gen__c__ProfileCounterMeta { string fn_name; string vpc_name; string vpc_calls; }; struct sync__Subscription { sync__Semaphore* sem; sync__Subscription** prev; sync__Subscription* nxt; }; struct flag__UnknownFlagError { Error Error; string flag; }; struct semver__EmptyInputError { Error Error; }; struct semver__InvalidVersionFormatError { Error Error; string input; }; struct GCHeapUsage { usize heap_size; usize free_bytes; usize total_bytes; usize unmapped_bytes; usize bytes_since_gc; }; struct VCastTypeIndexName { int tindex; string tname; }; struct VAssertMetaInfo { string fpath; int line_nr; string fn_name; string src; string op; string llabel; string rlabel; string lvalue; string rvalue; string message; bool has_msg; }; struct MethodArgs { int typ; string name; }; struct FunctionData { string name; Array_string attrs; Array_MethodArgs args; int return_type; int typ; }; struct EnumData { string name; i64 value; Array_string attrs; }; struct FieldData { string name; int typ; int unaliased_typ; Array_string attrs; bool is_pub; bool is_mut; bool is_shared; bool is_atomic; bool is_option; bool is_array; bool is_map; bool is_chan; bool is_enum; bool is_struct; bool is_alias; u8 indirections; }; struct StructAttribute { string name; bool has_arg; string arg; AttributeKind kind; }; union strconv__Float64u { f64 f; u64 u; }; union strconv__Float32u { f32 f; u32 u; }; struct MessageError { string msg; int code; }; struct Option { u8 state; IError err; }; struct VMemoryBlock { int id; isize cap; u8* start; VMemoryBlock* previous; isize remaining; u8* current; int mallocs; }; struct SortedMap { int value_bytes; mapnode* root; int len; }; struct RepIndex { int idx; int val_idx; }; union StrIntpMem { u32 d_c; byte d_u8; i8 d_i8; u16 d_u16; i16 d_i16; u32 d_u32; int d_i32; u64 d_u64; i64 d_i64; f32 d_f32; f64 d_f64; string d_s; voidptr d_p; voidptr d_vp; }; struct strconv__BF_param { u8 pad_ch; int len0; int len1; bool positive; bool sign_flag; strconv__Align_text allign; bool rm_tail_zero; }; struct strconv__PrepNumber { bool negative; int exponent; u64 mantissa; }; struct strconv__Dec32 { u32 m; int e; }; union strconv__Uf32 { f32 f; u32 u; }; struct strconv__Dec64 { u64 m; int e; }; struct strconv__Uint128 { u64 lo; u64 hi; }; union strconv__Uf64 { f64 f; u64 u; }; struct os__NotExpected { string cause; int code; }; struct os__File { voidptr cfile; int fd; bool is_opened; }; struct os__FileInfo { string name; int size; }; struct os__FilePermission { bool read; bool write; bool execute; }; struct os__PathKind { bool is_dir; bool is_link; }; struct os__Result { int exit_code; string output; }; struct os__Command { voidptr f; bool eof; int exit_code; string path; bool redirect_stdout; }; struct os__MkdirParams { u32 mode; }; struct term__Coord { int x; int y; }; struct v__pref__LineInfo { int line_nr; string path; string expr; bool is_running; Map_string_bool vars_printed; }; struct v__vcache__CacheManager { string basepath; string original_vopts; string vopts; Map_string_string k2cpath; }; struct v__util__EManager { bool support_color; }; struct v__token__Pos { int len; int line_nr; int pos; int col; int last_line; }; struct v__util__LinesCache { Map_string_Array_string lines; }; struct v__util__Possibility { string value; string svalue; f32 similarity; }; struct v__util__Suggestion { Array_v__util__Possibility known; string wanted; string swanted; }; struct v__util__Surrounder { Array_string befores; Array_string afters; }; struct time__StopWatch { u64 elapsed; u64 start; u64 end; }; struct v__util__Timers { string label; Map_string_time__StopWatch swatches; bool should_print; Array_string already_shown; }; struct v__util__TimerParams { bool should_print; string label; }; struct v__util__SourceCache { Map_string_string sources; }; struct v__transformer__Transformer { v__pref__Preferences* pref; v__transformer__IndexState* index; v__ast__Table* table; v__ast__File* file; bool is_assert; bool inside_dump; }; struct v__builder__MsvcResult { string full_cl_exe_path; string exe_path; string um_lib_path; string ucrt_lib_path; string vs_lib_path; string um_include_path; string ucrt_include_path; string vs_include_path; string shared_include_path; bool valid; }; struct v__ast__Table { Map_string_int type_idxs; Map_string_v__ast__Fn fns; Map_string_Array_v__ast__Type iface_types; Map_int_string dumps; Map_string_Array_Array_v__ast__Type fn_generic_types; Map_int_v__ast__InterfaceDecl interfaces; Map_string_bool used_fns; Map_string_bool used_consts; Map_string_bool used_globals; Map_string_v__ast__EnumDecl enum_decls; Map_string_bool module_deprecated; Map_string_Array_v__ast__Attr module_attrs; Map_string_bool builtin_pub_fns; Map_u64_string cached_type_to_str; Map_string_int anon_struct_names; Array_v__ast__TypeSymbol_ptr type_symbols; Array_string imports; Array_string modules; Array_v__cflag__CFlag cflags; Array_string redefined_fns; Array_v__ast__Type used_vweb_types; Array_v__ast__Type cur_concrete_types; string parsing_type; string cmod_prefix; v__ast__Scope* global_scope; v__ast__FnPanicHandler panic_handler; voidptr panic_userdata; v__ast__FnDecl* cur_fn; int used_maps; int panic_npanics; int gostmts; int pointer_size; int anon_struct_counter; bool is_fmt : 1; }; struct v__builder__CcompilerOptions { string guessed_compiler; string shared_postfix; bool debug_mode; bool is_cc_tcc; bool is_cc_gcc; bool is_cc_icc; bool is_cc_msvc; bool is_cc_clang; string env_cflags; string env_ldflags; Array_string args; Array_string wargs; Array_string pre_args; Array_string o_args; Array_string source_args; Array_string post_args; Array_string linker_flags; Array_string ldflags; }; struct v__depgraph__DepGraph { bool acyclic; Array_v__depgraph__DepGraphNode nodes; Map_string_i64 values; }; struct v__builder__MsvcStringFlags { Array_string real_libs; Array_string inc_paths; Array_string lib_paths; Array_string defines; Array_string other_flags; }; struct strings__textscanner__TextScanner { string input; int ilen; int pos; }; typedef term__termios__Cc Array_fixed_term__termios__Cc_32 [32]; struct rand__config__NormalConfigStruct { f64 mu; f64 sigma; }; struct rand__config__ShuffleConfigStruct { int start; int end; }; struct rand__config__PRNGConfigStruct { Array_u32 seed_; }; struct v__token__TrieNode { Array_fixed_v__token__TrieNode_ptr1_123 children; int value; }; struct v__token__KeywordsMatcherTrie { Array_v__token__TrieNode_ptr nodes; int min_len; int max_len; }; struct v__token__Token { string lit; int line_nr; int col; int pos; int len; int tidx; v__token__Kind kind : 7; }; struct time__Time { int year; int month; int day; int hour; int minute; int second; int nanosecond; i64 _v_unix; bool is_local; int microsecond; }; struct time__DateTimeParser { string datetime; string format; int current_pos_datetime; }; struct time__TimeParseError { Error Error; int code; string message; }; struct time__StopWatchOptions { bool auto_start; }; struct v__vmod__Manifest { string name; string version; string description; Array_string dependencies; string license; string repo_url; string author; Map_string_Array_string unknown; }; struct v__vmod__Token { v__vmod__TokenKind typ; string val; int line; }; struct v__vmod__Scanner { int pos; int line; string text; bool inside_text; Array_v__vmod__Token tokens; }; struct v__vmod__ModFileCacher { Map_string_v__vmod__ModFileAndFolder cache; Map_string_Array_string folder_files; }; struct v__ast__CTempVar { string name; v__ast__Type typ; bool is_ptr; v__ast__Expr orig; }; struct v__ast__IfGuardExpr { Array_v__ast__IfGuardVar vars; v__ast__Expr expr; v__ast__Type expr_type; }; struct v__ast__AsmRegister { string name; v__ast__Type typ; int size; }; struct v__ast__Scope { Map_string_v__ast__ScopeObject objects; Map_string_v__ast__ScopeStructField struct_fields; v__ast__Scope* parent; bool detached_from_parent; Array_v__ast__Scope_ptr children; int start_pos; int end_pos; }; struct v__ast__EmbeddedFile { Array_u8 bytes; string compression_type; string rpath; string apath; int len; bool is_compressed : 1; }; struct v__ast__IdentFn { v__ast__Type typ; }; struct v__ast__IdentVar { v__ast__Type typ; v__ast__ShareType share : 2; bool is_mut : 1; bool is_static : 1; bool is_volatile : 1; bool is_option : 1; }; struct v__ast__Array { int nr_dims; v__ast__Type elem_type; }; struct v__ast__Map { v__ast__Type key_type; v__ast__Type value_type; }; struct v__ast__Struct { Array_v__ast__Attr attrs; Array_v__ast__Type embeds; Array_v__ast__StructField fields; Array_v__ast__Type generic_types; Array_v__ast__Type concrete_types; v__ast__Type parent_type; bool is_typedef : 1; bool is_union : 1; bool is_heap : 1; bool is_minify : 1; bool is_anon : 1; bool is_generic : 1; }; struct v__ast__StringifyModReplacement { string mod; string alias; int weight; }; struct v__ast__TypeSymbol { Array_v__ast__Fn methods; Array_v__ast__Type generic_types; v__ast__TypeInfo info; string name; string cname; string rname; string mod; int parent_idx; int idx; int size; int align; v__ast__Kind kind : 6; v__ast__Language language : 4; bool is_pub : 1; }; struct v__ast__Aggregate { Array_v__ast__StructField fields; v__ast__Type sum_type; Array_v__ast__Type types; }; struct v__ast__GetEmbedsOptions { Array_v__ast__Type preceding; }; struct v__ast__Alias { v__ast__Type parent_type; v__ast__Language language : 4; bool is_import : 1; }; struct v__ast__Interface { Map_int_Array_v__ast__Type conversions; Array_v__ast__Type types; Array_v__ast__StructField fields; Array_v__ast__Fn methods; Array_v__ast__Type embeds; Array_v__ast__Type generic_types; Array_v__ast__Type concrete_types; v__ast__Type parent_type; bool is_generic : 1; }; struct v__ast__SumType { Array_v__ast__StructField fields; Array_v__ast__Type variants; Array_v__ast__Type generic_types; Array_v__ast__Type concrete_types; v__ast__Type parent_type; bool found_fields : 1; bool is_anon : 1; bool is_generic : 1; }; struct v__ast__ArrayFixed { v__ast__Expr size_expr; int size; v__ast__Type elem_type; bool is_fn_ret : 1; }; struct v__ast__Chan { v__ast__Type elem_type; bool is_mut; }; struct v__ast__Thread { v__ast__Type return_type; }; struct v__ast__MultiReturn { Array_v__ast__Type types; }; struct v__ast__GenericInst { int parent_idx; Array_v__ast__Type concrete_types; }; struct v__ast__Enum { Array_string vals; bool is_flag; bool is_multi_allowed; bool uses_exprs; v__ast__Type typ; Map_string_Array_v__ast__Attr attrs; }; struct v__ast__FnSignatureOpts { bool skip_receiver : 1; bool type_only : 1; }; struct v__transformer__KeyVal { string key; int value; }; struct v__transformer__IndexState { Map_string_int max_index; Array_bool saved_disabled; Array_Array_v__transformer__KeyVal saved_key_vals; bool disabled; int level; }; struct v__scanner__Scanner { Array_v__token__Token all_tokens; Array_string error_details; Array_v__errors__Error errors; Array_v__errors__Warning warnings; Array_v__errors__Notice notices; Array_v__vet__Error vet_errors; string file_path; string file_base; string text; string line_comment; v__pref__Preferences* pref; int pos; int line_nr; int last_nl_pos; int last_lt; int nr_lines; int tidx; int eofs; int inter_cbr_count; u8 quote; u8 inter_quote; v__scanner__CommentsMode comments_mode : 2; bool is_crlf : 1; bool is_inside_string : 1; bool is_nested_string : 1; bool is_inter_start : 1; bool is_inter_end : 1; bool is_enclosed_inter : 1; bool is_nested_enclosed_inter : 1; bool is_started : 1; bool is_print_line_on_error : 1; bool is_print_colored_error : 1; bool is_print_rel_paths_on_error : 1; bool just_closed_inter : 1; bool is_vh : 1; bool is_fmt : 1; bool is_inside_toplvl_statement : 1; bool should_abort : 1; }; struct v__parser__EatCommentsConfig { bool same_line; bool follow_up; }; struct v__parser__ParserShowParams { string msg; int reach; }; struct v__markused__Walker { v__ast__Table* table; Map_string_bool used_fns; Map_string_bool used_consts; Map_string_bool used_globals; Map_string_bool used_structs; int n_asserts; v__pref__Preferences* pref; Array_v__ast__File_ptr files; Map_string_v__ast__FnDecl all_fns; Map_string_v__ast__ConstField all_consts; Map_string_v__ast__GlobalField all_globals; }; struct v__depgraph__DepGraphNode { string name; i64 value; Array_string deps; }; struct v__depgraph__OrderedDepMap { Array_string keys; Map_string_Array_string data; }; struct v__depgraph__NodeNames { Map_string_bool is_cycle; Map_string_Array_string names; }; struct v__dotgraph__DotGraph { strings__Builder sb; }; struct v__dotgraph__NewNodeConfig { string node_name; bool should_highlight; string tooltip; voidptr ctx; v__dotgraph__FnLabel2NodeName name2node_fn; }; struct v__dotgraph__NewEdgeConfig { bool should_highlight; voidptr ctx; v__dotgraph__FnLabel2NodeName name2node_fn; }; struct v__gen__c__Type { v__ast__Type typ; v__ast__TypeSymbol* sym; v__ast__Type unaliased; v__ast__TypeSymbol* unaliased_sym; }; struct v__gen__c__StrType { string styp; v__ast__Type typ; }; struct v__gen__c__GlobalConstDef { string mod; string def; string init; Array_string dep_names; int order; bool is_precomputed; }; struct v__gen__c__SumtypeCastingFn { string fn_name; v__ast__Type got; v__ast__Type exp; }; struct v__gen__c__GenSafeIntegerCfg { v__token__Kind op; bool reverse; v__ast__Type unsigned_type; v__ast__Expr unsigned_expr; v__ast__Type signed_type; v__ast__Expr signed_expr; }; struct v__gen__c__PastTmpVar { string var_name; string tmp_var; string s; bool s_ends_with_ln; }; struct sync__Semaphore { sem_t sem; }; struct sync__Mutex { pthread_mutex_t mutex; }; struct sync__RwMutex { pthread_rwlock_t mutex; }; struct sync__RwMutexAttr { pthread_rwlockattr_t attr; }; struct sync__pool__PoolProcessorConfig { int maxjobs; sync__pool__ThreadCB callback; }; struct rand__buffer__PRNGBuffer { int bytes_left; u64 buffer; }; struct v__pkgconfig__MainOptions { bool modversion; bool description; bool help; bool debug; bool listall; bool exists; bool variables; bool _v_requires; string atleast; string atleastpc; string exactversion; bool version; bool cflags; bool cflags_only_path; bool cflags_only_other; bool stat1c; bool libs; bool libs_only_link; bool libs_only_path; bool libs_only_other; Array_string args; }; struct v__pkgconfig__Main { v__pkgconfig__MainOptions* opt; string res; bool has_actions; }; struct v__pkgconfig__Options { string path; bool debug; bool norecurse; bool only_description; bool use_default_paths; }; struct flag__FlagParser { Array_string original_args; int idx_dashdash; Array_string all_after_dashdash; Array_string usage_examples; string default_help_label; string default_version_label; Array_string args; int max_free_args; Array_flag__Flag flags; string application_name; string application_version; string application_description; int min_free_args; string args_description; bool allow_unknown_args; Array_string footers; }; struct v__ast__walker__Inspector { v__ast__walker__InspectorFn inspector_callback; voidptr data; }; struct flag__Flag { string name; u8 abbr; string usage; string val_desc; }; struct flag__ArgsCountError { Error Error; int got; int want; }; struct semver__Version { int major; int minor; int patch; string prerelease; string metadata; }; struct semver__RawVersion { string prerelease; string metadata; Array_string raw_ints; }; struct semver__ComparatorSet { Array_semver__Comparator comparators; }; struct semver__Range { Array_semver__ComparatorSet comparator_sets; }; struct mapnode { voidptr* children; int len; Array_fixed_string_11 keys; Array_fixed_voidptr_11 values; }; struct StrIntpData { string str; u32 fmt; StrIntpMem d; }; struct v__pref__Preferences { v__pref__LineInfo linfo; v__vcache__CacheManager cache_manager; Array_string profile_fns; Array_string lookup_path; Array_string vmodules_paths; Array_string run_only; Array_string exclude; Array_string compile_defines; Array_string compile_defines_all; Array_string run_args; Array_string printfn_list; Array_string cleanup_files; Array_string build_options; string raw_vsh_tmp_prefix; string eval_argument; string test_runner; string profile_file; string dump_c_flags; string dump_modules; string dump_files; string cflags; string ldflags; string ccompiler; string cppcompiler; string third_party_option; string bare_builtin_dir; string custom_prelude; string cmain; string vroot; string vlib; string out_name_c; string out_name; string path; string line_info; int message_limit; int checker_match_exhaustive_cutoff_limit; int thread_stack_size; int wasm_stack_top; v__pref__OS os : 5; v__pref__Arch arch : 4; v__pref__Backend backend : 4; v__pref__GarbageCollectionMode gc_mode : 3; v__pref__CompilerType ccompiler_type : 3; v__pref__AssertFailureMode assert_failure_mode : 3; v__pref__ColorOutput use_color : 2; v__pref__BuildMode build_mode : 2; v__pref__OutputMode output_mode : 2; bool is_verbose : 1; bool is_glibc : 1; bool is_musl : 1; bool is_test : 1; bool is_script : 1; bool is_vsh : 1; bool is_livemain : 1; bool is_liveshared : 1; bool is_shared : 1; bool is_o : 1; bool is_prof : 1; bool is_prod : 1; bool is_repl : 1; bool is_eval_argument : 1; bool is_run : 1; bool is_crun : 1; bool is_debug : 1; bool is_vlines : 1; bool is_stats : 1; bool show_timings : 1; bool is_fmt : 1; bool is_vet : 1; bool is_vweb : 1; bool is_ios_simulator : 1; bool is_apk : 1; bool is_help : 1; bool is_cstrict : 1; bool profile_no_inline : 1; bool translated : 1; bool obfuscate : 1; bool sanitize : 1; bool sourcemap : 1; bool sourcemap_inline : 1; bool sourcemap_src_included : 1; bool show_cc : 1; bool show_c_output : 1; bool show_callgraph : 1; bool show_depgraph : 1; bool use_cache : 1; bool retry_compilation : 1; bool use_os_system_to_run : 1; bool m64 : 1; bool building_v : 1; bool no_bounds_checking : 1; bool autofree : 1; bool trace_calls : 1; bool compress : 1; bool no_builtin : 1; bool enable_globals : 1; bool is_bare : 1; bool no_preludes : 1; bool output_cross_c : 1; bool output_es5 : 1; bool prealloc : 1; bool print_v_files : 1; bool print_watched_files : 1; bool skip_running : 1; bool skip_warnings : 1; bool warn_impure_v : 1; bool warns_are_errors : 1; bool notes_are_errors : 1; bool fatal_errors : 1; bool reuse_tmpc : 1; bool no_rsp : 1; bool no_std : 1; bool no_parallel : 1; bool parallel_cc : 1; bool only_check_syntax : 1; bool check_only : 1; bool experimental : 1; bool skip_unused : 1; bool nofloat : 1; bool use_coroutines : 1; bool fast_math : 1; bool wasm_validate : 1; }; struct os__FileMode { os__FileType typ; os__FilePermission owner; os__FilePermission group; os__FilePermission others; }; struct term__termios__Termios { term__termios__TcFlag c_iflag; term__termios__TcFlag c_oflag; term__termios__TcFlag c_cflag; term__termios__TcFlag c_lflag; term__termios__Cc c_line; Array_fixed_term__termios__Cc_32 c_cc; term__termios__Speed c_ispeed; term__termios__Speed c_ospeed; }; struct os__Process { string filename; int pid; int code; os__ProcessState status; string err; Array_string args; string work_folder; bool env_is_custom; Array_string env; bool use_stdio_ctl; bool use_pgroup; Array_fixed_int_3 stdio_fd; voidptr wdata; bool create_no_window; }; struct v__errors__CompilerMessage { string message; string details; string file_path; v__token__Pos pos; v__errors__Reporter reporter; }; struct v__builder__Builder { string compiled_dir; string module_path; v__checker__Checker* checker; v__transformer__Transformer* transformer; string out_name_c; string out_name_js; int stats_lines; int stats_bytes; int nr_errors; int nr_warnings; int nr_notices; v__pref__Preferences* pref; Array_string module_search_paths; Array_v__ast__File_ptr parsed_files; v__builder__MsvcResult cached_msvc; v__ast__Table* table; v__builder__CcompilerOptions ccoptions; Map_string_Array_string mod_invalidates_paths; Map_string_Array_string mod_invalidates_mods; Map_string_Array_string path_invalidates_mods; Array_string crun_cache_keys; bool executable_exists; }; struct rand__wyrand__WyRandRNG { rand__buffer__PRNGBuffer PRNGBuffer; u64 state; int bytes_left; u64 buffer; }; struct v__vmod__Parser { string file_path; v__vmod__Scanner scanner; }; struct v__ast__AliasTypeDecl { string name; bool is_pub; v__ast__Type typ; v__ast__Type parent_type; v__token__Pos pos; v__token__Pos type_pos; Array_v__ast__Comment comments; }; struct v__ast__FnTypeDecl { string name; bool is_pub; v__ast__Type typ; v__token__Pos pos; v__token__Pos type_pos; Array_v__ast__Comment comments; Array_v__ast__Type generic_types; Array_v__ast__Attr attrs; }; struct v__ast__SumTypeDecl { string name; bool is_pub; v__token__Pos pos; v__token__Pos name_pos; v__ast__Type typ; Array_v__ast__Type generic_types; Array_v__ast__Attr attrs; Array_v__ast__TypeNode variants; }; struct v__ast__ArrayDecompose { v__token__Pos pos; v__ast__Expr expr; v__ast__Type expr_type; v__ast__Type arg_type; }; struct v__ast__ArrayInit { Array_Array_v__ast__Comment ecmnts; Array_v__ast__Comment pre_cmnts; Array_v__ast__Expr exprs; Array_v__ast__Type expr_types; string mod; v__ast__Expr len_expr; v__ast__Expr cap_expr; v__ast__Expr default_expr; v__token__Pos pos; v__token__Pos elem_type_pos; v__ast__Type elem_type; v__ast__Type default_type; v__ast__Type typ; bool is_fixed : 1; bool has_val : 1; bool has_len : 1; bool has_cap : 1; bool has_default : 1; bool has_index : 1; }; struct v__ast__AsCast { v__ast__Type typ; v__token__Pos pos; v__ast__Expr expr; v__ast__Type expr_type; }; struct v__ast__Assoc { Array_string fields; Array_v__ast__Expr exprs; string var_name; v__ast__Scope* scope; v__token__Pos pos; v__ast__Type typ; }; struct v__ast__AtExpr { string name; v__token__Pos pos; v__token__AtKind kind; string val; }; struct v__ast__BoolLiteral { bool val; v__token__Pos pos; }; struct v__ast__CastExpr { v__ast__Expr arg; v__ast__Expr expr; string typname; v__token__Pos pos; v__ast__Type typ; v__ast__Type expr_type; bool has_arg : 1; }; struct v__ast__ChanInit { v__token__Pos pos; v__token__Pos elem_type_pos; bool has_cap; v__ast__Expr cap_expr; v__ast__Type typ; v__ast__Type elem_type; }; struct v__ast__CharLiteral { string val; v__token__Pos pos; }; struct v__ast__Comment { string text; bool is_multi; v__token__Pos pos; }; struct v__ast__ComptimeSelector { v__ast__Expr left; v__ast__Expr field_expr; v__token__Pos pos; v__ast__Type left_type; v__ast__Type typ; bool has_parens : 1; }; struct v__ast__ComptimeType { v__ast__ComptimeTypeKind kind; v__token__Pos pos; }; struct v__ast__ConcatExpr { Array_v__ast__Expr vals; v__token__Pos pos; v__ast__Type return_type; }; struct v__ast__DumpExpr { v__ast__Expr expr; string cname; v__token__Pos pos; v__ast__Type expr_type; }; struct v__ast__EnumVal { string enum_name; string val; string mod; v__token__Pos pos; v__ast__Type typ; }; struct v__ast__FloatLiteral { string val; v__token__Pos pos; }; struct v__ast__IfExpr { Array_v__ast__Comment post_comments; Array_v__ast__IfBranch branches; v__ast__Expr left; v__token__Pos pos; v__ast__Type typ; v__token__Kind tok_kind : 7; bool is_comptime : 1; bool is_expr : 1; bool has_else : 1; }; struct v__ast__IntegerLiteral { string val; v__token__Pos pos; }; struct v__ast__IsRefType { bool guessed_type; bool is_type; v__token__Pos pos; v__ast__Expr expr; v__ast__Type typ; }; struct v__ast__LambdaExpr { v__token__Pos pos; Array_v__ast__Ident params; v__token__Pos pos_expr; v__ast__Expr expr; v__token__Pos pos_end; v__ast__Scope* scope; v__ast__AnonFn* func; bool is_checked; v__ast__Type typ; }; struct v__ast__Likely { v__token__Pos pos; bool is_likely; v__ast__Expr expr; }; struct v__ast__LockExpr { Array_bool is_rlock; v__token__Pos pos; Array_v__ast__Stmt stmts; Array_v__ast__Expr lockeds; Array_v__ast__Comment comments; bool is_expr; v__ast__Type typ; v__ast__Scope* scope; }; struct v__ast__MapInit { Array_Array_v__ast__Comment comments; Array_v__ast__Comment pre_cmnts; Array_v__ast__Expr keys; Array_v__ast__Expr vals; Array_v__ast__Type val_types; v__token__Pos pos; v__ast__Type typ; v__ast__Type key_type; v__ast__Type value_type; }; struct v__ast__MatchExpr { Array_v__ast__Comment comments; Array_v__ast__MatchBranch branches; v__ast__Expr cond; v__token__Pos pos; v__ast__Type return_type; v__ast__Type cond_type; v__ast__Type expected_type; v__token__Kind tok_kind : 7; bool is_expr : 1; bool is_sum_type : 1; }; struct v__ast__Nil { v__token__Pos pos; }; struct v__ast__NodeError { int idx; v__token__Pos pos; }; struct v__ast__None { v__token__Pos pos; }; struct v__ast__OffsetOf { string field; v__token__Pos pos; v__ast__Type struct_type; }; struct v__ast__OrExpr { v__ast__OrKind kind; v__token__Pos pos; Array_v__ast__Stmt stmts; }; struct v__ast__ParExpr { v__token__Pos pos; v__ast__Expr expr; Array_v__ast__Comment comments; }; struct v__ast__PostfixExpr { v__token__Kind op; v__token__Pos pos; bool is_c2v_prefix; v__ast__Expr expr; v__ast__Type typ; string auto_locked; }; struct v__ast__RangeExpr { v__ast__Expr low; v__ast__Expr high; v__token__Pos pos; v__ast__Type typ; bool has_high : 1; bool has_low : 1; bool is_gated : 1; }; struct v__ast__SelectExpr { Array_v__ast__SelectBranch branches; v__token__Pos pos; bool has_exception; bool is_expr; v__ast__Type expected_type; }; struct v__ast__SizeOf { bool guessed_type; bool is_type; v__token__Pos pos; v__ast__Expr expr; v__ast__Type typ; }; struct v__ast__StringInterLiteral { Array_string vals; Array_int fwidths; Array_int precisions; Array_bool pluss; Array_bool fills; Array_v__token__Pos fmt_poss; v__token__Pos pos; Array_v__ast__Expr exprs; Array_v__ast__Type expr_types; Array_u8 fmts; Array_bool need_fmts; }; struct v__ast__StringLiteral { string val; v__token__Pos pos; v__ast__Language language : 4; bool is_raw : 1; }; struct v__ast__StructInit { Array_v__ast__Comment pre_comments; Array_v__ast__Comment update_expr_comments; Array_v__ast__StructInitField init_fields; Array_v__ast__Type generic_types; string typ_str; v__ast__Expr update_expr; v__token__Pos pos; v__token__Pos name_pos; v__token__Pos update_expr_pos; v__ast__Type typ; v__ast__Type update_expr_type; bool no_keys : 1; bool is_short_syntax : 1; bool is_anon : 1; bool unresolved : 1; bool is_update_embed : 1; bool has_update_expr : 1; }; struct v__ast__TypeNode { v__token__Pos pos; v__ast__Type typ; Array_v__ast__Comment end_comments; }; struct v__ast__TypeOf { v__ast__Expr expr; v__token__Pos pos; v__ast__Type typ; bool is_type : 1; }; struct v__ast__UnsafeExpr { v__token__Pos pos; v__ast__Expr expr; }; struct v__ast__AsmStmt { Array_v__ast__AsmClobbered clobbered; Array_v__ast__AsmTemplate templates; Array_v__ast__AsmIO output; Array_v__ast__AsmIO input; Array_string global_labels; Array_string local_labels; v__ast__Scope* scope; v__token__Pos pos; v__pref__Arch arch : 4; bool is_basic : 1; bool is_volatile : 1; bool is_goto : 1; }; struct v__ast__AssertStmt { v__ast__Expr expr; v__ast__Expr extra; v__token__Pos pos; v__token__Pos extra_pos; bool is_used : 1; }; struct v__ast__AssignStmt { Array_v__ast__Comment comments; Array_v__ast__Comment end_comments; Array_v__ast__Expr right; Array_v__ast__Expr left; Array_v__ast__Type left_types; Array_v__ast__Type right_types; v__token__Pos pos; v__token__Kind op : 7; bool is_static : 1; bool is_volatile : 1; bool is_simple : 1; bool has_cross_var : 1; }; struct v__ast__Block { bool is_unsafe; v__token__Pos pos; Array_v__ast__Stmt stmts; }; struct v__ast__BranchStmt { string label; v__token__Pos pos; v__token__Kind kind : 7; }; struct v__ast__ComptimeFor { string val_var; v__ast__ComptimeForKind kind; v__token__Pos pos; v__token__Pos typ_pos; Array_v__ast__Stmt stmts; v__ast__Type typ; }; struct v__ast__ConstDecl { Array_v__ast__Attr attrs; Array_v__ast__ConstField fields; Array_v__ast__Comment end_comments; v__token__Pos pos; bool is_pub : 1; bool is_block : 1; }; struct v__ast__DeferStmt { Array_v__ast__Stmt stmts; Array_v__ast__Ident defer_vars; string ifdef; v__token__Pos pos; int idx_in_fn; }; struct v__ast__EmptyStmt { v__token__Pos pos; }; struct v__ast__EnumDecl { Array_v__ast__Comment comments; Array_v__ast__EnumField fields; Array_v__ast__Attr attrs; string name; v__token__Pos typ_pos; v__token__Pos pos; v__ast__Type typ; bool is_pub : 1; bool is_flag : 1; bool is_multi_allowed : 1; }; struct v__ast__ExprStmt { v__token__Pos pos; Array_v__ast__Comment comments; v__ast__Expr expr; bool is_expr; v__ast__Type typ; }; struct v__ast__ForCStmt { bool has_init; bool has_cond; bool has_inc; bool is_multi; v__token__Pos pos; Array_v__ast__Comment comments; v__ast__Stmt init; v__ast__Expr cond; v__ast__Stmt inc; Array_v__ast__Stmt stmts; string label; v__ast__Scope* scope; }; struct v__ast__ForInStmt { Array_v__ast__Comment comments; Array_v__ast__Stmt stmts; string key_var; string val_var; v__ast__Expr cond; v__ast__Expr high; string label; v__ast__Scope* scope; v__token__Pos pos; v__token__Pos kv_pos; v__ast__Type key_type; v__ast__Type val_type; v__ast__Type cond_type; v__ast__Type high_type; v__ast__Kind kind : 6; bool is_range : 1; bool val_is_mut : 1; bool val_is_ref : 1; }; struct v__ast__ForStmt { bool is_inf; v__token__Pos pos; Array_v__ast__Comment comments; v__ast__Expr cond; Array_v__ast__Stmt stmts; string label; v__ast__Scope* scope; }; struct v__ast__GlobalDecl { string mod; v__token__Pos pos; bool is_block; Array_v__ast__Attr attrs; Array_v__ast__GlobalField fields; Array_v__ast__Comment end_comments; }; struct v__ast__GotoLabel { string name; v__token__Pos pos; bool is_used; }; struct v__ast__GotoStmt { string name; v__token__Pos pos; }; struct v__ast__HashStmt { string mod; v__token__Pos pos; string source_file; string val; string kind; string main; string msg; Array_v__ast__Expr ct_conds; }; struct v__ast__Import { string mod; string alias; v__token__Pos pos; v__token__Pos mod_pos; v__token__Pos alias_pos; v__token__Pos syms_pos; Array_v__ast__ImportSymbol syms; Array_v__ast__Comment comments; Array_v__ast__Comment next_comments; }; struct v__ast__InterfaceDecl { Array_string field_names; Array_v__ast__Comment pre_comments; Array_v__ast__Type generic_types; Array_v__ast__Attr attrs; Array_v__ast__FnDecl methods; Array_v__ast__StructField fields; Array_v__ast__InterfaceEmbedding embeds; string name; v__token__Pos name_pos; v__token__Pos pos; v__ast__Type typ; int mut_pos; v__ast__Language language : 4; bool is_pub : 1; bool are_embeds_expanded : 1; }; struct v__ast__Module { string name; string short_name; Array_v__ast__Attr attrs; v__token__Pos pos; v__token__Pos name_pos; bool is_skipped; }; struct v__ast__Return { v__token__Pos pos; Array_v__ast__Comment comments; Array_v__ast__Expr exprs; Array_v__ast__Type types; }; struct v__ast__SemicolonStmt { v__token__Pos pos; }; struct v__ast__StructDecl { Array_v__ast__Type generic_types; Array_v__ast__Attr attrs; Array_v__ast__Comment pre_comments; Array_v__ast__Comment end_comments; Array_v__ast__Embed embeds; Array_v__ast__StructField fields; string name; v__token__Pos pos; int mut_pos; int pub_pos; int pub_mut_pos; int global_pos; int module_pos; v__ast__Language language : 4; bool is_pub : 1; bool is_union : 1; }; struct v__ast__ConstField { string mod; string name; bool is_pub; bool is_markused; v__token__Pos pos; v__ast__Expr expr; v__ast__Type typ; Array_v__ast__Comment comments; Array_v__ast__Comment end_comments; v__ast__ComptTimeConstValue comptime_expr_value; }; struct v__ast__GlobalField { Array_v__ast__Comment comments; string name; v__ast__Expr expr; v__token__Pos pos; v__token__Pos typ_pos; v__ast__Type typ; bool has_expr : 1; bool is_markused : 1; bool is_volatile : 1; }; struct v__ast__Var { Array_v__ast__Type smartcasts; string name; v__ast__Expr expr; v__token__Pos pos; v__ast__Type typ; v__ast__Type orig_type; v__ast__ComptimeVarKind ct_type_var : 3; v__ast__ShareType share : 2; bool is_mut : 1; bool is_autofree_tmp : 1; bool is_inherited : 1; bool has_inherited : 1; bool is_arg : 1; bool is_auto_deref : 1; bool is_used : 1; bool is_changed : 1; bool is_or : 1; bool is_tmp : 1; bool is_auto_heap : 1; bool is_stack_obj : 1; }; struct v__ast__CallArg { Array_v__ast__Comment comments; v__ast__Expr expr; v__token__Pos pos; v__ast__Type typ; v__ast__ShareType share : 2; bool is_mut : 1; bool is_tmp_autofree : 1; }; struct v__ast__EmptyNode { v__token__Pos pos; }; struct v__ast__EnumField { string name; v__token__Pos pos; Array_v__ast__Comment comments; Array_v__ast__Comment next_comments; bool has_expr; Array_v__ast__Attr attrs; v__ast__Expr expr; }; struct v__ast__IfBranch { v__token__Pos pos; v__token__Pos body_pos; Array_v__ast__Comment comments; v__ast__Expr cond; bool pkg_exist; Array_v__ast__Stmt stmts; v__ast__Scope* scope; }; struct v__ast__MatchBranch { Array_Array_v__ast__Comment ecmnts; v__token__Pos pos; bool is_else; Array_v__ast__Comment post_comments; v__token__Pos branch_pos; Array_v__ast__Stmt stmts; Array_v__ast__Expr exprs; v__ast__Scope* scope; }; struct v__ast__Param { Array_v__ast__Comment comments; string name; v__token__Pos pos; v__token__Pos type_pos; v__ast__Type typ; bool is_mut : 1; bool is_shared : 1; bool is_atomic : 1; bool is_auto_rec : 1; bool is_hidden : 1; }; struct v__ast__StructInitField { v__token__Pos pos; v__token__Pos name_pos; Array_v__ast__Comment comments; Array_v__ast__Comment next_comments; v__ast__Expr expr; string name; v__ast__Type typ; v__ast__Type expected_type; v__ast__Type parent_type; }; struct v__ast__Attr { string name; string arg; v__ast__Expr ct_expr; v__token__Pos pos; v__ast__AttrKind kind : 3; bool has_arg : 1; bool ct_opt : 1; bool has_at : 1; bool ct_evaled : 1; bool ct_skip : 1; }; struct v__ast__Embed { v__ast__Type typ; v__token__Pos pos; Array_v__ast__Comment comments; }; struct v__ast__InterfaceEmbedding { string name; v__ast__Type typ; v__token__Pos pos; Array_v__ast__Comment comments; }; struct v__ast__ImportSymbol { v__token__Pos pos; string name; }; struct v__ast__Fn { Array_v__ast__Param params; Array_string generic_names; Array_string dep_names; Array_v__ast__Attr attrs; string mod; string file; string name; voidptr source_fn; v__token__Pos pos; v__token__Pos return_type_pos; v__ast__Type return_type; v__ast__Type receiver_type; int usages; int ctdefine_idx; v__ast__Language language : 4; v__ast__Language file_mode : 4; bool is_variadic : 1; bool is_pub : 1; bool is_ctor_new : 1; bool is_deprecated : 1; bool is_noreturn : 1; bool is_unsafe : 1; bool is_placeholder : 1; bool is_main : 1; bool is_test : 1; bool is_keep_alive : 1; bool is_method : 1; bool is_static_type_method : 1; bool no_body : 1; bool is_file_translated : 1; bool is_conditional : 1; }; struct v__ast__ScopeStructField { Array_v__ast__Type smartcasts; string name; v__token__Pos pos; v__ast__Type struct_type; v__ast__Type typ; v__ast__Type orig_type; }; struct v__ast__AsmClobbered { v__ast__AsmRegister reg; Array_v__ast__Comment comments; }; struct v__ast__AsmTemplate { Array_v__ast__AsmArg args; Array_v__ast__Comment comments; string name; v__token__Pos pos; bool is_label : 1; bool is_directive : 1; }; struct v__ast__AsmIO { string alias; string constraint; Array_v__ast__Comment comments; v__ast__Type typ; v__token__Pos pos; v__ast__Expr expr; }; struct v__ast__AsmAddressing { int scale; v__ast__AddressingMode mode; v__token__Pos pos; string segment; v__ast__AsmArg displacement; v__ast__AsmArg base; v__ast__AsmArg index; }; struct v__ast__AsmAlias { v__token__Pos pos; string name; }; struct v__ast__AsmDisp { string val; v__token__Pos pos; }; struct v__ast__IfGuardVar { string name; bool is_mut; v__token__Pos pos; }; struct v__parser__ReceiverParsingInfo { string name; v__token__Pos pos; v__ast__Type typ; v__token__Pos type_pos; bool is_mut; v__ast__Language language; }; struct v__vet__Error { string message; string details; string file_path; v__token__Pos pos; v__vet__ErrorKind kind : 2; v__vet__FixKind fix : 2; v__vet__ErrorType typ : 2; }; struct v__callgraph__Mapper { int pos; v__pref__Preferences* pref; v__ast__Table* table; v__ast__File* file; v__ast__Node* node; v__ast__FnDecl* fn_decl; string caller_name; string dot_caller_name; bool is_caller_used; v__dotgraph__DotGraph dg; }; struct sync__Channel { u8* ringbuf; u8* statusbuf; u32 objsize; sync__Semaphore writesem; sync__Semaphore readsem; sync__Semaphore writesem_im; sync__Semaphore readsem_im; atomic_uintptr_t write_adr; atomic_uintptr_t read_adr; atomic_uintptr_t adr_read; atomic_uintptr_t adr_written; u32 write_free; u32 read_avail; u32 buf_elem_write_idx; u32 buf_elem_read_idx; sync__Subscription* write_subscriber; sync__Subscription* read_subscriber; u16 write_sub_mtx; u16 read_sub_mtx; u16 closed; u32 cap; }; struct sync__ManyTimes { sync__RwMutex m; u64 times; u64 count; }; struct sync__Once { sync__RwMutex m; u64 count; }; struct sync__WaitGroup { u32 task_count; u32 wait_count; sync__Semaphore sem; }; struct v__pkgconfig__PkgConfig { v__pkgconfig__Options options; string name; string modname; string url; string version; string description; Array_string libs; Array_string libs_private; Array_string cflags; Array_string paths; Map_string_string vars; Array_string _v_requires; Array_string requires_private; Array_string conflicts; Array_string loaded; }; struct semver__Comparator { semver__Version ver; semver__Operator op; }; struct semver__InvalidComparatorFormatError { MessageError MessageError; }; struct v__ast__File { int nr_lines; int nr_bytes; v__ast__Module mod; v__ast__Scope* global_scope; bool is_test; bool is_generated; bool is_translated; int idx; string path; string path_base; v__ast__Scope* scope; Array_v__ast__Stmt stmts; Array_v__ast__Import imports; Array_string auto_imports; Array_v__ast__EmbeddedFile embedded_files; Map_string_string imported_symbols; Array_v__errors__Error errors; Array_v__errors__Warning warnings; Array_v__errors__Notice notices; Array_v__ast__FnDecl_ptr generic_fns; Array_string global_labels; Array_string template_paths; string unique_prefix; }; struct v__errors__Error { v__errors__CompilerMessage CompilerMessage; }; struct sync__pool__PoolProcessor { voidptr thread_cb; int njobs; Array_voidptr items; Array_voidptr results; u32 ntask; sync__WaitGroup waitgroup; voidptr shared_context; Array_voidptr thread_contexts; }; struct v__errors__Warning { v__errors__CompilerMessage CompilerMessage; }; struct v__errors__Notice { v__errors__CompilerMessage CompilerMessage; }; struct v__ast__CallExpr { v__ast__OrExpr or_block; Array_v__ast__CallArg args; Array_v__ast__Type expected_arg_types; Array_v__ast__Type concrete_types; Array_v__ast__Type raw_concrete_types; Array_v__ast__Type from_embed_types; Array_v__ast__Comment comments; string mod; string name; v__ast__Expr left; string const_name; v__ast__Scope* scope; v__token__Pos pos; v__token__Pos name_pos; v__token__Pos concrete_list_pos; v__ast__Type left_type; v__ast__Type receiver_type; v__ast__Type return_type; v__ast__Type fn_var_type; v__ast__Language language : 4; bool is_method : 1; bool is_field : 1; bool is_fn_var : 1; bool is_fn_a_const : 1; bool is_keep_alive : 1; bool is_noreturn : 1; bool is_ctor_new : 1; bool is_file_translated : 1; bool comptime_ret_val : 1; bool should_be_skipped : 1; bool free_receiver : 1; }; struct v__ast__Ident { v__ast__OrExpr or_expr; Array_v__ast__Type concrete_types; v__ast__ScopeObject obj; string mod; string name; v__ast__IdentInfo info; v__ast__Scope* scope; v__token__Pos pos; v__token__Pos mut_pos; v__token__Kind tok_kind : 7; v__ast__Language language : 4; v__ast__IdentKind kind : 3; bool comptime : 1; bool is_mut : 1; }; struct v__ast__IndexExpr { v__ast__OrExpr or_expr; v__ast__Expr index; v__ast__Expr left; v__token__Pos pos; v__ast__Type left_type; bool is_setter : 1; bool is_map : 1; bool is_array : 1; bool is_farray : 1; bool is_option : 1; bool is_direct : 1; bool is_gated : 1; }; struct v__ast__InfixExpr { v__ast__OrExpr or_block; Array_v__ast__Comment before_op_comments; Array_v__ast__Comment after_op_comments; v__ast__Expr left; v__ast__Expr right; string auto_locked; v__ast__ComptTimeConstValue ct_left_value; v__ast__ComptTimeConstValue ct_right_value; v__token__Pos pos; v__ast__Type left_type; v__ast__Type right_type; v__ast__Type promoted_type; v__token__Kind op : 7; bool is_stmt : 1; bool ct_left_value_evaled : 1; bool ct_right_value_evaled : 1; }; struct v__ast__PrefixExpr { v__ast__OrExpr or_block; v__ast__Expr right; v__token__Pos pos; v__ast__Type right_type; v__token__Kind op : 7; bool is_option : 1; }; struct v__ast__SelectorExpr { v__ast__OrExpr or_block; Array_v__ast__Type from_embed_types; string field_name; v__ast__Expr expr; v__ast__Scope* scope; v__token__Pos pos; v__token__Pos mut_pos; v__ast__Type expr_type; v__ast__Type typ; v__ast__Type name_type; v__token__Kind next_token : 7; v__ast__GenericKindField gkind_field : 2; bool is_mut : 1; bool has_hidden_receiver : 1; }; struct v__ast__SqlExpr { bool is_count; bool has_where; bool has_order; bool has_limit; bool has_offset; bool has_desc; bool is_array; bool is_generated; v__token__Pos pos; v__ast__Type typ; v__ast__Expr db_expr; v__ast__Expr where_expr; v__ast__Expr order_expr; v__ast__Expr limit_expr; v__ast__Expr offset_expr; v__ast__TypeNode table_expr; Array_v__ast__StructField fields; Map_int_v__ast__SqlExpr sub_structs; v__ast__OrExpr or_expr; }; struct v__ast__SqlStmt { v__token__Pos pos; Array_v__ast__SqlStmtLine lines; v__ast__Expr db_expr; v__ast__OrExpr or_expr; v__ast__Type db_expr_type; }; struct v__ast__SelectBranch { v__ast__Comment comment; Array_v__ast__Comment post_comments; Array_v__ast__Stmt stmts; v__ast__Stmt stmt; v__token__Pos pos; bool is_else : 1; bool is_timeout : 1; }; struct v__ast__StructField { v__ast__StructDecl anon_struct_decl; Array_v__ast__Comment comments; Array_v__ast__Attr attrs; string default_val; v__ast__Expr default_expr; string name; v__token__Pos pos; v__token__Pos type_pos; v__token__Pos option_pos; int i; v__ast__Type default_expr_typ; v__ast__Type typ; v__ast__Type unaliased_typ; bool has_default_expr : 1; bool is_pub : 1; bool is_mut : 1; bool is_global : 1; bool is_volatile : 1; bool is_deprecated : 1; bool is_recursive : 1; }; struct v__ast__SqlStmtLine { v__ast__SqlStmtKind kind; v__token__Pos pos; bool is_generated; v__ast__Scope* scope; string object_var_name; Array_string updated_columns; v__ast__TypeNode table_expr; Array_v__ast__StructField fields; Map_int_v__ast__SqlStmtLine sub_structs; v__ast__Expr where_expr; Array_v__ast__Expr update_exprs; }; struct v__ast__FnType { bool is_anon; bool has_decl; v__ast__Fn func; }; struct v__parser__Parser { v__ast__StructDecl anon_struct_decl; Map_string_string imports; Map_string_string imported_symbols; v__token__Token tok; v__token__Token prev_tok; v__token__Token peek_tok; v__token__Token script_mode_start_token; Array_v__ast__Attr attrs; Array_v__ast__Import ast_imports; Array_string used_imports; Array_string auto_imports; Array_string label_names; Array_string global_labels; Array_v__ast__Ident defer_vars; Array_v__ast__Type struct_init_generic_types; Array_v__ast__Comment if_cond_comments; Array_v__ast__Comment left_comments; Array_v__errors__Error errors; Array_v__errors__Warning warnings; Array_v__errors__Notice notices; Array_v__vet__Error vet_errors; Array_v__vet__Error vet_notices; Array_string template_paths; string file_base; string file_name; string file_name_dir; string file_display_path; string unique_prefix; string mod; string expr_mod; string cur_fn_name; string codegen_text; v__pref__Preferences* pref; v__ast__Table* table; v__ast__Scope* scope; v__scanner__Scanner* scanner; int expr_level; int fixed_array_dim; int n_asm; v__ast__Language file_backend_mode : 4; v__ast__Language language : 4; v__ast__Language fn_language : 4; v__scanner__CommentsMode comments_mode : 2; bool inside_vlib_file : 1; bool inside_test_file : 1; bool inside_if : 1; bool inside_comptime_if : 1; bool inside_if_expr : 1; bool inside_if_cond : 1; bool inside_ct_if_expr : 1; bool inside_or_expr : 1; bool inside_for : 1; bool inside_fn : 1; bool inside_fn_return : 1; bool inside_call_args : 1; bool inside_unsafe_fn : 1; bool inside_str_interp : 1; bool inside_array_lit : 1; bool inside_in_array : 1; bool inside_infix : 1; bool inside_match : 1; bool inside_select : 1; bool inside_match_case : 1; bool inside_match_body : 1; bool inside_unsafe : 1; bool inside_sum_type : 1; bool inside_asm_template : 1; bool inside_asm : 1; bool inside_defer : 1; bool inside_generic_params : 1; bool inside_receiver_param : 1; bool inside_struct_field_decl : 1; bool inside_struct_attr_decl : 1; bool inside_map_init : 1; bool inside_orm : 1; bool inside_chan_decl : 1; bool inside_attr_decl : 1; bool or_is_handled : 1; bool builtin_mod : 1; bool is_manualfree : 1; bool has_globals : 1; bool is_generated : 1; bool is_translated : 1; bool is_amp : 1; bool returns : 1; bool is_stmt_ident : 1; bool expecting_type : 1; bool name_error : 1; bool comptime_if_cond : 1; bool should_abort : 1; bool script_mode : 1; }; struct v__ast__FnDecl { v__ast__StructField receiver; Array_string generic_names; Array_v__ast__Attr attrs; Array_v__ast__Param params; Array_v__ast__Stmt stmts; Array_v__ast__DeferStmt defer_stmts; Array_v__ast__Comment comments; Array_v__ast__Comment end_comments; Array_v__ast__Comment next_comments; Array_string label_names; string name; string short_name; string mod; string file; v__ast__File* source_file; v__ast__Scope* scope; v__token__Pos receiver_pos; v__token__Pos method_type_pos; v__token__Pos name_pos; v__token__Pos body_pos; v__token__Pos return_type_pos; v__token__Pos pos; int method_idx; int ctdefine_idx; int idx; v__ast__Type return_type; int ninstances; v__ast__Language language : 4; v__ast__Language file_mode : 4; v__ast__ShareType rec_share : 2; bool is_deprecated : 1; bool is_pub : 1; bool is_variadic : 1; bool is_anon : 1; bool is_noreturn : 1; bool is_manualfree : 1; bool is_main : 1; bool is_test : 1; bool is_conditional : 1; bool is_exported : 1; bool is_keep_alive : 1; bool is_unsafe : 1; bool is_markused : 1; bool is_file_translated : 1; bool is_method : 1; bool is_static_type_method : 1; bool rec_mut : 1; bool no_body : 1; bool is_builtin : 1; bool is_direct_arr : 1; bool has_return : 1; bool should_be_skipped : 1; bool has_await : 1; }; struct v__ast__ComptimeCall { v__ast__File vweb_tmpl; v__ast__EmbeddedFile embed_file; v__ast__OrExpr or_block; Array_v__ast__CallArg args; string method_name; v__ast__Expr left; string env_value; string args_var; v__ast__Scope* scope; v__token__Pos pos; v__token__Pos method_pos; v__token__Pos env_pos; v__ast__Type left_type; v__ast__Type result_type; bool has_parens : 1; bool is_vweb : 1; bool is_embed : 1; bool is_env : 1; bool is_pkgconfig : 1; }; struct v__ast__GoExpr { v__ast__CallExpr call_expr; v__token__Pos pos; bool is_expr : 1; }; struct v__ast__SpawnExpr { v__ast__CallExpr call_expr; v__token__Pos pos; bool is_expr : 1; }; struct v__gen__c__Gen { v__pref__Preferences* pref; v__ast__Type field_data_type; v__ast__Type enum_data_type; string module_built; bool timers_should_print; strings__Builder out; strings__Builder cheaders; strings__Builder preincludes; strings__Builder includes; strings__Builder typedefs; strings__Builder enum_typedefs; strings__Builder definitions; strings__Builder type_definitions; strings__Builder alias_definitions; strings__Builder hotcode_definitions; strings__Builder channel_definitions; strings__Builder thread_definitions; strings__Builder comptime_definitions; strings__Builder cleanup; Map_string_strings__Builder cleanups; strings__Builder gowrappers; strings__Builder auto_str_funcs; strings__Builder dump_funcs; strings__Builder pcs_declarations; strings__Builder embedded_data; strings__Builder shared_types; strings__Builder shared_functions; strings__Builder out_options_forward; strings__Builder out_options; strings__Builder out_results_forward; strings__Builder out_results; strings__Builder json_forward_decls; strings__Builder sql_buf; Map_string_v__gen__c__GlobalConstDef global_const_defs; Array_string sorted_global_const_names; v__ast__File* file; v__ast__Table* table; u64 unique_file_path_hash; v__ast__FnDecl* fn_decl; string last_fn_c_name; int tmp_count; int tmp_count_af; int tmp_count_declarations; int global_tmp_count; bool discard_or_result; bool is_direct_array_access; bool is_assign_lhs; bool is_void_expr_stmt; bool is_arraymap_set; bool is_amp; bool is_sql; bool is_shared; bool is_vlines_enabled; bool is_autofree; bool is_builtin_mod; bool is_json_fn; bool is_js_call; bool is_fn_index_call; bool is_cc_msvc; bool is_option_auto_heap; string vlines_path; int options_pos_forward; Array_string options_forward; Map_string_string options; Array_string results_forward; Map_string_string results; __shared__Array_string* done_options; __shared__Array_string* done_results; Map_string_string chan_pop_options; Map_string_string chan_push_options; string mtxs; Map_string_v__ast__Stmt_ptr labeled_loops; v__ast__Stmt* inner_loop; Map_int_string shareds; int inside_ternary; bool inside_map_postfix; bool inside_map_infix; bool inside_assign; bool inside_map_index; bool inside_array_index; bool inside_opt_or_res; bool inside_opt_data; bool inside_if_option; bool inside_if_result; bool inside_match_option; bool inside_match_result; bool inside_vweb_tmpl; bool inside_return; bool inside_return_tmpl; bool inside_struct_init; bool inside_or_block; bool inside_call; bool inside_curry_call; bool expected_fixed_arr; bool inside_for_c_stmt; bool inside_comptime_for_field; int inside_cast_in_heap; bool inside_const; bool inside_const_opt_or_res; bool inside_lambda; bool inside_cinit; bool inside_casting_to_str; Array_string last_tmp_call_var; int loop_depth; Map_string_string ternary_names; Map_string_Array_string ternary_level_names; int arraymap_set_pos; Array_int stmt_path_pos; bool skip_stmt_pos; bool left_is_opt; bool right_is_opt; v__ast__Type assign_ct_type; int indent; bool empty_line; v__token__Kind assign_op; Array_v__ast__DeferStmt defer_stmts; string defer_ifdef; string defer_profile_code; Array_string defer_vars; Array_v__gen__c__StrType str_types; Array_v__gen__c__StrType generated_str_fns; Array_string str_fn_names; __shared__Array_string* threaded_fns; __shared__Array_string* waiter_fns; Array_v__ast__Type needed_equality_fns; Array_v__ast__Type generated_eq_fns; __shared__Array_string* array_sort_fn; Array_v__ast__Type array_contains_types; Array_v__ast__Type array_index_types; Array_string auto_fn_definitions; Array_v__gen__c__SumtypeCastingFn sumtype_casting_fns; Array_string anon_fn_definitions; Map_int_bool sumtype_definitions; Array_v__ast__Type json_types; Array_v__gen__c__ProfileCounterMeta pcs; Array_string hotcode_fn_names; Array_string hotcode_fpaths; Array_v__ast__EmbeddedFile embedded_files; int sql_i; string sql_stmt_name; string sql_bind_name; Array_string sql_idents; Array_v__ast__Type sql_idents_types; v__ast__Type sql_left_type; string sql_table_name; string sql_fkey; string sql_parent_id; v__gen__c__SqlExprSide sql_side; Array_string strs_to_free0; string comptime_for_method; string comptime_for_method_var; string comptime_for_field_var; v__ast__StructField comptime_for_field_value; v__ast__Type comptime_for_field_type; string comptime_enum_field_value; Map_string_v__ast__Type comptime_var_type_map; Array_v__gen__c__CurrentComptimeValues comptime_values_stack; bool prevent_sum_type_unwrapping_once; int aggregate_type_idx; int branch_parent_pos; string returned_var_name; string infix_left_var_name; string called_fn_name; v__util__Timers* timers; bool force_main_console; Map_string_string as_cast_type_names; Map_string_string obf_table; __shared__Map_string_bool* referenced_fns; int nr_closures; v__ast__Type expected_cast_type; v__ast__Type or_expr_return_type; bool anon_fn; bool tests_inited; bool has_main; v__ast__Module cur_mod; Array_v__ast__Type cur_concrete_types; v__ast__FnDecl* cur_fn; v__ast__LockExpr cur_lock; v__ast__Type cur_struct_init_typ; Map_int_bool autofree_methods; Map_int_bool generated_free_methods; Array_string autofree_scope_stmts; bool use_segfault_handler; Array_string test_function_names; Array_int out_fn_start_pos; string static_modifier; bool has_reflection; Map_string_int* reflection_strings; string defer_return_tmp_var; }; struct v__gen__c__CurrentComptimeValues { bool inside_comptime_for_field; string comptime_for_method; string comptime_for_method_var; string comptime_for_field_var; v__ast__StructField comptime_for_field_value; v__ast__Type comptime_for_field_type; Map_string_v__ast__Type comptime_var_type_map; }; struct v__checker__Checker { v__ast__FnDecl main_fn_decl_node; v__ast__StructField comptime_for_field_value; v__ast__TypeSymbol cur_orm_ts; Map_string_v__ast__Type comptime_fields_type; Map_string_v__ast__GotoLabel goto_labels; Array_v__errors__Error errors; Array_v__errors__Warning warnings; Array_v__errors__Notice notices; Array_int error_lines; Array_string const_deps; Array_string const_names; Array_string global_names; Array_string locked_names; Array_string rlocked_names; Array_v__ast__Type cur_struct_generic_types; Array_v__ast__Type cur_struct_concrete_types; Array_v__ast__Expr ct_cond_stack; Array_string error_details; Array_v__ast__Type vweb_gen_types; string mod; string vmod_file_content; string loop_label; string comptime_for_field_var; string comptime_enum_field_value; v__pref__Preferences* pref; v__ast__Table* table; v__ast__File* file; v__ast__ConstField* const_var; v__ast__AnonFn* cur_anon_fn; v__util__Timers* timers; v__ast__Scope* fn_scope; v__token__Pos smartcast_mut_pos; v__token__Pos smartcast_cond_pos; int nr_errors; int nr_warnings; int nr_notices; v__ast__Type expected_type; v__ast__Type expected_or_type; v__ast__Type expected_expr_type; int in_for_count; int fn_level; int stmt_level; int expr_level; int ensure_generic_type_level; v__ast__Type comptime_fields_default_type; int match_exhaustive_cutoff_limit; int comptime_call_pos; v__ast__Type enum_data_type; v__ast__Type fn_return_type; bool should_abort : 1; bool returns : 1; bool scope_returns : 1; bool is_builtin_mod : 1; bool is_just_builtin_mod : 1; bool is_generated : 1; bool inside_unsafe : 1; bool inside_const : 1; bool inside_anon_fn : 1; bool inside_ref_lit : 1; bool inside_defer : 1; bool inside_fn_arg : 1; bool inside_ct_attr : 1; bool inside_x_is_type : 1; bool inside_comptime_for_field : 1; bool inside_generic_struct_init : 1; bool skip_flags : 1; bool is_last_stmt : 1; bool prevent_sum_type_unwrapping_once : 1; bool using_new_err_struct : 1; bool need_recheck_generic_fns : 1; bool inside_sql : 1; bool inside_selector_expr : 1; bool inside_casting_to_str : 1; bool inside_decl_rhs : 1; bool inside_if_guard : 1; bool inside_assign : 1; bool is_index_assign : 1; }; struct v__builder__FunctionRedefinition { string fpath; int fline; string fheader; v__ast__FnDecl f; }; struct v__ast__AnonFn { v__ast__FnDecl decl; Array_v__ast__Param inherited_vars; v__ast__Type typ; Map_string_bool has_gen; }; // #end sorted_symbols // BEGIN_array_fixed_return_structs // END_array_fixed_return_structs // BEGIN_multi_return_structs struct multi_return_u32_u32 { u32 arg0; u32 arg1; }; struct multi_return_string_string { string arg0; string arg1; }; struct multi_return_int_int { int arg0; int arg1; }; struct multi_return_u32_u32_u32 { u32 arg0; u32 arg1; u32 arg2; }; struct multi_return_strconv__ParserState_strconv__PrepNumber { strconv__ParserState arg0; strconv__PrepNumber arg1; }; struct multi_return_u64_int { u64 arg0; int arg1; }; struct multi_return_strconv__Dec32_bool { strconv__Dec32 arg0; bool arg1; }; struct multi_return_strconv__Dec64_bool { strconv__Dec64 arg0; bool arg1; }; struct multi_return_string_int { string arg0; int arg1; }; struct multi_return_int_bool { int arg0; bool arg1; }; struct multi_return_ref_v__pref__Preferences_string { v__pref__Preferences* arg0; string arg1; }; struct multi_return_u64_u64 { u64 arg0; u64 arg1; }; struct multi_return_f64_int { f64 arg0; int arg1; }; struct multi_return_f64_f64 { f64 arg0; f64 arg1; }; struct multi_return_int_int_int { int arg0; int arg1; int arg2; }; struct multi_return_int_int_int_int_int_i64_bool { int arg0; int arg1; int arg2; int arg3; int arg4; i64 arg5; bool arg6; }; struct multi_return_Array_string_int { Array_string arg0; int arg1; }; struct multi_return_Array_string_v__vmod__ModFileAndFolder { Array_string arg0; v__vmod__ModFileAndFolder arg1; }; struct multi_return_string_bool { string arg0; bool arg1; }; struct multi_return_v__ast__Fn_Array_v__ast__Type { v__ast__Fn arg0; Array_v__ast__Type arg1; }; struct multi_return_v__ast__StructField_Array_v__ast__Type { v__ast__StructField arg0; Array_v__ast__Type arg1; }; struct multi_return_ref_v__ast__TypeSymbol_int { v__ast__TypeSymbol* arg0; int arg1; }; struct multi_return_bool_bool_int { bool arg0; bool arg1; int arg2; }; struct multi_return_string_v__token__Pos { string arg0; v__token__Pos arg1; }; struct multi_return_bool_int_int { bool arg0; int arg1; int arg2; }; struct multi_return_Array_v__ast__Param_bool_bool { Array_v__ast__Param arg0; bool arg1; bool arg2; }; struct multi_return_Array_v__ast__Expr_Array_v__ast__Comment { Array_v__ast__Expr arg0; Array_v__ast__Comment arg1; }; struct multi_return_ref_v__ast__File_Array_v__vet__Error_Array_v__vet__Error { v__ast__File* arg0; Array_v__vet__Error arg1; Array_v__vet__Error arg2; }; struct multi_return_Array_v__ast__Stmt_v__token__Pos { Array_v__ast__Stmt arg0; v__token__Pos arg1; }; struct multi_return_Array_v__ast__Type_Array_string { Array_v__ast__Type arg0; Array_string arg1; }; struct multi_return_Map_string_v__ast__FnDecl_Map_string_v__ast__ConstField_Map_string_v__ast__GlobalField { Map_string_v__ast__FnDecl arg0; Map_string_v__ast__ConstField arg1; Map_string_v__ast__GlobalField arg2; }; struct multi_return_bool_Array_string { bool arg0; Array_string arg1; }; struct multi_return_Array_string_Array_string_Array_string { Array_string arg0; Array_string arg1; Array_string arg2; }; struct multi_return_string_string_string_Array_int { string arg0; string arg1; string arg2; Array_int arg3; }; struct multi_return_string_string_string_string { string arg0; string arg1; string arg2; string arg3; }; struct multi_return_int_string_string_string { int arg0; string arg1; string arg2; string arg3; }; struct multi_return_v__ast__StructField_string { v__ast__StructField arg0; string arg1; }; struct multi_return_bool_bool { bool arg0; bool arg1; }; struct multi_return_Array_string_Array_string_Array_bool { Array_string arg0; Array_string arg1; Array_bool arg2; }; struct multi_return_u64_string { u64 arg0; string arg1; }; struct multi_return_int_string { int arg0; string arg1; }; struct multi_return_ref_u16_ref_sync__Subscription { u16* arg0; sync__Subscription** arg1; }; // END_multi_return_structs typedef struct thread_arg_sync__pool__process_in_thread { void (*fn) (sync__pool__PoolProcessor*, int); sync__pool__PoolProcessor* arg1; int arg2; } thread_arg_sync__pool__process_in_thread; void* sync__pool__process_in_thread_thread_wrapper(thread_arg_sync__pool__process_in_thread *arg); static bool Array_u8_contains(Array_u8 a, u8 v); // auto static bool Array_string_contains(Array_string a, string v); // auto static bool Array_v__token__Kind_contains(Array_v__token__Kind a, v__token__Kind v); // auto static bool Array_Array_v__ast__Type_contains(Array_Array_v__ast__Type a, Array_v__ast__Type v); // auto static bool Array_v__ast__Type_contains(Array_v__ast__Type a, v__ast__Type v); // auto static bool Array_int_contains(Array_int a, int v); // auto static bool Array_v__gen__c__StrType_contains(Array_v__gen__c__StrType a, v__gen__c__StrType v); // auto static bool Array_v__gen__c__SumtypeCastingFn_contains(Array_v__gen__c__SumtypeCastingFn a, v__gen__c__SumtypeCastingFn v); // auto static bool Array_v__ast__EmbeddedFile_contains(Array_v__ast__EmbeddedFile a, v__ast__EmbeddedFile v); // auto static bool Array_i64_contains(Array_i64 a, i64 v); // auto static bool Array_u64_contains(Array_u64 a, u64 v); // auto static int Array_string_index(Array_string a, string v); // auto static int Array_v__ast__StructField_index(Array_v__ast__StructField a, v__ast__StructField v); // auto // V alias definitions: // V shared types: struct __shared__Array_string { sync__RwMutex mtx; Array_string val; }; struct __shared__Map_string_bool { sync__RwMutex mtx; Map_string_bool val; }; // V Option_xxx definitions: struct _option_multi_return_string_string { byte state; IError err; byte data[sizeof(multi_return_string_string) > 1 ? sizeof(multi_return_string_string) : 1]; }; struct _option_int { byte state; IError err; byte data[sizeof(int) > 1 ? sizeof(int) : 1]; }; struct _option_u8 { byte state; IError err; byte data[sizeof(u8) > 1 ? sizeof(u8) : 1]; }; struct _option_semver__Version { byte state; IError err; byte data[sizeof(semver__Version) > 1 ? sizeof(semver__Version) : 1]; }; struct _option_semver__ComparatorSet { byte state; IError err; byte data[sizeof(semver__ComparatorSet) > 1 ? sizeof(semver__ComparatorSet) : 1]; }; struct _option_semver__Comparator { byte state; IError err; byte data[sizeof(semver__Comparator) > 1 ? sizeof(semver__Comparator) : 1]; }; struct _option_string { byte state; IError err; byte data[sizeof(string) > 1 ? sizeof(string) : 1]; }; struct _option_Array_string { byte state; IError err; byte data[sizeof(Array_string) > 1 ? sizeof(Array_string) : 1]; }; struct _option_rune { byte state; IError err; byte data[sizeof(rune) > 1 ? sizeof(rune) : 1]; }; struct _option_time__StopWatch { byte state; IError err; byte data[sizeof(time__StopWatch) > 1 ? sizeof(time__StopWatch) : 1]; }; struct _option_v__ast__Ident { byte state; IError err; byte data[sizeof(v__ast__Ident) > 1 ? sizeof(v__ast__Ident) : 1]; }; struct _option_v__ast__Attr { byte state; IError err; byte data[sizeof(v__ast__Attr) > 1 ? sizeof(v__ast__Attr) : 1]; }; struct _option_i8 { byte state; IError err; byte data[sizeof(i8) > 1 ? sizeof(i8) : 1]; }; struct _option_i64 { byte state; IError err; byte data[sizeof(i64) > 1 ? sizeof(i64) : 1]; }; struct _option_i16 { byte state; IError err; byte data[sizeof(i16) > 1 ? sizeof(i16) : 1]; }; struct _option_voidptr { byte state; IError err; byte data[sizeof(voidptr) > 1 ? sizeof(voidptr) : 1]; }; struct _option_u64 { byte state; IError err; byte data[sizeof(u64) > 1 ? sizeof(u64) : 1]; }; struct _option_u16 { byte state; IError err; byte data[sizeof(u16) > 1 ? sizeof(u16) : 1]; }; struct _option_u32 { byte state; IError err; byte data[sizeof(u32) > 1 ? sizeof(u32) : 1]; }; struct _option_f32 { byte state; IError err; byte data[sizeof(f32) > 1 ? sizeof(f32) : 1]; }; struct _option_f64 { byte state; IError err; byte data[sizeof(f64) > 1 ? sizeof(f64) : 1]; }; struct _option_v__ast__ComptTimeConstValue { byte state; IError err; byte data[sizeof(v__ast__ComptTimeConstValue) > 1 ? sizeof(v__ast__ComptTimeConstValue) : 1]; }; struct _option_v__ast__ScopeObject { byte state; IError err; byte data[sizeof(v__ast__ScopeObject) > 1 ? sizeof(v__ast__ScopeObject) : 1]; }; struct _option_v__ast__ScopeStructField { byte state; IError err; byte data[sizeof(v__ast__ScopeStructField) > 1 ? sizeof(v__ast__ScopeStructField) : 1]; }; struct _option_v__ast__Var_ptr { byte state; IError err; byte data[sizeof(v__ast__Var*) > 1 ? sizeof(v__ast__Var*) : 1]; }; struct _option_v__ast__GlobalField_ptr { byte state; IError err; byte data[sizeof(v__ast__GlobalField*) > 1 ? sizeof(v__ast__GlobalField*) : 1]; }; struct _option_v__ast__ConstField_ptr { byte state; IError err; byte data[sizeof(v__ast__ConstField*) > 1 ? sizeof(v__ast__ConstField*) : 1]; }; struct _option_v__ast__Fn { byte state; IError err; byte data[sizeof(v__ast__Fn) > 1 ? sizeof(v__ast__Fn) : 1]; }; struct _option_v__ast__StructField { byte state; IError err; byte data[sizeof(v__ast__StructField) > 1 ? sizeof(v__ast__StructField) : 1]; }; struct _option_v__ast__TypeSymbol_ptr { byte state; IError err; byte data[sizeof(v__ast__TypeSymbol*) > 1 ? sizeof(v__ast__TypeSymbol*) : 1]; }; struct _option_Array_Array_v__ast__Type { byte state; IError err; byte data[sizeof(Array_Array_v__ast__Type) > 1 ? sizeof(Array_Array_v__ast__Type) : 1]; }; struct _option_v__ast__Type { byte state; IError err; byte data[sizeof(v__ast__Type) > 1 ? sizeof(v__ast__Type) : 1]; }; struct _option_Array_v__ast__Type { byte state; IError err; byte data[sizeof(Array_v__ast__Type) > 1 ? sizeof(Array_v__ast__Type) : 1]; }; struct _option_v__ast__ConstField { byte state; IError err; byte data[sizeof(v__ast__ConstField) > 1 ? sizeof(v__ast__ConstField) : 1]; }; struct _option_v__ast__GlobalField { byte state; IError err; byte data[sizeof(v__ast__GlobalField) > 1 ? sizeof(v__ast__GlobalField) : 1]; }; struct _option_v__ast__FnDecl { byte state; IError err; byte data[sizeof(v__ast__FnDecl) > 1 ? sizeof(v__ast__FnDecl) : 1]; }; struct _option_v__gen__c__GlobalConstDef { byte state; IError err; byte data[sizeof(v__gen__c__GlobalConstDef) > 1 ? sizeof(v__gen__c__GlobalConstDef) : 1]; }; struct _option_v__ast__Stmt_ptr { byte state; IError err; byte data[sizeof(v__ast__Stmt*) > 1 ? sizeof(v__ast__Stmt*) : 1]; }; struct _option_v__ast__EnumDecl { byte state; IError err; byte data[sizeof(v__ast__EnumDecl) > 1 ? sizeof(v__ast__EnumDecl) : 1]; }; struct _option_v__ast__InterfaceDecl { byte state; IError err; byte data[sizeof(v__ast__InterfaceDecl) > 1 ? sizeof(v__ast__InterfaceDecl) : 1]; }; struct _option_bool { byte state; IError err; byte data[sizeof(bool) > 1 ? sizeof(bool) : 1]; }; struct _option_v__ast__Param { byte state; IError err; byte data[sizeof(v__ast__Param) > 1 ? sizeof(v__ast__Param) : 1]; }; struct _option_v__checker__LoHiLimit { byte state; IError err; byte data[sizeof(v__checker__LoHiLimit) > 1 ? sizeof(v__checker__LoHiLimit) : 1]; }; struct _option_v__ast__LambdaExpr { byte state; IError err; byte data[sizeof(v__ast__LambdaExpr) > 1 ? sizeof(v__ast__LambdaExpr) : 1]; }; // V result_xxx definitions: struct _result_int { bool is_error; IError err; byte data[sizeof(int) > 1 ? sizeof(int) : 1]; }; struct _result_f64 { bool is_error; IError err; byte data[sizeof(f64) > 1 ? sizeof(f64) : 1]; }; struct _result_u64 { bool is_error; IError err; byte data[sizeof(u64) > 1 ? sizeof(u64) : 1]; }; struct _result_i64 { bool is_error; IError err; byte data[sizeof(i64) > 1 ? sizeof(i64) : 1]; }; struct _result_rune { bool is_error; IError err; byte data[sizeof(rune) > 1 ? sizeof(rune) : 1]; }; struct _result_string { bool is_error; IError err; byte data[sizeof(string) > 1 ? sizeof(string) : 1]; }; struct _result_v__token__Kind { bool is_error; IError err; byte data[sizeof(v__token__Kind) > 1 ? sizeof(v__token__Kind) : 1]; }; struct _result_void { bool is_error; IError err; byte data[sizeof(u8) > 1 ? sizeof(u8) : 1]; }; struct _result_Array_string { bool is_error; IError err; byte data[sizeof(Array_string) > 1 ? sizeof(Array_string) : 1]; }; struct _result_time__Time { bool is_error; IError err; byte data[sizeof(time__Time) > 1 ? sizeof(time__Time) : 1]; }; struct _result_multi_return_int_int_int { bool is_error; IError err; byte data[sizeof(multi_return_int_int_int) > 1 ? sizeof(multi_return_int_int_int) : 1]; }; struct _result_multi_return_int_int_int_int_int_i64_bool { bool is_error; IError err; byte data[sizeof(multi_return_int_int_int_int_int_i64_bool) > 1 ? sizeof(multi_return_int_int_int_int_int_i64_bool) : 1]; }; struct _result_bool { bool is_error; IError err; byte data[sizeof(bool) > 1 ? sizeof(bool) : 1]; }; struct _result_flag__Flag { bool is_error; IError err; byte data[sizeof(flag__Flag) > 1 ? sizeof(flag__Flag) : 1]; }; struct _result_semver__Range { bool is_error; IError err; byte data[sizeof(semver__Range) > 1 ? sizeof(semver__Range) : 1]; }; struct _result_semver__Version { bool is_error; IError err; byte data[sizeof(semver__Version) > 1 ? sizeof(semver__Version) : 1]; }; struct _result_semver__ComparatorSet { bool is_error; IError err; byte data[sizeof(semver__ComparatorSet) > 1 ? sizeof(semver__ComparatorSet) : 1]; }; struct _result_os__File { bool is_error; IError err; byte data[sizeof(os__File) > 1 ? sizeof(os__File) : 1]; }; struct _result_FILE_ptr { bool is_error; IError err; byte data[sizeof(FILE*) > 1 ? sizeof(FILE*) : 1]; }; struct _result_Array_u8 { bool is_error; IError err; byte data[sizeof(Array_u8) > 1 ? sizeof(Array_u8) : 1]; }; struct _result_strings__Builder { bool is_error; IError err; byte data[sizeof(strings__Builder) > 1 ? sizeof(strings__Builder) : 1]; }; struct _result_anon_fn_os__signal { bool is_error; IError err; byte data[sizeof(void*) > 1 ? sizeof(void*) : 1]; }; struct _result_term__Coord { bool is_error; IError err; byte data[sizeof(term__Coord) > 1 ? sizeof(term__Coord) : 1]; }; struct _result_v__vmod__Manifest { bool is_error; IError err; byte data[sizeof(v__vmod__Manifest) > 1 ? sizeof(v__vmod__Manifest) : 1]; }; struct _result_multi_return_Array_string_int { bool is_error; IError err; byte data[sizeof(multi_return_Array_string_int) > 1 ? sizeof(multi_return_Array_string_int) : 1]; }; struct _result_v__pkgconfig__PkgConfig_ptr { bool is_error; IError err; byte data[sizeof(v__pkgconfig__PkgConfig*) > 1 ? sizeof(v__pkgconfig__PkgConfig*) : 1]; }; struct _result_v__pkgconfig__Main_ptr { bool is_error; IError err; byte data[sizeof(v__pkgconfig__Main*) > 1 ? sizeof(v__pkgconfig__Main*) : 1]; }; struct _result_u32 { bool is_error; IError err; byte data[sizeof(u32) > 1 ? sizeof(u32) : 1]; }; struct _result_f32 { bool is_error; IError err; byte data[sizeof(f32) > 1 ? sizeof(f32) : 1]; }; struct _result_multi_return_f64_f64 { bool is_error; IError err; byte data[sizeof(multi_return_f64_f64) > 1 ? sizeof(multi_return_f64_f64) : 1]; }; struct _result_v__pref__OS { bool is_error; IError err; byte data[sizeof(v__pref__OS) > 1 ? sizeof(v__pref__OS) : 1]; }; struct _result_v__pref__Arch { bool is_error; IError err; byte data[sizeof(v__pref__Arch) > 1 ? sizeof(v__pref__Arch) : 1]; }; struct _result_v__pref__Backend { bool is_error; IError err; byte data[sizeof(v__pref__Backend) > 1 ? sizeof(v__pref__Backend) : 1]; }; struct _result_v__ast__Fn { bool is_error; IError err; byte data[sizeof(v__ast__Fn) > 1 ? sizeof(v__ast__Fn) : 1]; }; struct _result_multi_return_v__ast__Fn_Array_v__ast__Type { bool is_error; IError err; byte data[sizeof(multi_return_v__ast__Fn_Array_v__ast__Type) > 1 ? sizeof(multi_return_v__ast__Fn_Array_v__ast__Type) : 1]; }; struct _result_v__ast__StructField { bool is_error; IError err; byte data[sizeof(v__ast__StructField) > 1 ? sizeof(v__ast__StructField) : 1]; }; struct _result_multi_return_v__ast__StructField_Array_v__ast__Type { bool is_error; IError err; byte data[sizeof(multi_return_v__ast__StructField_Array_v__ast__Type) > 1 ? sizeof(multi_return_v__ast__StructField_Array_v__ast__Type) : 1]; }; struct _result_v__ast__Expr { bool is_error; IError err; byte data[sizeof(v__ast__Expr) > 1 ? sizeof(v__ast__Expr) : 1]; }; struct _result_v__scanner__Scanner_ptr { bool is_error; IError err; byte data[sizeof(v__scanner__Scanner*) > 1 ? sizeof(v__scanner__Scanner*) : 1]; }; struct _result_v__builder__MsvcResult { bool is_error; IError err; byte data[sizeof(v__builder__MsvcResult) > 1 ? sizeof(v__builder__MsvcResult) : 1]; }; struct _result_v__builder__WindowsKit { bool is_error; IError err; byte data[sizeof(v__builder__WindowsKit) > 1 ? sizeof(v__builder__WindowsKit) : 1]; }; struct _result_v__builder__VsInstallation { bool is_error; IError err; byte data[sizeof(v__builder__VsInstallation) > 1 ? sizeof(v__builder__VsInstallation) : 1]; }; // V json forward decls: // V definitions: static char * v_typeof_interface_IError(int sidx); static char * v_typeof_interface_rand__PRNG(int sidx); static char * v_typeof_interface_hash__Hasher(int sidx); static char * v_typeof_interface_hash__Hash32er(int sidx); static char * v_typeof_interface_hash__Hash64er(int sidx); static char * v_typeof_interface_v__ast__walker__Visitor(int sidx); // end of definitions #endif strings__Builder strings__new_builder(int initial_size); Array_u8 strings__Builder_reuse_as_plain_u8_array(strings__Builder* b); void strings__Builder_write_ptr(strings__Builder* b, u8* ptr, int len); void strings__Builder_write_rune(strings__Builder* b, rune r); void strings__Builder_write_runes(strings__Builder* b, Array_rune runes); void strings__Builder_clear(strings__Builder* b); void strings__Builder_write_u8(strings__Builder* b, u8 data); void strings__Builder_write_byte(strings__Builder* b, byte data); _result_int strings__Builder_write(strings__Builder* b, Array_u8 data); void strings__Builder_drain_builder(strings__Builder* b, strings__Builder* other, int other_new_cap); u8 strings__Builder_byte_at(strings__Builder* b, int n); void strings__Builder_write_string(strings__Builder* b, string s); void strings__Builder_go_back(strings__Builder* b, int n); VV_LOCAL_SYMBOL string strings__Builder_spart(strings__Builder* b, int start_pos, int n); string strings__Builder_cut_last(strings__Builder* b, int n); string strings__Builder_cut_to(strings__Builder* b, int pos); void strings__Builder_go_back_to(strings__Builder* b, int pos); void strings__Builder_writeln(strings__Builder* b, string s); string strings__Builder_last_n(strings__Builder* b, int n); string strings__Builder_after(strings__Builder* b, int n); string strings__Builder_str(strings__Builder* b); void strings__Builder_ensure_cap(strings__Builder* b, int n); void strings__Builder_free(strings__Builder* b); int strings__levenshtein_distance(string a, string b); f32 strings__levenshtein_distance_percentage(string a, string b); f32 strings__dice_coefficient(string s1, string s2); string strings__repeat(u8 c, int n); string strings__repeat_string(string s, int n); string strings__find_between_pair_u8(string input, u8 start, u8 end); string strings__find_between_pair_rune(string input, rune start, rune end); string strings__find_between_pair_string(string input, string start, string end); Array_string strings__split_capital(string s); int math__bits__leading_zeros_8(u8 x); int math__bits__leading_zeros_16(u16 x); int math__bits__leading_zeros_32(u32 x); int math__bits__leading_zeros_64(u64 x); int math__bits__trailing_zeros_8(u8 x); int math__bits__trailing_zeros_16(u16 x); int math__bits__trailing_zeros_32(u32 x); int math__bits__trailing_zeros_64(u64 x); int math__bits__ones_count_8(u8 x); int math__bits__ones_count_16(u16 x); int math__bits__ones_count_32(u32 x); int math__bits__ones_count_64(u64 x); u8 math__bits__rotate_left_8(u8 x, int k); u16 math__bits__rotate_left_16(u16 x, int k); u32 math__bits__rotate_left_32(u32 x, int k); u64 math__bits__rotate_left_64(u64 x, int k); u8 math__bits__reverse_8(u8 x); u16 math__bits__reverse_16(u16 x); u32 math__bits__reverse_32(u32 x); u64 math__bits__reverse_64(u64 x); u16 math__bits__reverse_bytes_16(u16 x); u32 math__bits__reverse_bytes_32(u32 x); u64 math__bits__reverse_bytes_64(u64 x); int math__bits__len_8(u8 x); int math__bits__len_16(u16 x); int math__bits__len_32(u32 x); int math__bits__len_64(u64 x); multi_return_u32_u32 math__bits__add_32(u32 x, u32 y, u32 carry); multi_return_u64_u64 math__bits__add_64(u64 x, u64 y, u64 carry); multi_return_u32_u32 math__bits__sub_32(u32 x, u32 y, u32 borrow); multi_return_u64_u64 math__bits__sub_64(u64 x, u64 y, u64 borrow); multi_return_u32_u32 math__bits__mul_32(u32 x, u32 y); multi_return_u64_u64 math__bits__mul_64(u64 x, u64 y); multi_return_u32_u32 math__bits__div_32(u32 hi, u32 lo, u32 y); multi_return_u64_u64 math__bits__div_64(u64 hi, u64 lo, u64 y1); u32 math__bits__rem_32(u32 hi, u32 lo, u32 y); u64 math__bits__rem_64(u64 hi, u64 lo, u64 y); multi_return_f64_int math__bits__normalize(f64 x); u32 math__bits__f32_bits(f32 f); f32 math__bits__f32_from_bits(u32 b); u64 math__bits__f64_bits(f64 f); f64 math__bits__f64_from_bits(u64 b); VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__lsr96(u32 s2, u32 s1, u32 s0); VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__lsl96(u32 s2, u32 s1, u32 s0); VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__add96(u32 s2, u32 s1, u32 s0, u32 d2, u32 d1, u32 d0); VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__sub96(u32 s2, u32 s1, u32 s0, u32 d2, u32 d1, u32 d0); VV_LOCAL_SYMBOL bool strconv__is_digit(u8 x); VV_LOCAL_SYMBOL bool strconv__is_space(u8 x); VV_LOCAL_SYMBOL bool strconv__is_exp(u8 x); VV_LOCAL_SYMBOL multi_return_strconv__ParserState_strconv__PrepNumber strconv__parser(string s); VV_LOCAL_SYMBOL u64 strconv__converter(strconv__PrepNumber* pn); _result_f64 strconv__atof64(string s); f64 strconv__atof_quick(string s); u8 strconv__byte_to_lower(u8 c); _result_u64 strconv__common_parse_uint(string s, int _base, int _bit_size, bool error_on_non_digit, bool error_on_high_digit); multi_return_u64_int strconv__common_parse_uint2(string s, int _base, int _bit_size); _result_u64 strconv__parse_uint(string s, int _base, int _bit_size); _result_i64 strconv__common_parse_int(string _s, int base, int _bit_size, bool error_on_non_digit, bool error_on_high_digit); _result_i64 strconv__parse_int(string _s, int base, int _bit_size); _result_int strconv__atoi(string s); string strconv__Dec32_get_string_32(strconv__Dec32 d, bool neg, int i_n_digit, int i_pad_digit); VV_LOCAL_SYMBOL multi_return_strconv__Dec32_bool strconv__f32_to_decimal_exact_int(u32 i_mant, u32 exp); VV_LOCAL_SYMBOL strconv__Dec32 strconv__f32_to_decimal(u32 mant, u32 exp); string strconv__f32_to_str(f32 f, int n_digit); string strconv__f32_to_str_pad(f32 f, int n_digit); VV_LOCAL_SYMBOL string strconv__Dec64_get_string_64(strconv__Dec64 d, bool neg, int i_n_digit, int i_pad_digit); VV_LOCAL_SYMBOL multi_return_strconv__Dec64_bool strconv__f64_to_decimal_exact_int(u64 i_mant, u64 exp); VV_LOCAL_SYMBOL strconv__Dec64 strconv__f64_to_decimal(u64 mant, u64 exp); string strconv__f64_to_str(f64 f, int n_digit); string strconv__f64_to_str_pad(f64 f, int n_digit); string strconv__format_str(string s, strconv__BF_param p); void strconv__format_str_sb(string s, strconv__BF_param p, strings__Builder* sb); void strconv__format_dec_sb(u64 d, strconv__BF_param p, strings__Builder* res); string strconv__f64_to_str_lnd1(f64 f, int dec_digit); string strconv__format_fl(f64 f, strconv__BF_param p); string strconv__format_es(f64 f, strconv__BF_param p); string strconv__remove_tail_zeros(string s); string strconv__ftoa_64(f64 f); string strconv__ftoa_long_64(f64 f); string strconv__ftoa_32(f32 f); string strconv__ftoa_long_32(f32 f); string strconv__format_int(i64 n, int radix); string strconv__format_uint(u64 n, int radix); string strconv__f32_to_str_l(f32 f); string strconv__f32_to_str_l_with_dot(f32 f); string strconv__f64_to_str_l(f64 f); string strconv__f64_to_str_l_with_dot(f64 f); string strconv__fxx_to_str_l_parse(string s); string strconv__fxx_to_str_l_parse_with_dot(string s); VV_LOCAL_SYMBOL int strconv__bool_to_int(bool b); VV_LOCAL_SYMBOL u32 strconv__bool_to_u32(bool b); VV_LOCAL_SYMBOL u64 strconv__bool_to_u64(bool b); VV_LOCAL_SYMBOL string strconv__get_string_special(bool neg, bool expZero, bool mantZero); VV_LOCAL_SYMBOL u32 strconv__mul_shift_32(u32 m, u64 mul, int ishift); VV_LOCAL_SYMBOL u32 strconv__mul_pow5_invdiv_pow2(u32 m, u32 q, int j); VV_LOCAL_SYMBOL u32 strconv__mul_pow5_div_pow2(u32 m, u32 i, int j); VV_LOCAL_SYMBOL u32 strconv__pow5_factor_32(u32 i_v); VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_five_32(u32 v, u32 p); VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_two_32(u32 v, u32 p); VV_LOCAL_SYMBOL u32 strconv__log10_pow2(int e); VV_LOCAL_SYMBOL u32 strconv__log10_pow5(int e); VV_LOCAL_SYMBOL int strconv__pow5_bits(int e); VV_LOCAL_SYMBOL u64 strconv__shift_right_128(strconv__Uint128 v, int shift); VV_LOCAL_SYMBOL u64 strconv__mul_shift_64(u64 m, strconv__Uint128 mul, int shift); VV_LOCAL_SYMBOL u32 strconv__pow5_factor_64(u64 v_i); VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_five_64(u64 v, u32 p); VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_two_64(u64 v, u32 p); int strconv__dec_digits(u64 n); void strconv__v_printf(string str, Array_voidptr pt); string strconv__v_sprintf(string str, Array_voidptr pt); VV_LOCAL_SYMBOL void strconv__v_sprintf_panic(int idx, int len); VV_LOCAL_SYMBOL f64 strconv__fabs(f64 x); string strconv__format_fl_old(f64 f, strconv__BF_param p); VV_LOCAL_SYMBOL string strconv__format_es_old(f64 f, strconv__BF_param p); VV_LOCAL_SYMBOL string strconv__remove_tail_zeros_old(string s); string strconv__format_dec_old(u64 d, strconv__BF_param p); VV_LOCAL_SYMBOL array __new_array(int mylen, int cap, int elm_size); VV_LOCAL_SYMBOL array __new_array_with_default(int mylen, int cap, int elm_size, voidptr val); VV_LOCAL_SYMBOL array __new_array_with_multi_default(int mylen, int cap, int elm_size, voidptr val); VV_LOCAL_SYMBOL array __new_array_with_array_default(int mylen, int cap, int elm_size, array val, int depth); VV_LOCAL_SYMBOL array __new_array_with_map_default(int mylen, int cap, int elm_size, map val); VV_LOCAL_SYMBOL array new_array_from_c_array(int len, int cap, int elm_size, voidptr c_array); VV_LOCAL_SYMBOL array new_array_from_c_array_no_alloc(int len, int cap, int elm_size, voidptr c_array); VV_LOCAL_SYMBOL void array_ensure_cap(array* a, int required); array array_repeat(array a, int count); array array_repeat_to_depth(array a, int count, int depth); void array_insert(array* a, int i, voidptr val); VV_LOCAL_SYMBOL void array_insert_many(array* a, int i, voidptr val, int size); void array_prepend(array* a, voidptr val); VV_LOCAL_SYMBOL void array_prepend_many(array* a, voidptr val, int size); void array_delete(array* a, int i); void array_delete_many(array* a, int i, int size); void array_clear(array* a); void array_trim(array* a, int index); void array_drop(array* a, int num); VV_LOCAL_SYMBOL voidptr array_get_unsafe(array a, int i); VV_LOCAL_SYMBOL voidptr array_get(array a, int i); VV_LOCAL_SYMBOL voidptr array_get_with_check(array a, int i); voidptr array_first(array a); voidptr array_last(array a); voidptr array_pop(array* a); void array_delete_last(array* a); VV_LOCAL_SYMBOL array array_slice(array a, int start, int _end); VV_LOCAL_SYMBOL array array_slice_ni(array a, int _start, int _end); VV_LOCAL_SYMBOL array array_slice2(array a, int start, int _end, bool end_max); VV_LOCAL_SYMBOL array array_clone_static_to_depth(array a, int depth); array array_clone(array* a); array array_clone_to_depth(array* a, int depth); VV_LOCAL_SYMBOL void array_set_unsafe(array* a, int i, voidptr val); VV_LOCAL_SYMBOL void array_set(array* a, int i, voidptr val); VV_LOCAL_SYMBOL void array_push(array* a, voidptr val); void array_push_many(array* a3, voidptr val, int size); void array_reverse_in_place(array* a); array array_reverse(array a); void array_free(array* a); array array_filter(array a, bool (*predicate)(voidptr )); bool array_any(array a, bool (*predicate)(voidptr )); bool array_all(array a, bool (*predicate)(voidptr )); array array_map(array a, voidptr (*callback)(voidptr )); void array_sort(array* a, int (*callback)(voidptr , voidptr )); array array_sorted(array* a, int (*callback)(voidptr , voidptr )); void array_sort_with_compare(array* a, int (*callback)(voidptr , voidptr )); array array_sorted_with_compare(array* a, int (*callback)(voidptr , voidptr )); bool array_contains(array a, voidptr value); int array_index(array a, voidptr value); void Array_string_free(Array_string* a); string Array_string_str(Array_string a); string Array_u8_hex(Array_u8 b); int copy(Array_u8* dst, Array_u8 src); void array_grow_cap(array* a, int amount); void array_grow_len(array* a, int amount); Array_voidptr array_pointers(array a); Array_u8 voidptr_vbytes(voidptr data, int len); Array_u8 u8_vbytes(u8* data, int len); VV_LOCAL_SYMBOL array __new_array_noscan(int mylen, int cap, int elm_size); VV_LOCAL_SYMBOL array __new_array_with_default_noscan(int mylen, int cap, int elm_size, voidptr val); VV_LOCAL_SYMBOL array __new_array_with_multi_default_noscan(int mylen, int cap, int elm_size, voidptr val); VV_LOCAL_SYMBOL array __new_array_with_array_default_noscan(int mylen, int cap, int elm_size, array val, int depth); VV_LOCAL_SYMBOL void vhalt(void); VV_LOCAL_SYMBOL void v_segmentation_fault_handler(int signal_number); void _v_exit(int code); VV_LOCAL_SYMBOL string vcommithash(void); VV_LOCAL_SYMBOL void panic_debug(int line_no, string file, string mod, string fn_name, string s); void panic_option_not_set(string s); void panic_result_not_set(string s); void _v_panic(string s); string c_error_number_str(int errnum); void panic_error_number(string basestr, int errnum); void eprintln(string s); void eprint(string s); void flush_stdout(void); void flush_stderr(void); void print(string s); void println(string s); VV_LOCAL_SYMBOL void _writeln_to_fd(int fd, string s); VV_LOCAL_SYMBOL void _write_buf_to_fd(int fd, u8* buf, int buf_len); u8* _v_malloc(isize n); u8* malloc_noscan(isize n); VV_LOCAL_SYMBOL u64 __at_least_one(u64 how_many); u8* malloc_uncollectable(isize n); u8* v_realloc(u8* b, isize n); u8* realloc_data(u8* old_data, int old_size, int new_size); u8* vcalloc(isize n); u8* vcalloc_noscan(isize n); void _v_free(voidptr ptr); voidptr memdup(voidptr src, int sz); voidptr memdup_noscan(voidptr src, int sz); voidptr memdup_uncollectable(voidptr src, int sz); GCHeapUsage gc_heap_usage(void); usize gc_memory_use(void); VV_LOCAL_SYMBOL int v_fixed_index(int i, int len); void print_backtrace(void); bool isnil(voidptr v); VV_LOCAL_SYMBOL voidptr __as_cast(voidptr obj, int obj_type, int expected_type); void VAssertMetaInfo_free(VAssertMetaInfo* ami); VV_LOCAL_SYMBOL void __print_assert_failure(VAssertMetaInfo* i); VV_LOCAL_SYMBOL void builtin_init(void); VV_LOCAL_SYMBOL bool print_backtrace_skipping_top_frames(int xskipframes); VV_LOCAL_SYMBOL bool print_backtrace_skipping_top_frames_bsd(int skipframes); VV_LOCAL_SYMBOL bool print_backtrace_skipping_top_frames_linux(int skipframes); VV_LOCAL_SYMBOL void break_if_debugger_attached(void); string winapi_lasterr_str(void); void panic_lasterr(void); void gc_check_leaks(void); VV_LOCAL_SYMBOL void print_libbacktrace(int frames_to_skip); VV_LOCAL_SYMBOL void eprint_libbacktrace(int frames_to_skip); int proc_pidpath(int , voidptr , int ); int vstrlen(byte* s); int vstrlen_char(char* s); voidptr vmemcpy(voidptr dest, const voidptr const_src, isize n); voidptr vmemmove(voidptr dest, const voidptr const_src, isize n); int vmemcmp(const voidptr const_s1, const voidptr const_s2, isize n); voidptr vmemset(voidptr s, int c, isize n); VV_LOCAL_SYMBOL void vqsort(voidptr base, usize nmemb, usize size, int (*sort_cb)(const voidptr const_a, const voidptr const_b)); void chan_close(chan ch); ChanState chan_try_pop(chan ch, voidptr obj); ChanState chan_try_push(chan ch, voidptr obj); string f64_str(f64 x); string f64_strg(f64 x); string float_literal_str(float_literal d); string f64_strsci(f64 x, int digit_num); string f64_strlong(f64 x); string f32_str(f32 x); string f32_strg(f32 x); string f32_strsci(f32 x, int digit_num); string f32_strlong(f32 x); f32 f32_abs(f32 a); VV_LOCAL_SYMBOL f64 f64_abs(f64 a); f32 f32_max(f32 a, f32 b); f32 f32_min(f32 a, f32 b); f64 f64_max(f64 a, f64 b); VV_LOCAL_SYMBOL f64 f64_min(f64 a, f64 b); bool f32_eq_epsilon(f32 a, f32 b); bool f64_eq_epsilon(f64 a, f64 b); VV_LOCAL_SYMBOL void float_test(void); string ptr_str(voidptr ptr); string isize_str(isize x); string usize_str(usize x); string char_str(char* cptr); VV_LOCAL_SYMBOL string int_str_l(int nn, int max); string i8_str(i8 n); string i16_str(i16 n); string u16_str(u16 n); string int_str(int n); string u32_str(u32 nn); string int_literal_str(int_literal n); string i64_str(i64 nn); string u64_str(u64 nn); string bool_str(bool b); VV_LOCAL_SYMBOL string u64_to_hex(u64 nn, u8 len); VV_LOCAL_SYMBOL string u64_to_hex_no_leading_zeros(u64 nn, u8 len); string u8_hex(u8 nn); string i8_hex(i8 nn); string u16_hex(u16 nn); string i16_hex(i16 nn); string u32_hex(u32 nn); string int_hex(int nn); string int_hex2(int n); string u64_hex(u64 nn); string i64_hex(i64 nn); string int_literal_hex(int_literal nn); string voidptr_str(voidptr nn); string byteptr_str(byteptr nn); string charptr_str(charptr nn); string u8_hex_full(u8 nn); string i8_hex_full(i8 nn); string u16_hex_full(u16 nn); string i16_hex_full(i16 nn); string u32_hex_full(u32 nn); string int_hex_full(int nn); string i64_hex_full(i64 nn); string voidptr_hex_full(voidptr nn); string int_literal_hex_full(int_literal nn); string u64_hex_full(u64 nn); string u8_str(u8 b); string u8_ascii_str(u8 b); string u8_str_escaped(u8 b); bool u8_is_capital(u8 c); Array_u8 Array_u8_clone(Array_u8 b); string Array_u8_bytestr(Array_u8 b); _result_rune Array_u8_byterune(Array_u8 b); string u8_repeat(u8 b, int count); VV_LOCAL_SYMBOL string _Atomic__int_str(int x); VV_LOCAL_SYMBOL bool fast_string_eq(string a, string b); VV_LOCAL_SYMBOL u64 map_hash_string(voidptr pkey); VV_LOCAL_SYMBOL u64 map_hash_int_1(voidptr pkey); VV_LOCAL_SYMBOL u64 map_hash_int_2(voidptr pkey); VV_LOCAL_SYMBOL u64 map_hash_int_4(voidptr pkey); VV_LOCAL_SYMBOL u64 map_hash_int_8(voidptr pkey); VV_LOCAL_SYMBOL void DenseArray_zeros_to_end(DenseArray* d); VV_LOCAL_SYMBOL DenseArray new_dense_array(int key_bytes, int value_bytes); VV_LOCAL_SYMBOL voidptr DenseArray_key(DenseArray* d, int i); VV_LOCAL_SYMBOL voidptr DenseArray_value(DenseArray* d, int i); VV_LOCAL_SYMBOL bool DenseArray_has_index(DenseArray* d, int i); VV_LOCAL_SYMBOL int DenseArray_expand(DenseArray* d); VV_LOCAL_SYMBOL bool map_eq_string(voidptr a, voidptr b); VV_LOCAL_SYMBOL bool map_eq_int_1(voidptr a, voidptr b); VV_LOCAL_SYMBOL bool map_eq_int_2(voidptr a, voidptr b); VV_LOCAL_SYMBOL bool map_eq_int_4(voidptr a, voidptr b); VV_LOCAL_SYMBOL bool map_eq_int_8(voidptr a, voidptr b); VV_LOCAL_SYMBOL void map_clone_string(voidptr dest, voidptr pkey); VV_LOCAL_SYMBOL void map_clone_int_1(voidptr dest, voidptr pkey); VV_LOCAL_SYMBOL void map_clone_int_2(voidptr dest, voidptr pkey); VV_LOCAL_SYMBOL void map_clone_int_4(voidptr dest, voidptr pkey); VV_LOCAL_SYMBOL void map_clone_int_8(voidptr dest, voidptr pkey); VV_LOCAL_SYMBOL void map_free_string(voidptr pkey); VV_LOCAL_SYMBOL void map_free_nop(voidptr _d1); VV_LOCAL_SYMBOL map new_map(int key_bytes, int value_bytes, u64 (*hash_fn)(voidptr ), bool (*key_eq_fn)(voidptr , voidptr ), void (*clone_fn)(voidptr , voidptr ), void (*free_fn)(voidptr )); VV_LOCAL_SYMBOL map new_map_init(u64 (*hash_fn)(voidptr ), bool (*key_eq_fn)(voidptr , voidptr ), void (*clone_fn)(voidptr , voidptr ), void (*free_fn)(voidptr ), int n, int key_bytes, int value_bytes, voidptr keys, voidptr values); map map_move(map* m); void map_clear(map* m); VV_LOCAL_SYMBOL multi_return_u32_u32 map_key_to_index(map* m, voidptr pkey); VV_LOCAL_SYMBOL multi_return_u32_u32 map_meta_less(map* m, u32 _index, u32 _metas); VV_LOCAL_SYMBOL void map_meta_greater(map* m, u32 _index, u32 _metas, u32 kvi); VV_LOCAL_SYMBOL void map_ensure_extra_metas(map* m, u32 probe_count); VV_LOCAL_SYMBOL void map_set(map* m, voidptr key, voidptr value); VV_LOCAL_SYMBOL void map_expand(map* m); VV_LOCAL_SYMBOL void map_rehash(map* m); void map_reserve(map* m, u32 meta_bytes); VV_LOCAL_SYMBOL void map_cached_rehash(map* m, u32 old_cap); VV_LOCAL_SYMBOL voidptr map_get_and_set(map* m, voidptr key, voidptr zero); VV_LOCAL_SYMBOL voidptr map_get(map* m, voidptr key, voidptr zero); VV_LOCAL_SYMBOL voidptr map_get_check(map* m, voidptr key); VV_LOCAL_SYMBOL bool map_exists(map* m, voidptr key); VV_LOCAL_SYMBOL void DenseArray_delete(DenseArray* d, int i); void map_delete(map* m, voidptr key); array map_keys(map* m); array map_values(map* m); VV_LOCAL_SYMBOL DenseArray DenseArray_clone(DenseArray* d); map map_clone(map* m); void map_free(map* m); void IError_free(IError* ie); string IError_str(IError err); string Error_msg(Error err); int Error_code(Error err); string MessageError_msg(MessageError err); int MessageError_code(MessageError err); void MessageError_free(MessageError* err); VV_LOCAL_SYMBOL string None___str(None__ _d1); IError _v_error(string message); IError error_with_code(string message, int code); VV_LOCAL_SYMBOL void _option_none(voidptr data, _option* option, int size); VV_LOCAL_SYMBOL void _option_ok(voidptr data, _option* option, int size); VV_LOCAL_SYMBOL void _result_ok(voidptr data, _result* res, int size); string none_str(none _d2); VV_LOCAL_SYMBOL VMemoryBlock* vmemory_block_new(VMemoryBlock* prev, isize at_least); VV_LOCAL_SYMBOL u8* vmemory_block_malloc(isize n); VV_LOCAL_SYMBOL void prealloc_vinit(void); VV_LOCAL_SYMBOL void prealloc_vcleanup(void); VV_LOCAL_SYMBOL u8* prealloc_malloc(isize n); VV_LOCAL_SYMBOL u8* prealloc_realloc(u8* old_data, isize old_size, isize new_size); VV_LOCAL_SYMBOL u8* prealloc_calloc(isize n); string rune_str(rune c); string Array_rune_string(Array_rune ra); string rune_repeat(rune c, int count); Array_u8 rune_bytes(rune c); int rune_length_in_bytes(rune c); VV_LOCAL_SYMBOL SortedMap new_sorted_map(int n, int value_bytes); VV_LOCAL_SYMBOL SortedMap new_sorted_map_init(int n, int value_bytes, string* keys, voidptr values); VV_LOCAL_SYMBOL mapnode* new_node(void); VV_LOCAL_SYMBOL void SortedMap_set(SortedMap* m, string key, voidptr value); VV_LOCAL_SYMBOL void mapnode_split_child(mapnode* n, int child_index, mapnode* y); VV_LOCAL_SYMBOL bool SortedMap_get(SortedMap m, string key, voidptr out); VV_LOCAL_SYMBOL bool SortedMap_exists(SortedMap m, string key); VV_LOCAL_SYMBOL int mapnode_find_key(mapnode* n, string k); VV_LOCAL_SYMBOL bool mapnode_remove_key(mapnode* n, string k); VV_LOCAL_SYMBOL void mapnode_remove_from_leaf(mapnode* n, int idx); VV_LOCAL_SYMBOL void mapnode_remove_from_non_leaf(mapnode* n, int idx); VV_LOCAL_SYMBOL void mapnode_fill(mapnode* n, int idx); VV_LOCAL_SYMBOL void mapnode_borrow_from_prev(mapnode* n, int idx); VV_LOCAL_SYMBOL void mapnode_borrow_from_next(mapnode* n, int idx); VV_LOCAL_SYMBOL void mapnode_merge(mapnode* n, int idx); void SortedMap_delete(SortedMap* m, string key); VV_LOCAL_SYMBOL int mapnode_subkeys(mapnode* n, Array_string* keys, int at); Array_string SortedMap_keys(SortedMap* m); VV_LOCAL_SYMBOL void mapnode_free(mapnode* n); void SortedMap_free(SortedMap* m); void SortedMap_print(SortedMap m); Array_rune string_runes(string s); string cstring_to_vstring(char* s); string tos_clone(u8* s); string tos(u8* s, int len); string tos2(u8* s); string tos3(char* s); string tos4(u8* s); string tos5(char* s); string u8_vstring(u8* bp); string u8_vstring_with_len(u8* bp, int len); string char_vstring(char* cp); string char_vstring_with_len(char* cp, int len); string u8_vstring_literal(u8* bp); string u8_vstring_literal_with_len(u8* bp, int len); string char_vstring_literal(char* cp); string char_vstring_literal_with_len(char* cp, int len); int string_len_utf8(string s); VV_LOCAL_SYMBOL string string_clone_static(string a); string string_clone(string a); string string_replace_once(string s, string rep, string with); string string_replace(string s, string rep, string with); string string_replace_each(string s, Array_string vals); VV_LOCAL_SYMBOL int compare_2018276881664952276_RepIndex_by_idx(RepIndex* a, RepIndex* b) { if (a->idx < b->idx) return -1; else return 1; } string string_replace_char(string s, u8 rep, u8 with, int repeat); string string_normalize_tabs(string s, int tab_len); bool string_bool(string s); int string_int(string s); i64 string_i64(string s); i8 string_i8(string s); i16 string_i16(string s); f32 string_f32(string s); f64 string_f64(string s); u8 string_u8(string s); u16 string_u16(string s); u32 string_u32(string s); u64 string_u64(string s); _result_u64 string_parse_uint(string s, int _base, int _bit_size); _result_i64 string_parse_int(string s, int _base, int _bit_size); VV_LOCAL_SYMBOL bool string__eq(string s, string a); int string_compare(string s, string a); VV_LOCAL_SYMBOL bool string__lt(string s, string a); VV_LOCAL_SYMBOL string string__plus(string s, string a); Array_string string_split_any(string s, string delim); Array_string string_rsplit_any(string s, string delim); Array_string string_split(string s, string delim); Array_string string_rsplit(string s, string delim); _option_multi_return_string_string string_split_once(string s, string delim); _option_multi_return_string_string string_rsplit_once(string s, string delim); Array_string string_split_nth(string s, string delim, int nth); Array_string string_rsplit_nth(string s, string delim, int nth); Array_string string_split_into_lines(string s); VV_LOCAL_SYMBOL string string_substr2(string s, int start, int _end, bool end_max); string string_substr(string s, int start, int end); _result_string string_substr_with_check(string s, int start, int end); string string_substr_ni(string s, int _start, int _end); VV_LOCAL_SYMBOL int string_index_(string s, string p); _option_int string_index(string s, string p); VV_LOCAL_SYMBOL int string_index_kmp(string s, string p); int string_index_any(string s, string chars); VV_LOCAL_SYMBOL int string_last_index_(string s, string p); _option_int string_last_index(string s, string p); int string_index_after(string s, string p, int start); int string_index_u8(string s, u8 c); int string_last_index_u8(string s, u8 c); int string_count(string s, string substr); bool string_contains_u8(string s, u8 x); bool string_contains(string s, string substr); bool string_contains_any(string s, string chars); bool string_contains_only(string s, string chars); bool string_contains_any_substr(string s, Array_string substrs); bool string_starts_with(string s, string p); bool string_ends_with(string s, string p); string string_to_lower(string s); bool string_is_lower(string s); string string_to_upper(string s); bool string_is_upper(string s); string string_capitalize(string s); bool string_is_capital(string s); bool string_starts_with_capital(string s); string string_title(string s); bool string_is_title(string s); string string_find_between(string s, string start, string end); string string_trim_space(string s); string string_trim(string s, string cutset); multi_return_int_int string_trim_indexes(string s, string cutset); string string_trim_left(string s, string cutset); string string_trim_right(string s, string cutset); string string_trim_string_left(string s, string str); string string_trim_string_right(string s, string str); int compare_strings(string* a, string* b); VV_LOCAL_SYMBOL int compare_strings_by_len(string* a, string* b); VV_LOCAL_SYMBOL int compare_lower_strings(string* a, string* b); void Array_string_sort_ignore_case(Array_string* s); void Array_string_sort_by_len(Array_string* s); string string_str(string s); VV_LOCAL_SYMBOL byte string_at(string s, int idx); VV_LOCAL_SYMBOL _option_u8 string_at_with_check(string s, int idx); bool u8_is_space(u8 c); bool u8_is_digit(u8 c); bool u8_is_hex_digit(u8 c); bool u8_is_oct_digit(u8 c); bool u8_is_bin_digit(u8 c); bool u8_is_letter(u8 c); bool u8_is_alnum(u8 c); void string_free(string* s); string string_before(string s, string sub); string string_all_before(string s, string sub); string string_all_before_last(string s, string sub); string string_all_after(string s, string sub); string string_all_after_last(string s, string sub); string string_all_after_first(string s, string sub); string string_after(string s, string sub); string string_after_char(string s, u8 sub); string Array_string_join(Array_string a, string sep); string Array_string_join_lines(Array_string s); string string_reverse(string s); string string_limit(string s, int max); int string_hash(string s); Array_u8 string_bytes(string s); string string_repeat(string s, int count); Array_string string_fields(string s); string string_strip_margin(string s); string string_strip_margin_custom(string s, u8 del); string string_trim_indent(string s); int string_indent_width(string s); bool string_is_blank(string s); bool string_match_glob(string name, string pattern); bool string_is_ascii(string s); Array_u8 byteptr_vbytes(byteptr data, int len); string byteptr_vstring(byteptr bp); string byteptr_vstring_with_len(byteptr bp, int len); string charptr_vstring(charptr cp); string charptr_vstring_with_len(charptr cp, int len); string byteptr_vstring_literal(byteptr bp); string byteptr_vstring_literal_with_len(byteptr bp, int len); string charptr_vstring_literal(charptr cp); string charptr_vstring_literal_with_len(charptr cp, int len); string StrIntpType_str(StrIntpType x); VV_LOCAL_SYMBOL f32 fabs32(f32 x); VV_LOCAL_SYMBOL f64 fabs64(f64 x); VV_LOCAL_SYMBOL u64 abs64(i64 x); u64 get_str_intp_u64_format(StrIntpType fmt_type, int in_width, int in_precision, bool in_tail_zeros, bool in_sign, byte in_pad_ch, int in_base, bool in_upper_case); u32 get_str_intp_u32_format(StrIntpType fmt_type, int in_width, int in_precision, bool in_tail_zeros, bool in_sign, byte in_pad_ch, int in_base, bool in_upper_case); VV_LOCAL_SYMBOL void StrIntpData_process_str_intp_data(StrIntpData* data, strings__Builder* sb); string str_intp(int data_len, StrIntpData* input_base); string str_intp_sq(string in_str); string str_intp_rune(string in_str); string str_intp_g32(string in_str); string str_intp_g64(string in_str); string str_intp_sub(string base_str, string in_str); u16* string_to_wide(string _str); string string_from_wide(u16* _wstr); string string_from_wide2(u16* _wstr, int len); int utf8_char_len(u8 b); string utf32_to_str(u32 code); string utf32_to_str_no_malloc(u32 code, u8* buf); int utf32_decode_to_buffer(u32 code, u8* buf); int string_utf32_code(string _rune); _result_rune Array_u8_utf8_to_utf32(Array_u8 _bytes); int utf8_str_visible_length(string s); bool ArrayFlags_is_empty(ArrayFlags* e); bool ArrayFlags_has(ArrayFlags* e, ArrayFlags flag); bool ArrayFlags_all(ArrayFlags* e, ArrayFlags flag); void ArrayFlags_set(ArrayFlags* e, ArrayFlags flag); void ArrayFlags_clear(ArrayFlags* e, ArrayFlags flag); void ArrayFlags_toggle(ArrayFlags* e, ArrayFlags flag); strings__textscanner__TextScanner strings__textscanner__new(string input); void strings__textscanner__TextScanner_free(strings__textscanner__TextScanner* ss); int strings__textscanner__TextScanner_remaining(strings__textscanner__TextScanner* ss); int strings__textscanner__TextScanner_next(strings__textscanner__TextScanner* ss); void strings__textscanner__TextScanner_skip(strings__textscanner__TextScanner* ss); void strings__textscanner__TextScanner_skip_n(strings__textscanner__TextScanner* ss, int n); int strings__textscanner__TextScanner_peek(strings__textscanner__TextScanner* ss); int strings__textscanner__TextScanner_peek_n(strings__textscanner__TextScanner* ss, int n); void strings__textscanner__TextScanner_back(strings__textscanner__TextScanner* ss); void strings__textscanner__TextScanner_back_n(strings__textscanner__TextScanner* ss, int n); int strings__textscanner__TextScanner_peek_back(strings__textscanner__TextScanner* ss); int strings__textscanner__TextScanner_peek_back_n(strings__textscanner__TextScanner* ss, int n); int strings__textscanner__TextScanner_current(strings__textscanner__TextScanner* ss); void strings__textscanner__TextScanner_reset(strings__textscanner__TextScanner* ss); void strings__textscanner__TextScanner_goto_end(strings__textscanner__TextScanner* ss); term__termios__TcFlag term__termios__flag(int value); term__termios__TcFlag term__termios__invert(term__termios__TcFlag value); int term__termios__tcgetattr(int fd, term__termios__Termios* termios_p); int term__termios__tcsetattr(int fd, int optional_actions, term__termios__Termios* termios_p); int term__termios__ioctl(int fd, u64 request, voidptr arg); int term__termios__set_state(int fd, term__termios__Termios new_state); void term__termios__Termios_disable_echo(term__termios__Termios* t); Array_string os__cmdline__options(Array_string args, string param); string os__cmdline__option(Array_string args, string param, string def); Array_string os__cmdline__options_before(Array_string args, Array_string what); Array_string os__cmdline__options_after(Array_string args, Array_string what); Array_string os__cmdline__only_non_options(Array_string args); Array_string os__cmdline__only_options(Array_string args); int v__token__KeywordsMatcherTrie_find(v__token__KeywordsMatcherTrie* km, string word); bool v__token__KeywordsMatcherTrie_matches(v__token__KeywordsMatcherTrie* km, string word); void v__token__KeywordsMatcherTrie_add_word(v__token__KeywordsMatcherTrie* km, string word, int value); v__token__KeywordsMatcherTrie v__token__KeywordsMatcherTrie__static__new(int cap); v__token__KeywordsMatcherTrie v__token__new_keywords_matcher_trie_T_int(Map_string_int kw_map); v__token__KeywordsMatcherTrie v__token__new_keywords_matcher_trie_T_v__token__Kind(Map_string_v__token__Kind kw_map); v__token__KeywordsMatcherTrie v__token__new_keywords_matcher_from_array_trie(Array_string names); v__token__TrieNode* v__token__new_trie_node(void); void v__token__TrieNode_show(v__token__TrieNode* node, int level); void v__token__TrieNode_add_word(v__token__TrieNode* node, string word, int value, int word_idx); int v__token__TrieNode_find(v__token__TrieNode* root, string word); void v__token__Pos_free(v__token__Pos* p); string v__token__Pos_line_str(v__token__Pos p); v__token__Pos v__token__Pos_extend(v__token__Pos pos, v__token__Pos end); v__token__Pos v__token__Pos_extend_with_last_line(v__token__Pos pos, v__token__Pos end, int last_line); void v__token__Pos_update_last_line(v__token__Pos* pos, int last_line); v__token__Pos v__token__Token_pos(v__token__Token* tok); VV_LOCAL_SYMBOL Map_string_v__token__Kind v__token__build_keys(void); VV_LOCAL_SYMBOL Array_string v__token__build_token_str(void); bool v__token__is_key(string key); bool v__token__is_decl(v__token__Kind t); bool v__token__Kind_is_assign(v__token__Kind t); string v__token__Kind_str(v__token__Kind t); bool v__token__Token_is_next_to(v__token__Token t, v__token__Token pre_token); string v__token__Token_str(v__token__Token t); string v__token__Token_debug(v__token__Token t); Array_v__token__Precedence v__token__build_precedences(void); int v__token__Token_precedence(v__token__Token tok); int v__token__Kind_precedence(v__token__Kind kind); bool v__token__Token_is_scalar(v__token__Token tok); bool v__token__Token_is_unary(v__token__Token tok); bool v__token__Kind_is_relational(v__token__Kind tok); bool v__token__Kind_is_start_of_type(v__token__Kind k); bool v__token__Kind_is_prefix(v__token__Kind kind); bool v__token__Kind_is_infix(v__token__Kind kind); bool v__token__Kind_is_postfix(v__token__Kind kind); string v__token__kind_to_string(v__token__Kind k); _result_v__token__Kind v__token__kind_from_string(string s); v__token__Kind v__token__assign_op_to_infix_op(v__token__Kind op); int v__mathutil__min_T_int(int a, int b); int v__mathutil__max_T_int(int a, int b); i64 time__portable_timegm(struct tm* t); int time__days_from_unix_epoch(int year, int month, int day); int time__Time_days_from_unix_epoch(time__Time t); time__Time time__date_from_days_after_unix_epoch(int days); VV_LOCAL_SYMBOL time__DateTimeParser time__new_date_time_parser(string datetime, string format); VV_LOCAL_SYMBOL _result_string time__DateTimeParser_next(time__DateTimeParser* p, int length); VV_LOCAL_SYMBOL _result_string time__DateTimeParser_peek(time__DateTimeParser* p, int length); VV_LOCAL_SYMBOL _result_int time__DateTimeParser_must_be_int(time__DateTimeParser* p, int length); VV_LOCAL_SYMBOL _result_int time__DateTimeParser_must_be_int_with_minimum_length(time__DateTimeParser* p, int min, int max, bool allow_leading_zero); VV_LOCAL_SYMBOL _result_void time__DateTimeParser_must_be_string(time__DateTimeParser* p, string must); VV_LOCAL_SYMBOL _result_string time__DateTimeParser_must_be_string_one_of(time__DateTimeParser* p, Array_string oneof); VV_LOCAL_SYMBOL _result_int time__DateTimeParser_must_be_valid_month(time__DateTimeParser* p); VV_LOCAL_SYMBOL _result_int time__DateTimeParser_must_be_valid_three_letter_month(time__DateTimeParser* p); VV_LOCAL_SYMBOL _result_string time__DateTimeParser_must_be_valid_week_day(time__DateTimeParser* p, int letters); VV_LOCAL_SYMBOL _result_Array_string time__extract_tokens(string s); VV_LOCAL_SYMBOL _result_time__Time time__DateTimeParser_parse(time__DateTimeParser* p); string time__Time_format(time__Time t); string time__Time_format_ss(time__Time t); string time__Time_format_ss_milli(time__Time t); string time__Time_format_ss_micro(time__Time t); string time__Time_format_ss_nano(time__Time t); string time__Time_format_rfc3339(time__Time t); string time__Time_format_rfc3339_nano(time__Time t); string time__Time_hhmm(time__Time t); string time__Time_hhmmss(time__Time t); string time__Time_hhmm12(time__Time t); string time__Time_ymmdd(time__Time t); string time__Time_ddmmy(time__Time t); string time__Time_md(time__Time t); VV_LOCAL_SYMBOL string time__ordinal_suffix(int n); string time__Time_custom_format(time__Time t, string s); string time__Time_clean(time__Time t); string time__Time_clean12(time__Time t); string time__Time_get_fmt_time_str(time__Time t, time__FormatTime fmt_time); string time__Time_get_fmt_date_str(time__Time t, time__FormatDelimiter fmt_dlmtr, time__FormatDate fmt_date); string time__Time_get_fmt_str(time__Time t, time__FormatDelimiter fmt_dlmtr, time__FormatTime fmt_time, time__FormatDate fmt_date); string time__Time_utc_string(time__Time t); VV_LOCAL_SYMBOL f64 time__mceil(f64 x); bool time__Time__eq(time__Time t1, time__Time t2); bool time__Time__lt(time__Time t1, time__Time t2); time__Duration time__Time__minus(time__Time lhs, time__Time rhs); _result_time__Time time__parse_rfc3339(string s); _result_time__Time time__parse(string s); _result_time__Time time__parse_format(string s, string format); _result_time__Time time__parse_iso8601(string s); _result_time__Time time__parse_rfc2822(string s); VV_LOCAL_SYMBOL _result_multi_return_int_int_int time__parse_iso8601_date(string s); VV_LOCAL_SYMBOL _result_multi_return_int_int_int_int_int_i64_bool time__parse_iso8601_time(string s); string time__TimeParseError_msg(time__TimeParseError err); VV_LOCAL_SYMBOL IError time__error_invalid_time(int code, string message); time__StopWatch time__new_stopwatch(time__StopWatchOptions opts); void time__StopWatch_start(time__StopWatch* t); void time__StopWatch_restart(time__StopWatch* t); void time__StopWatch_stop(time__StopWatch* t); void time__StopWatch_pause(time__StopWatch* t); time__Duration time__StopWatch_elapsed(time__StopWatch t); time__Time time__now(void); time__Time time__utc(void); time__Time time__new_time(time__Time t); i64 time__ticks(void); string time__Time_str(time__Time t); VV_LOCAL_SYMBOL time__Time time__convert_ctime(struct tm t, int nanosecond); string time__Time_strftime(time__Time t, string fmt); int time__Duration_sys_milliseconds(time__Duration d); time__Time time__Time__static__new(time__Time t); string time__Time_smonth(time__Time* t); i64 time__Time_unix_time(time__Time* t); i64 time__Time_unix_time_milli(time__Time* t); i64 time__Time_unix_time_micro(time__Time* t); i64 time__Time_unix_time_nano(time__Time* t); time__Time time__Time_add(time__Time* t, time__Duration d); time__Time time__Time_add_seconds(time__Time* t, int seconds); time__Time time__Time_add_days(time__Time* t, int days); time__Duration time__since(time__Time t); string time__Time_relative(time__Time* t); string time__Time_relative_short(time__Time* t); int time__day_of_week(int y, int m, int d); int time__Time_day_of_week(time__Time* t); int time__Time_year_day(time__Time* t); string time__Time_weekday_str(time__Time* t); string time__Time_long_weekday_str(time__Time* t); bool time__is_leap_year(int year); _result_int time__days_in_month(int month, int year); string time__Time_debug(time__Time* t); i64 time__Duration_nanoseconds(time__Duration d); i64 time__Duration_microseconds(time__Duration d); i64 time__Duration_milliseconds(time__Duration d); f64 time__Duration_seconds(time__Duration d); f64 time__Duration_minutes(time__Duration d); f64 time__Duration_hours(time__Duration d); f64 time__Duration_days(time__Duration d); string time__Duration_str(time__Duration d); string time__Duration_debug(time__Duration d); int time__offset(void); time__Time time__Time_local_to_utc(time__Time* t); time__Time time__Time_utc_to_local(time__Time* u); time__Time time__Time_as_local(time__Time* t); time__Time time__Time_as_utc(time__Time* t); bool time__Time_is_utc(time__Time* t); VV_LOCAL_SYMBOL u64 time__sys_mono_now_darwin(void); VV_LOCAL_SYMBOL time__Time time__darwin_now(void); VV_LOCAL_SYMBOL time__Time time__solaris_now(void); VV_LOCAL_SYMBOL time__Time time__darwin_utc(void); VV_LOCAL_SYMBOL time__Time time__solaris_utc(void); VV_LOCAL_SYMBOL i64 time__make_unix_time(struct tm t); time__Time time__Time_local(time__Time* t); u64 time__sys_mono_now(void); VV_LOCAL_SYMBOL u64 time__vpc_now(void); VV_LOCAL_SYMBOL time__Time time__linux_now(void); VV_LOCAL_SYMBOL time__Time time__linux_utc(void); VV_LOCAL_SYMBOL time__Time time__win_now(void); VV_LOCAL_SYMBOL time__Time time__win_utc(void); struct timespec time__Duration_timespec(time__Duration d); void time__sleep(time__Duration duration); time__Time time__unix(i64 abs); time__Time time__unix2(i64 abs, int microsecond); time__Time time__unix_microsecond(i64 abs, int microsecond); time__Time time__unix_nanosecond(i64 abs, int nanosecond); VV_LOCAL_SYMBOL multi_return_int_int_int time__calculate_date_from_offset(i64 day_offset_); VV_LOCAL_SYMBOL multi_return_int_int_int time__calculate_time_from_offset(i64 second_offset_); void v__dotgraph__start_digraph(void); VV_LOCAL_SYMBOL void anon_fn_40181cb3d9c4559e__82(void); v__dotgraph__DotGraph* v__dotgraph__new(string name, string label, string color); void v__dotgraph__DotGraph_writeln(v__dotgraph__DotGraph* d, string line); void v__dotgraph__DotGraph_finish(v__dotgraph__DotGraph* d); void v__dotgraph__DotGraph_new_node(v__dotgraph__DotGraph* d, string nlabel, v__dotgraph__NewNodeConfig cfg); void v__dotgraph__DotGraph_new_edge(v__dotgraph__DotGraph* d, string source, string target, v__dotgraph__NewEdgeConfig cfg); string v__dotgraph__node_name(string name, voidptr context); u64 hash__wyhash_c(u8* key, u64 len, u64 seed); u64 hash__wyhash64_c(u64 a, u64 b); u64 hash__sum64_string(string key, u64 seed); u64 hash__sum64(Array_u8 key, u64 seed); VV_LOCAL_SYMBOL u64 hash__wyrotr(u64 v, u32 k); u64 hash__wymum(u64 a, u64 b); VV_LOCAL_SYMBOL u64 hash__wyr3(u8* p, u64 k); VV_LOCAL_SYMBOL u64 hash__wyr4(u8* p); VV_LOCAL_SYMBOL u64 hash__wyr8(u8* p); u32 hash__fnv1a__sum32_string(string data); u32 hash__fnv1a__sum32(Array_u8 data); u32 hash__fnv1a__sum32_bytes(u8* data, int data_len); u64 hash__fnv1a__sum64_string(string data); u64 hash__fnv1a__sum64(Array_u8 data); u64 hash__fnv1a__sum64_bytes(u8* data, int data_len); u64 sync__stdatomic__add_u64(u64* ptr, int delta); u64 sync__stdatomic__sub_u64(u64* ptr, int delta); i64 sync__stdatomic__add_i64(i64* ptr, int delta); i64 sync__stdatomic__sub_i64(i64* ptr, int delta); void sync__stdatomic__store_u64(u64* ptr, u64 val); u64 sync__stdatomic__load_u64(u64* ptr); void sync__stdatomic__store_i64(i64* ptr, i64 val); i64 sync__stdatomic__load_i64(i64* ptr); VV_LOCAL_SYMBOL string flag__UnknownFlagError_msg(flag__UnknownFlagError err); VV_LOCAL_SYMBOL string flag__ArgsCountError_msg(flag__ArgsCountError err); VV_LOCAL_SYMBOL void flag__Flag_free(flag__Flag* f); string flag__Flag_str(flag__Flag f); string Array_flag__Flag_str(Array_flag__Flag af); VV_LOCAL_SYMBOL void flag__FlagParser_free(flag__FlagParser* f); flag__FlagParser* flag__new_flag_parser(Array_string args); void flag__FlagParser_usage_example(flag__FlagParser* fs, string example); void flag__FlagParser_footer(flag__FlagParser* fs, string footer); void flag__FlagParser_application(flag__FlagParser* fs, string name); void flag__FlagParser_version(flag__FlagParser* fs, string vers); void flag__FlagParser_description(flag__FlagParser* fs, string desc); void flag__FlagParser_skip_executable(flag__FlagParser* fs); void flag__FlagParser_allow_unknown_args(flag__FlagParser* fs); VV_LOCAL_SYMBOL void flag__FlagParser_add_flag(flag__FlagParser* fs, string name, u8 abbr, string usage, string desc); VV_LOCAL_SYMBOL Array_string flag__FlagParser_parse_value(flag__FlagParser* fs, string longhand, u8 shorthand); VV_LOCAL_SYMBOL _result_string flag__FlagParser_parse_bool_value(flag__FlagParser* fs, string longhand, u8 shorthand); _result_bool flag__FlagParser_bool_opt(flag__FlagParser* fs, string name, u8 abbr, string usage); bool flag__FlagParser_bool(flag__FlagParser* fs, string name, u8 abbr, bool bdefault, string usage); Array_int flag__FlagParser_int_multi(flag__FlagParser* fs, string name, u8 abbr, string usage); _result_int flag__FlagParser_int_opt(flag__FlagParser* fs, string name, u8 abbr, string usage); int flag__FlagParser_int(flag__FlagParser* fs, string name, u8 abbr, int idefault, string usage); Array_f64 flag__FlagParser_float_multi(flag__FlagParser* fs, string name, u8 abbr, string usage); _result_f64 flag__FlagParser_float_opt(flag__FlagParser* fs, string name, u8 abbr, string usage); f64 flag__FlagParser_float(flag__FlagParser* fs, string name, u8 abbr, f64 fdefault, string usage); Array_string flag__FlagParser_string_multi(flag__FlagParser* fs, string name, u8 abbr, string usage); _result_string flag__FlagParser_string_opt(flag__FlagParser* fs, string name, u8 abbr, string usage); string flag__FlagParser_string(flag__FlagParser* fs, string name, u8 abbr, string sdefault, string usage); _result_void flag__FlagParser_limit_free_args_to_at_least(flag__FlagParser* fs, int n); _result_void flag__FlagParser_limit_free_args_to_exactly(flag__FlagParser* fs, int n); _result_void flag__FlagParser_limit_free_args(flag__FlagParser* fs, int min, int max); void flag__FlagParser_arguments_description(flag__FlagParser* fs, string description); string flag__FlagParser_usage(flag__FlagParser* fs); VV_LOCAL_SYMBOL _result_flag__Flag flag__FlagParser_find_existing_flag(flag__FlagParser* fs, string fname); VV_LOCAL_SYMBOL void flag__FlagParser_handle_builtin_options(flag__FlagParser* fs); _result_Array_string flag__FlagParser_finalize(flag__FlagParser* fs); Array_string flag__FlagParser_remaining_parameters(flag__FlagParser* fs); VV_LOCAL_SYMBOL bool semver__version_satisfies(semver__Version ver, string input); VV_LOCAL_SYMBOL bool semver__compare_eq(semver__Version v1, semver__Version v2); VV_LOCAL_SYMBOL bool semver__compare_gt(semver__Version v1, semver__Version v2); VV_LOCAL_SYMBOL bool semver__compare_lt(semver__Version v1, semver__Version v2); VV_LOCAL_SYMBOL bool semver__compare_ge(semver__Version v1, semver__Version v2); VV_LOCAL_SYMBOL bool semver__compare_le(semver__Version v1, semver__Version v2); VV_LOCAL_SYMBOL semver__RawVersion semver__parse(string input); VV_LOCAL_SYMBOL bool semver__RawVersion_is_valid(semver__RawVersion ver); VV_LOCAL_SYMBOL bool semver__RawVersion_is_missing(semver__RawVersion ver, int typ); VV_LOCAL_SYMBOL _result_semver__Version semver__RawVersion_coerce(semver__RawVersion raw_ver); VV_LOCAL_SYMBOL semver__RawVersion semver__RawVersion_complete(semver__RawVersion raw_ver); VV_LOCAL_SYMBOL _option_semver__Version semver__RawVersion_validate(semver__RawVersion raw_ver); VV_LOCAL_SYMBOL semver__Version semver__RawVersion_to_version(semver__RawVersion raw_ver); VV_LOCAL_SYMBOL bool semver__Range_satisfies(semver__Range r, semver__Version ver); VV_LOCAL_SYMBOL bool semver__ComparatorSet_satisfies(semver__ComparatorSet set, semver__Version ver); VV_LOCAL_SYMBOL bool semver__Comparator_satisfies(semver__Comparator c, semver__Version ver); VV_LOCAL_SYMBOL _result_semver__Range semver__parse_range(string input); VV_LOCAL_SYMBOL _result_semver__ComparatorSet semver__parse_comparator_set(string input); VV_LOCAL_SYMBOL _option_semver__Comparator semver__parse_comparator(string input); VV_LOCAL_SYMBOL _option_semver__Version semver__parse_xrange(string input); VV_LOCAL_SYMBOL bool semver__can_expand(string input); VV_LOCAL_SYMBOL _option_semver__ComparatorSet semver__expand_comparator_set(string input); VV_LOCAL_SYMBOL _option_semver__ComparatorSet semver__expand_tilda(string raw_version); VV_LOCAL_SYMBOL _option_semver__ComparatorSet semver__expand_caret(string raw_version); VV_LOCAL_SYMBOL _option_semver__ComparatorSet semver__expand_hyphen(string raw_range); VV_LOCAL_SYMBOL _option_semver__ComparatorSet semver__expand_xrange(string raw_range); VV_LOCAL_SYMBOL semver__ComparatorSet semver__make_comparator_set_ge_lt(semver__Version min, semver__Version max); VV_LOCAL_SYMBOL semver__ComparatorSet semver__make_comparator_set_ge_le(semver__Version min, semver__Version max); string semver__EmptyInputError_msg(semver__EmptyInputError err); string semver__InvalidVersionFormatError_msg(semver__InvalidVersionFormatError err); _result_semver__Version semver__from(string input); semver__Version semver__build(int major, int minor, int patch); semver__Version semver__Version_increment(semver__Version ver, semver__Increment typ); bool semver__Version_satisfies(semver__Version ver, string input); bool semver__Version_eq(semver__Version v1, semver__Version v2); bool semver__Version_gt(semver__Version v1, semver__Version v2); bool semver__Version_lt(semver__Version v1, semver__Version v2); bool semver__Version_ge(semver__Version v1, semver__Version v2); bool semver__Version_le(semver__Version v1, semver__Version v2); string semver__Version_str(semver__Version ver); _result_semver__Version semver__coerce(string input); bool semver__is_valid(string input); VV_LOCAL_SYMBOL bool semver__is_version_valid(string input); VV_LOCAL_SYMBOL _result_semver__Version semver__coerce_version(string input); VV_LOCAL_SYMBOL semver__Version semver__increment_version(semver__Version ver, semver__Increment typ); VV_LOCAL_SYMBOL bool semver__is_valid_string(string input); VV_LOCAL_SYMBOL bool semver__is_valid_number(string input); Array_string os__args_after(string cut_word); Array_string os__args_before(string cut_word); bool os__debugger_present(void); string os__getenv(string key); _option_string os__getenv_opt(string key); int os__setenv(string name, string value, bool overwrite); int os__unsetenv(string name); Map_string_string os__environ(void); int os__fd_close(int fd); void os__fd_write(int fd, string s); Array_string os__fd_slurp(int fd); multi_return_string_int os__fd_read(int fd, int maxbytes); VV_LOCAL_SYMBOL string os__NotExpected_msg(os__NotExpected err); VV_LOCAL_SYMBOL int os__NotExpected_code(os__NotExpected err); VV_LOCAL_SYMBOL string os__fix_windows_path(string path); _result_os__File os__open_file(string path, string mode, Array_int options); _result_os__File os__open(string path); _result_os__File os__create(string path); os__File os__stdin(void); os__File os__stdout(void); os__File os__stderr(void); bool os__File_eof(os__File* f); _result_void os__File_reopen(os__File* f, string path, string mode); _result_int os__File_read(os__File* f, Array_u8* buf); _result_int os__File_write(os__File* f, Array_u8 buf); _result_int os__File_writeln(os__File* f, string s); _result_int os__File_write_string(os__File* f, string s); _result_int os__File_write_to(os__File* f, u64 pos, Array_u8 buf); int os__File_write_ptr(os__File* f, voidptr data, int size); _result_void os__File_write_full_buffer(os__File* f, voidptr buffer, usize buffer_len); int os__File_write_ptr_at(os__File* f, voidptr data, int size, u64 pos); VV_LOCAL_SYMBOL _result_int os__fread(voidptr ptr, int item_size, int items, FILE* stream); Array_u8 os__File_read_bytes(os__File* f, int size); Array_u8 os__File_read_bytes_at(os__File* f, int size, u64 pos); _result_int os__File_read_bytes_into_newline(os__File* f, Array_u8* buf); _result_int os__File_read_bytes_into(os__File* f, u64 pos, Array_u8* buf); _result_int os__File_read_from(os__File* f, u64 pos, Array_u8* buf); _result_int os__File_read_into_ptr(os__File* f, u8* ptr, int max_size); void os__File_flush(os__File* f); string os__FileNotOpenedError_msg(os__FileNotOpenedError err); string os__SizeOfTypeIs0Error_msg(os__SizeOfTypeIs0Error err); VV_LOCAL_SYMBOL IError os__error_file_not_opened(void); VV_LOCAL_SYMBOL IError os__error_size_of_type_0(void); _result_void os__File_seek(os__File* f, i64 pos, os__SeekMode mode); _result_i64 os__File_tell(os__File* f); bool os__is_abs_path(string path); string os__abs_path(string path); string os__norm_path(string path); _result_string os__existing_path(string path); VV_LOCAL_SYMBOL string os__clean_path(string path); string os__to_slash(string path); string os__from_slash(string path); VV_LOCAL_SYMBOL int os__win_volume_len(string path); VV_LOCAL_SYMBOL bool os__is_slash(u8 b); VV_LOCAL_SYMBOL bool os__is_unc_path(string path); VV_LOCAL_SYMBOL bool os__has_drive_letter(string path); VV_LOCAL_SYMBOL bool os__starts_w_slash_slash(string path); VV_LOCAL_SYMBOL bool os__is_drive_rooted(string path); VV_LOCAL_SYMBOL bool os__is_normal_path(string path); VV_LOCAL_SYMBOL bool os__is_curr_dir_ref(int byte_one, int byte_two, int byte_three); string os__windows_volume(string path); u32 os__FilePermission_bitmask(os__FilePermission p); u32 os__FileMode_bitmask(os__FileMode m); os__FileMode os__inode(string path); _result_Array_u8 os__read_bytes(string path); VV_LOCAL_SYMBOL _result_int os__find_cfile_size(FILE* fp); VV_LOCAL_SYMBOL _result_strings__Builder os__slurp_file_in_builder(FILE* fp); _result_string os__read_file(string path); _result_void os__truncate(string path, u64 len); VV_LOCAL_SYMBOL void os__eprintln_unknown_file_size(void); u64 os__file_size(string path); _result_void os__rename_dir(string src, string dst); _result_void os__rename(string src, string dst); _result_void os__cp(string src, string dst); _result_FILE_ptr os__vfopen(string path, string mode); int os__fileno(voidptr cfile); VV_LOCAL_SYMBOL voidptr os__vpopen(string path); VV_LOCAL_SYMBOL multi_return_int_bool os__posix_wait4_to_exit_status(int waitret); string os__posix_get_error_msg(int code); VV_LOCAL_SYMBOL int os__vpclose(voidptr f); int os__system(string cmd); bool os__exists(string path); bool os__is_executable(string path); bool os__is_writable(string path); bool os__is_readable(string path); _result_void os__rm(string path); _result_void os__rmdir(string path); VV_LOCAL_SYMBOL void os__print_c_errno(void); string os__get_raw_line(void); Array_u8 os__get_raw_stdin(void); string os__executable(void); bool os__is_dir(string path); bool os__is_link(string path); VV_LOCAL_SYMBOL os__PathKind os__kind_of_existing_path(string path); _result_void os__chdir(string path); string os__getwd(void); string os__real_path(string fpath); VV_LOCAL_SYMBOL void os__normalize_drive_letter(string path); int os__fork(void); int os__wait(void); i64 os__file_last_mod_unix(string path); void os__flush(void); _result_void os__chmod(string path, int mode); _result_void os__chown(string path, int owner, int group); _result_os__File os__open_append(string path); _result_void os__execvp(string cmdpath, Array_string cmdargs); _result_void os__execve(string cmdpath, Array_string cmdargs, Array_string envs); int os__is_atty(int fd); _result_void os__write_file_array(string path, array buffer); _result_Array_string os__glob(Array_string patterns); VV_LOCAL_SYMBOL int compare_10044130939551424885_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } IError os__last_error(void); void os__Result_free(os__Result* result); VV_LOCAL_SYMBOL string os__executable_fallback(void); _result_void os__cp_all(string src, string dst, bool overwrite); _result_void os__mv_by_cp(string source, string target); _result_void os__mv(string source, string target); _result_Array_string os__read_lines(string path); string os__sigint_to_signal_name(int si); _result_void os__rmdir_all(string path); bool os__is_dir_empty(string path); string os__file_ext(string opath); string os__dir(string opath); string os__base(string opath); string os__file_name(string opath); _option_string os__input_opt(string prompt); string os__input(string prompt); string os__get_line(void); Array_string os__get_lines(void); string os__get_lines_joined(void); string os__get_raw_lines_joined(void); string os__user_os(void); _result_Array_string os__user_names(void); string os__home_dir(void); string os__expand_tilde_to_home(string path); _result_void os__write_file(string path, string text); string os__ExecutableNotFoundError_msg(os__ExecutableNotFoundError err); VV_LOCAL_SYMBOL IError os__error_failed_to_find_executable(void); _result_string os__find_abs_path_of_executable(string exepath); bool os__exists_in_system_path(string prog); bool os__is_file(string path); string os__join_path(string base, Array_string dirs); string os__join_path_single(string base, string elem); Array_string os__walk_ext(string path, string ext); VV_LOCAL_SYMBOL void os__impl_walk_ext(string path, string ext, Array_string* out); void os__walk(string path, void (*f)(string )); void os__walk_with_context(string path, voidptr context, void (*fcb)(voidptr , string )); void os__log(string s); _result_void os__mkdir_all(string opath, os__MkdirParams params); string os__cache_dir(void); string os__temp_dir(void); string os__vtmp_dir(void); VV_LOCAL_SYMBOL string os__default_vmodules_path(void); string os__vmodules_dir(void); Array_string os__vmodules_paths(void); string os__resource_abs_path(string path); os__Result os__execute_or_panic(string cmd); os__Result os__execute_or_exit(string cmd); string os__quoted_path(string path); _result_string os__config_dir(void); VV_LOCAL_SYMBOL Array_string os__glob_match(string dir, string pattern, string next_pattern, Array_string* matches); VV_LOCAL_SYMBOL _result_void os__native_glob_pattern(string pattern, Array_string* matches); _result_void os__utime(string path, int actime, int modtime); os__Uname os__uname(void); _result_string os__hostname(void); _result_string os__loginname(void); VV_LOCAL_SYMBOL Array_string os__init_os_args(int argc, u8** argv); _result_Array_string os__ls(string path); _result_void os__mkdir(string path, os__MkdirParams params); os__Result os__execute(string cmd); os__Result os__raw_execute(string cmd); _result_void os__Command_start(os__Command* c); string os__Command_read_line(os__Command* c); _result_void os__Command_close(os__Command* c); _result_void os__symlink(string origin, string target); _result_void os__link(string origin, string target); string os__get_error_msg(int code); void os__File_close(os__File* f); _result_void os__ensure_folder_is_writable(string folder); int os__getpid(void); int os__getppid(void); int os__getuid(void); int os__geteuid(void); int os__getgid(void); int os__getegid(void); void os__posix_set_permission_bit(string path_s, u32 mode, bool enable); VV_LOCAL_SYMBOL _result_string os__get_long_path(string path); _result_string os__input_password(string prompt); void os__Process_signal_kill(os__Process* p); void os__Process_signal_pgkill(os__Process* p); void os__Process_signal_stop(os__Process* p); void os__Process_signal_continue(os__Process* p); void os__Process_wait(os__Process* p); void os__Process_close(os__Process* p); void os__Process_free(os__Process* p); VV_LOCAL_SYMBOL int os__Process__spawn(os__Process* p); bool os__Process_is_alive(os__Process* p); void os__Process_set_redirect_stdio(os__Process* p); void os__Process_stdin_write(os__Process* p, string s); string os__Process_stdout_slurp(os__Process* p); string os__Process_stderr_slurp(os__Process* p); string os__Process_stdout_read(os__Process* p); string os__Process_stderr_read(os__Process* p); VV_LOCAL_SYMBOL void os__Process__check_redirection_call(os__Process* p, string fn_name); VV_LOCAL_SYMBOL void os__Process__signal_stop(os__Process* p); VV_LOCAL_SYMBOL void os__Process__signal_continue(os__Process* p); VV_LOCAL_SYMBOL void os__Process__signal_kill(os__Process* p); VV_LOCAL_SYMBOL void os__Process__signal_pgkill(os__Process* p); VV_LOCAL_SYMBOL void os__Process__wait(os__Process* p); VV_LOCAL_SYMBOL bool os__Process__is_alive(os__Process* p); void os__Process_run(os__Process* p); os__Process* os__new_process(string filename); void os__Process_set_args(os__Process* p, Array_string pargs); void os__Process_set_work_folder(os__Process* p, string path); void os__Process_set_environment(os__Process* p, Map_string_string envs); VV_LOCAL_SYMBOL int os__Process_unix_spawn_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_unix_stop_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_unix_resume_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_unix_kill_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_unix_kill_pgroup(os__Process* p); VV_LOCAL_SYMBOL void os__Process_unix_wait(os__Process* p); VV_LOCAL_SYMBOL bool os__Process_unix_is_alive(os__Process* p); VV_LOCAL_SYMBOL int os__Process_win_spawn_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_win_stop_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_win_resume_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_win_kill_process(os__Process* p); VV_LOCAL_SYMBOL void os__Process_win_kill_pgroup(os__Process* p); VV_LOCAL_SYMBOL void os__Process_win_wait(os__Process* p); VV_LOCAL_SYMBOL bool os__Process_win_is_alive(os__Process* p); VV_LOCAL_SYMBOL void os__Process_win_write_string(os__Process* p, int idx, string s); VV_LOCAL_SYMBOL multi_return_string_int os__Process_win_read_string(os__Process* p, int idx, int maxbytes); VV_LOCAL_SYMBOL string os__Process_win_slurp(os__Process* p, int idx); _result_anon_fn_os__signal os__signal_opt(os__Signal signum, void (*handler)(os__Signal )); _result_void os__open_uri(string uri); v__depgraph__OrderedDepMap v__depgraph__new_ordered_dependency_map(void); void v__depgraph__OrderedDepMap_set(v__depgraph__OrderedDepMap* o, string name, Array_string deps); void v__depgraph__OrderedDepMap_add(v__depgraph__OrderedDepMap* o, string name, Array_string deps); Array_string v__depgraph__OrderedDepMap_get(v__depgraph__OrderedDepMap* o, string name); void v__depgraph__OrderedDepMap_delete(v__depgraph__OrderedDepMap* o, string name); void v__depgraph__OrderedDepMap_apply_diff(v__depgraph__OrderedDepMap* o, string name, Array_string deps); int v__depgraph__OrderedDepMap_size(v__depgraph__OrderedDepMap* o); v__depgraph__DepGraph* v__depgraph__new_dep_graph(void); void v__depgraph__DepGraph_add(v__depgraph__DepGraph* graph, string mod, Array_string deps); void v__depgraph__DepGraph_add_with_value(v__depgraph__DepGraph* graph, string mod, Array_string deps, i64 value); v__depgraph__DepGraph* v__depgraph__DepGraph_resolve(v__depgraph__DepGraph* graph); v__depgraph__DepGraphNode v__depgraph__DepGraph_last_node(v__depgraph__DepGraph* graph); string v__depgraph__DepGraph_display(v__depgraph__DepGraph* graph); string v__depgraph__DepGraph_display_cycles(v__depgraph__DepGraph* graph); VV_LOCAL_SYMBOL multi_return_bool_Array_string v__depgraph__NodeNames_is_part_of_cycle(v__depgraph__NodeNames* nn, string name, Array_string already_seen); void v__depgraph__show(v__depgraph__DepGraph* graph, string path); VV_LOCAL_SYMBOL u32 rand__seed__nr_next(u32 prev); Array_u32 rand__seed__time_seed_array(int count); u32 rand__seed__time_seed_32(void); u64 rand__seed__time_seed_64(void); string term__format_esc(string code); string term__format(string msg, string open, string close); string term__format_rgb(int r, int g, int b, string msg, string open, string close); string term__rgb(int r, int g, int b, string msg); string term__bg_rgb(int r, int g, int b, string msg); string term__hex(int hex, string msg); string term__bg_hex(int hex, string msg); string term__reset(string msg); string term__bold(string msg); string term__dim(string msg); string term__italic(string msg); string term__underline(string msg); string term__slow_blink(string msg); string term__rapid_blink(string msg); string term__inverse(string msg); string term__hidden(string msg); string term__strikethrough(string msg); string term__black(string msg); string term__red(string msg); string term__green(string msg); string term__yellow(string msg); string term__blue(string msg); string term__magenta(string msg); string term__cyan(string msg); string term__white(string msg); string term__bg_black(string msg); string term__bg_red(string msg); string term__bg_green(string msg); string term__bg_yellow(string msg); string term__bg_blue(string msg); string term__bg_magenta(string msg); string term__bg_cyan(string msg); string term__bg_white(string msg); string term__gray(string msg); string term__bright_black(string msg); string term__bright_red(string msg); string term__bright_green(string msg); string term__bright_yellow(string msg); string term__bright_blue(string msg); string term__bright_magenta(string msg); string term__bright_cyan(string msg); string term__bright_white(string msg); string term__bright_bg_black(string msg); string term__bright_bg_red(string msg); string term__bright_bg_green(string msg); string term__bright_bg_yellow(string msg); string term__bright_bg_blue(string msg); string term__bright_bg_magenta(string msg); string term__bright_bg_cyan(string msg); string term__bright_bg_white(string msg); string term__highlight_command(string command); void term__set_cursor_position(term__Coord c); void term__move(int n, string direction); void term__cursor_up(int n); void term__cursor_down(int n); void term__cursor_forward(int n); void term__cursor_back(int n); void term__erase_display(string t); void term__erase_toend(void); void term__erase_tobeg(void); void term__erase_clear(void); void term__erase_del_clear(void); void term__erase_line(string t); void term__erase_line_toend(void); void term__erase_line_tobeg(void); void term__erase_line_clear(void); void term__show_cursor(void); void term__hide_cursor(void); void term__clear_previous_line(void); bool term__can_show_color_on_stdout(void); bool term__can_show_color_on_stderr(void); string term__failed(string s); string term__ok_message(string s); string term__fail_message(string s); string term__warn_message(string s); string term__colorize(string (*cfn)(string ), string s); string term__ecolorize(string (*cfn)(string ), string s); string term__strip_ansi(string text); string term__h_divider(string divider); string term__header_left(string text, string divider); string term__header(string text, string divider); VV_LOCAL_SYMBOL int term__imax(int x, int y); VV_LOCAL_SYMBOL bool term__supports_escape_sequences(int fd); multi_return_int_int term__get_terminal_size(void); _result_term__Coord term__get_cursor_position(void); bool term__set_terminal_title(string title); bool term__set_tab_title(string title); bool term__clear(void); VV_LOCAL_SYMBOL int term__getchar(void); _option_rune term__utf8_getchar(void); int term__utf8_len(u8 c); void v__help__print_and_exit(string topic); VV_LOCAL_SYMBOL string v__help__known_topics(string topicdir); VV_LOCAL_SYMBOL int compare_5856511986181937489_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } string v__util__version__vhash(void); string v__util__version__full_hash(void); string v__util__version__full_v_version(bool is_verbose); string v__util__version__githash(bool should_get_from_filesystem); v__vcache__CacheManager v__vcache__new_cache_manager(Array_string opts); void v__vcache__CacheManager_set_temporary_options(v__vcache__CacheManager* cm, Array_string new_opts); string v__vcache__CacheManager_key2cpath(v__vcache__CacheManager* cm, string key); string v__vcache__CacheManager_postfix_with_key2cpath(v__vcache__CacheManager* cm, string postfix, string key); VV_LOCAL_SYMBOL string v__vcache__normalise_mod(string mod); string v__vcache__CacheManager_mod_postfix_with_key2cpath(v__vcache__CacheManager* cm, string mod, string postfix, string key); _result_string v__vcache__CacheManager_exists(v__vcache__CacheManager* cm, string postfix, string key); _result_string v__vcache__CacheManager_mod_exists(v__vcache__CacheManager* cm, string mod, string postfix, string key); _result_string v__vcache__CacheManager_save(v__vcache__CacheManager* cm, string postfix, string key, string content); _result_string v__vcache__CacheManager_mod_save(v__vcache__CacheManager* cm, string mod, string postfix, string key, string content); _result_string v__vcache__CacheManager_load(v__vcache__CacheManager* cm, string postfix, string key); _result_string v__vcache__CacheManager_mod_load(v__vcache__CacheManager* cm, string mod, string postfix, string key); VV_LOCAL_SYMBOL void v__vcache__xlog(string fname, string s); VV_LOCAL_SYMBOL int v__vcache__mypid(void); _result_string v__util__diff__find_working_diff_command(void); VV_LOCAL_SYMBOL bool v__util__diff__opendiff_exists(void); string v__util__diff__color_compare_files(string diff_cmd, string file1, string file2); string v__util__diff__color_compare_strings(string diff_cmd, string unique_prefix, string expected, string found); _result_v__vmod__Manifest v__vmod__from_file(string vmod_path); _result_v__vmod__Manifest v__vmod__decode(string contents); VV_LOCAL_SYMBOL void v__vmod__Scanner_tokenize(v__vmod__Scanner* s, v__vmod__TokenKind t_type, string val); VV_LOCAL_SYMBOL void v__vmod__Scanner_skip_whitespace(v__vmod__Scanner* s); VV_LOCAL_SYMBOL bool v__vmod__is_name_alpha(u8 chr); VV_LOCAL_SYMBOL string v__vmod__Scanner_create_string(v__vmod__Scanner* s, u8 q); VV_LOCAL_SYMBOL string v__vmod__Scanner_create_ident(v__vmod__Scanner* s); VV_LOCAL_SYMBOL bool v__vmod__Scanner_peek_char(v__vmod__Scanner s, u8 c); VV_LOCAL_SYMBOL void v__vmod__Scanner_scan_all(v__vmod__Scanner* s); VV_LOCAL_SYMBOL _result_multi_return_Array_string_int v__vmod__get_array_content(Array_v__vmod__Token tokens, int st_idx); VV_LOCAL_SYMBOL _result_v__vmod__Manifest v__vmod__Parser_parse(v__vmod__Parser* p); v__vmod__ModFileCacher* v__vmod__new_mod_file_cacher(void); void v__vmod__ModFileCacher_debug(v__vmod__ModFileCacher* mcache); v__vmod__ModFileAndFolder v__vmod__ModFileCacher_get_by_file(v__vmod__ModFileCacher* mcache, string vfile); v__vmod__ModFileAndFolder v__vmod__ModFileCacher_get_by_folder(v__vmod__ModFileCacher* mcache, string vfolder); VV_LOCAL_SYMBOL void v__vmod__ModFileCacher_add(v__vmod__ModFileCacher* cacher, string path, v__vmod__ModFileAndFolder result); VV_LOCAL_SYMBOL multi_return_Array_string_v__vmod__ModFileAndFolder v__vmod__ModFileCacher_traverse(v__vmod__ModFileCacher* mcache, string mfolder); VV_LOCAL_SYMBOL void v__vmod__ModFileCacher_mark_folders_with_vmod(v__vmod__ModFileCacher* mcache, Array_string folders_so_far, v__vmod__ModFileAndFolder vmod); VV_LOCAL_SYMBOL void v__vmod__ModFileCacher_mark_folders_as_vmod_free(v__vmod__ModFileCacher* mcache, Array_string folders_so_far); VV_LOCAL_SYMBOL bool v__vmod__ModFileCacher_check_for_stop(v__vmod__ModFileCacher* mcache, string cfolder, Array_string files); VV_LOCAL_SYMBOL Array_string v__vmod__ModFileCacher_get_files(v__vmod__ModFileCacher* mcache, string cfolder); v__vmod__ModFileCacher* v__vmod__get_cache(void); string v__util__recompilation__disabling_file(string vroot); void v__util__recompilation__must_be_enabled(string vroot, string error_message); VV_LOCAL_SYMBOL usize runtime__free_memory_impl(void); int runtime__nr_jobs(void); bool runtime__is_32bit(void); bool runtime__is_64bit(void); bool runtime__is_little_endian(void); bool runtime__is_big_endian(void); int runtime__nr_cpus(void); usize runtime__total_memory(void); usize runtime__free_memory(void); string v__cflag__CFlag_str(v__cflag__CFlag* c); string v__cflag__CFlag_eval(v__cflag__CFlag* cf); string v__cflag__CFlag_format(v__cflag__CFlag* cf); Array_string Array_v__cflag__CFlag_c_options_before_target_msvc(Array_v__cflag__CFlag cflags); Array_string Array_v__cflag__CFlag_c_options_after_target_msvc(Array_v__cflag__CFlag cflags); Array_string Array_v__cflag__CFlag_c_options_before_target(Array_v__cflag__CFlag cflags); Array_string Array_v__cflag__CFlag_c_options_after_target(Array_v__cflag__CFlag cflags); Array_string Array_v__cflag__CFlag_c_options_without_object_files(Array_v__cflag__CFlag cflags); Array_string Array_v__cflag__CFlag_c_options_only_object_files(Array_v__cflag__CFlag cflags); multi_return_Array_string_Array_string_Array_string Array_v__cflag__CFlag_defines_others_libs(Array_v__cflag__CFlag cflags); void rand__wyrand__WyRandRNG_seed(rand__wyrand__WyRandRNG* rng, Array_u32 seed_data); u8 rand__wyrand__WyRandRNG_u8(rand__wyrand__WyRandRNG* rng); u16 rand__wyrand__WyRandRNG_u16(rand__wyrand__WyRandRNG* rng); u32 rand__wyrand__WyRandRNG_u32(rand__wyrand__WyRandRNG* rng); u64 rand__wyrand__WyRandRNG_u64(rand__wyrand__WyRandRNG* rng); int rand__wyrand__WyRandRNG_block_size(rand__wyrand__WyRandRNG* rng); void rand__wyrand__WyRandRNG_free(rand__wyrand__WyRandRNG* rng); VV_LOCAL_SYMBOL _result_string v__pkgconfig__desc(string mod); _result_v__pkgconfig__Main_ptr v__pkgconfig__main(Array_string args); VV_LOCAL_SYMBOL int compare_6984583855671780374_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } _result_string v__pkgconfig__Main_run(v__pkgconfig__Main* m); VV_LOCAL_SYMBOL string v__pkgconfig__filter(Array_string libs, string prefix, string prefix2); VV_LOCAL_SYMBOL v__pkgconfig__MainOptions* v__pkgconfig__parse_options(flag__FlagParser* fp); VV_LOCAL_SYMBOL Array_string v__pkgconfig__PkgConfig_parse_list_no_comma(v__pkgconfig__PkgConfig* pc, string s); VV_LOCAL_SYMBOL Array_string v__pkgconfig__PkgConfig_parse_list(v__pkgconfig__PkgConfig* pc, string s); VV_LOCAL_SYMBOL string v__pkgconfig__PkgConfig_parse_line(v__pkgconfig__PkgConfig* pc, string s); VV_LOCAL_SYMBOL void v__pkgconfig__PkgConfig_setvar(v__pkgconfig__PkgConfig* pc, string line); VV_LOCAL_SYMBOL bool v__pkgconfig__PkgConfig_parse(v__pkgconfig__PkgConfig* pc, string file); VV_LOCAL_SYMBOL _result_string v__pkgconfig__PkgConfig_resolve(v__pkgconfig__PkgConfig* pc, string pkgname); bool v__pkgconfig__atleast(string v); bool v__pkgconfig__PkgConfig_atleast(v__pkgconfig__PkgConfig* pc, string v); _result_string v__pkgconfig__PkgConfig_extend(v__pkgconfig__PkgConfig* pc, v__pkgconfig__PkgConfig* pcdep); VV_LOCAL_SYMBOL _result_void v__pkgconfig__PkgConfig_load_requires(v__pkgconfig__PkgConfig* pc); VV_LOCAL_SYMBOL _result_void v__pkgconfig__PkgConfig_load_require(v__pkgconfig__PkgConfig* pc, string dep); VV_LOCAL_SYMBOL void v__pkgconfig__PkgConfig_add_path(v__pkgconfig__PkgConfig* pc, string path); VV_LOCAL_SYMBOL void v__pkgconfig__PkgConfig_load_paths(v__pkgconfig__PkgConfig* pc); _result_v__pkgconfig__PkgConfig_ptr v__pkgconfig__load(string pkgname, v__pkgconfig__Options options); Array_string v__pkgconfig__list(void); VV_LOCAL_SYMBOL f64 rand__msqrt(f64 a); VV_LOCAL_SYMBOL f64 rand__mlog(f64 a); VV_LOCAL_SYMBOL multi_return_f64_int rand__frexp(f64 x); VV_LOCAL_SYMBOL f64 rand__scalbn(f64 x, int n_); VV_LOCAL_SYMBOL f64 rand__f64_from_bits(u64 b); VV_LOCAL_SYMBOL u64 rand__f64_bits(f64 f); string rand__uuid_v4(void); VV_LOCAL_SYMBOL string rand__internal_uuid_v4(rand__PRNG* rng); VV_LOCAL_SYMBOL string rand__internal_ulid_at_millisecond(rand__PRNG* rng, u64 unix_time_milli); VV_LOCAL_SYMBOL string rand__internal_string_from_set(rand__PRNG* rng, string charset, int len); VV_LOCAL_SYMBOL void rand__deinit(void); VV_LOCAL_SYMBOL void rand__init(void); VV_LOCAL_SYMBOL void rand__read_32(rand__PRNG* rng, Array_u8* buf); VV_LOCAL_SYMBOL void rand__read_64(rand__PRNG* rng, Array_u8* buf); VV_LOCAL_SYMBOL void rand__read_internal(rand__PRNG* rng, Array_u8* buf); _result_Array_u8 rand__PRNG_bytes(rand__PRNG* rng, int bytes_needed); void rand__PRNG_read(rand__PRNG* rng, Array_u8* buf); _result_u32 rand__PRNG_u32n(rand__PRNG* rng, u32 max); _result_u64 rand__PRNG_u64n(rand__PRNG* rng, u64 max); _result_u32 rand__PRNG_u32_in_range(rand__PRNG* rng, u32 min, u32 max); _result_u64 rand__PRNG_u64_in_range(rand__PRNG* rng, u64 min, u64 max); i8 rand__PRNG_i8(rand__PRNG* rng); i16 rand__PRNG_i16(rand__PRNG* rng); int rand__PRNG_int(rand__PRNG* rng); i64 rand__PRNG_i64(rand__PRNG* rng); int rand__PRNG_int31(rand__PRNG* rng); i64 rand__PRNG_int63(rand__PRNG* rng); _result_int rand__PRNG_intn(rand__PRNG* rng, int max); _result_i64 rand__PRNG_i64n(rand__PRNG* rng, i64 max); _result_int rand__PRNG_int_in_range(rand__PRNG* rng, int min, int max); _result_i64 rand__PRNG_i64_in_range(rand__PRNG* rng, i64 min, i64 max); f32 rand__PRNG_f32(rand__PRNG* rng); f32 rand__PRNG_f32cp(rand__PRNG* rng); f64 rand__PRNG_f64(rand__PRNG* rng); f64 rand__PRNG_f64cp(rand__PRNG* rng); _result_f32 rand__PRNG_f32n(rand__PRNG* rng, f32 max); _result_f64 rand__PRNG_f64n(rand__PRNG* rng, f64 max); _result_f32 rand__PRNG_f32_in_range(rand__PRNG* rng, f32 min, f32 max); _result_f64 rand__PRNG_f64_in_range(rand__PRNG* rng, f64 min, f64 max); string rand__PRNG_ulid(rand__PRNG* rng); string rand__PRNG_ulid_at_millisecond(rand__PRNG* rng, u64 unix_time_milli); string rand__PRNG_string_from_set(rand__PRNG* rng, string charset, int len); string rand__PRNG_string(rand__PRNG* rng, int len); string rand__PRNG_hex(rand__PRNG* rng, int len); string rand__PRNG_ascii(rand__PRNG* rng, int len); _result_bool rand__PRNG_bernoulli(rand__PRNG* rng, f64 p); _result_f64 rand__PRNG_normal(rand__PRNG* rng, rand__config__NormalConfigStruct conf); _result_multi_return_f64_f64 rand__PRNG_normal_pair(rand__PRNG* rng, rand__config__NormalConfigStruct conf); _result_int rand__PRNG_binomial(rand__PRNG* rng, int n, f64 p); f64 rand__PRNG_exponential(rand__PRNG* rng, f64 lambda); rand__PRNG* rand__new_default(rand__config__PRNGConfigStruct config_); rand__PRNG* rand__get_current_rng(void); void rand__set_rng(rand__PRNG* rng); void rand__seed(Array_u32 seed); u8 rand__u8(void); u16 rand__u16(void); u32 rand__u32(void); u64 rand__u64(void); _result_u32 rand__u32n(u32 max); _result_u64 rand__u64n(u64 max); _result_u32 rand__u32_in_range(u32 min, u32 max); _result_u64 rand__u64_in_range(u64 min, u64 max); i16 rand__i16(void); int rand__int(void); _result_int rand__intn(int max); _result_int rand__int_in_range(int min, int max); int rand__int31(void); i64 rand__i64(void); _result_i64 rand__i64n(i64 max); _result_i64 rand__i64_in_range(i64 min, i64 max); i64 rand__int63(void); f32 rand__f32(void); f32 rand__f32cp(void); f64 rand__f64(void); f64 rand__f64cp(void); _result_f32 rand__f32n(f32 max); _result_f64 rand__f64n(f64 max); _result_f32 rand__f32_in_range(f32 min, f32 max); _result_f64 rand__f64_in_range(f64 min, f64 max); _result_Array_u8 rand__bytes(int bytes_needed); void rand__read(Array_u8* buf); string rand__ulid(void); string rand__ulid_at_millisecond(u64 unix_time_milli); string rand__string_from_set(string charset, int len); string rand__string(int len); string rand__hex(int len); string rand__ascii(int len); _result_bool rand__bernoulli(f64 p); _result_f64 rand__normal(rand__config__NormalConfigStruct config_); _result_multi_return_f64_f64 rand__normal_pair(rand__config__NormalConfigStruct config_); _result_int rand__binomial(int n, f64 p); f64 rand__exponential(f64 lambda); v__pref__Preferences* v__pref__new_preferences(void); VV_LOCAL_SYMBOL void v__pref__Preferences_expand_lookup_paths(v__pref__Preferences* p); VV_LOCAL_SYMBOL void v__pref__Preferences_expand_exclude_paths(v__pref__Preferences* p); void v__pref__Preferences_fill_with_defaults(v__pref__Preferences* p); VV_LOCAL_SYMBOL void v__pref__Preferences_find_cc_if_cross_compiling(v__pref__Preferences* p); VV_LOCAL_SYMBOL void v__pref__Preferences_try_to_use_tcc_by_default(v__pref__Preferences* p); string v__pref__default_tcc_compiler(void); void v__pref__Preferences_default_c_compiler(v__pref__Preferences* p); void v__pref__Preferences_default_cpp_compiler(v__pref__Preferences* p); string v__pref__vexe_path(void); string v__pref__Preferences_vcross_compiler_name(v__pref__Preferences* p); VV_LOCAL_SYMBOL void v__pref__Preferences_parse_line_info(v__pref__Preferences* p, string line); string v__pref__add_line_info_expr_to_program_text(string raw_text, v__pref__LineInfo linfo); _result_v__pref__OS v__pref__os_from_string(string os_str); string v__pref__OS_str(v__pref__OS o); v__pref__OS v__pref__get_host_os(void); bool v__pref__Backend_is_js(v__pref__Backend b); multi_return_ref_v__pref__Preferences_string v__pref__parse_args(Array_string known_external_commands, Array_string args); VV_LOCAL_SYMBOL void v__pref__detect_musl(v__pref__Preferences* res); VV_LOCAL_SYMBOL void v__pref__run_code_in_tmp_vfile_and_exit(Array_string args, v__pref__Preferences* res, string option_name, string extension, string content); multi_return_ref_v__pref__Preferences_string v__pref__parse_args_and_show_errors(Array_string known_external_commands, Array_string args, bool show_output); void v__pref__eprintln_cond(bool condition, string s); void v__pref__Preferences_vrun_elog(v__pref__Preferences* pref, string s); bool v__pref__Preferences_should_output_to_stdout(v__pref__Preferences* pref); _result_v__pref__Arch v__pref__arch_from_string(string arch_str); VV_LOCAL_SYMBOL void v__pref__must_exist(string path); VV_LOCAL_SYMBOL bool v__pref__is_source_file(string path); _result_v__pref__Backend v__pref__backend_from_string(string s); v__pref__CompilerType v__pref__cc_from_string(string cc_str); v__pref__Arch v__pref__get_host_arch(void); VV_LOCAL_SYMBOL void v__pref__Preferences_parse_define(v__pref__Preferences* prefs, string define); VV_LOCAL_SYMBOL void v__pref__Preferences_diagnose_deprecated_defines(v__pref__Preferences* prefs, Array_string define_parts); string v__pref__supported_test_runners_list(void); Array_string v__pref__Preferences_should_compile_filtered_files(v__pref__Preferences* prefs, string dir, Array_string files_); VV_LOCAL_SYMBOL int compare_16890712418519328305_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } VV_LOCAL_SYMBOL string v__pref__fname_without_platform_postfix(string file); bool v__pref__Preferences_should_compile_native(v__pref__Preferences* prefs, string file); bool v__pref__Preferences_should_compile_c(v__pref__Preferences* prefs, string file); bool v__pref__Preferences_should_compile_asm(v__pref__Preferences* prefs, string path); bool v__pref__Preferences_should_compile_js(v__pref__Preferences* prefs, string file); VV_LOCAL_SYMBOL sync__Channel* sync__new_channel_st(u32 n, u32 st); VV_LOCAL_SYMBOL sync__Channel* sync__new_channel_st_noscan(u32 n, u32 st); string sync__Channel_auto_str(sync__Channel* ch, string _v_typename); void sync__Channel_close(sync__Channel* ch); int sync__Channel_len(sync__Channel* ch); bool sync__Channel_closed(sync__Channel* ch); void sync__Channel_push(sync__Channel* ch, voidptr src); ChanState sync__Channel_try_push(sync__Channel* ch, voidptr src); VV_LOCAL_SYMBOL ChanState sync__Channel_try_push_priv(sync__Channel* ch, voidptr src, bool no_block); bool sync__Channel_pop(sync__Channel* ch, voidptr dest); ChanState sync__Channel_try_pop(sync__Channel* ch, voidptr dest); VV_LOCAL_SYMBOL ChanState sync__Channel_try_pop_priv(sync__Channel* ch, voidptr dest, bool no_block); int sync__channel_select(Array_sync__Channel_ptr* channels, Array_sync__Direction dir, Array_voidptr* objrefs, time__Duration timeout); string sync__Mutex_str(sync__Mutex* m); string sync__RwMutex_str(sync__RwMutex* m); sync__ManyTimes* sync__new_many_times(u64 times); void sync__ManyTimes_do(sync__ManyTimes* m, void (*f)()); VV_LOCAL_SYMBOL void sync__ManyTimes_do_slow(sync__ManyTimes* m, void (*f)()); sync__Once* sync__new_once(void); void sync__Once_do(sync__Once* o, void (*f)()); VV_LOCAL_SYMBOL void sync__Once_do_slow(sync__Once* o, void (*f)()); void sync__Once_do_with_param(sync__Once* o, void (*f)(voidptr ), voidptr param); VV_LOCAL_SYMBOL void sync__Once_do_slow_with_param(sync__Once* o, void (*f)(voidptr ), voidptr param); VV_LOCAL_SYMBOL void sync__cpanic(int res); VV_LOCAL_SYMBOL void sync__cpanic_errno(void); sync__WaitGroup* sync__new_waitgroup(void); void sync__WaitGroup_init(sync__WaitGroup* wg); void sync__WaitGroup_add(sync__WaitGroup* wg, int delta); void sync__WaitGroup_done(sync__WaitGroup* wg); void sync__WaitGroup_wait(sync__WaitGroup* wg); sync__Mutex* sync__new_mutex(void); void sync__Mutex_init(sync__Mutex* m); sync__RwMutex* sync__new_rwmutex(void); void sync__RwMutex_init(sync__RwMutex* m); void sync__Mutex_lock(sync__Mutex* m); void sync__Mutex_unlock(sync__Mutex* m); void sync__Mutex_destroy(sync__Mutex* m); void sync__RwMutex_rlock(sync__RwMutex* m); void sync__RwMutex_lock(sync__RwMutex* m); void sync__RwMutex_destroy(sync__RwMutex* m); void sync__RwMutex_runlock(sync__RwMutex* m); void sync__RwMutex_unlock(sync__RwMutex* m); sync__Semaphore* sync__new_semaphore(void); sync__Semaphore* sync__new_semaphore_init(u32 n); void sync__Semaphore_init(sync__Semaphore* sem, u32 n); void sync__Semaphore_post(sync__Semaphore* sem); void sync__Semaphore_wait(sync__Semaphore* sem); bool sync__Semaphore_try_wait(sync__Semaphore* sem); bool sync__Semaphore_timed_wait(sync__Semaphore* sem, time__Duration timeout); void sync__Semaphore_destroy(sync__Semaphore* sem); u64 sync__thread_id(void); _result_string v__util__find_working_diff_command(void); string v__util__color_compare_files(string diff_cmd, string file1, string file2); string v__util__color_compare_strings(string diff_cmd, string unique_prefix, string expected, string found); v__util__EManager* v__util__new_error_manager(void); void v__util__EManager_set_support_color(v__util__EManager* e, bool b); string v__util__bold(string msg); string v__util__color(string kind, string msg); string v__util__path_styled_for_error_messages(string path); string v__util__formatted_error(string kind, string omsg, string filepath, v__token__Pos pos); Array_string v__util__cached_file2sourcelines(string path); Array_string v__util__set_source_for_path(string path, string source); Array_string v__util__source_file_context(string kind, string filepath, v__token__Pos pos); void v__util__verror(string kind, string s); string v__util__vlines_escape_path(string path, string ccompiler); void v__util__show_compiler_message(string kind, v__errors__CompilerMessage err); string v__util__qualify_import(v__pref__Preferences* pref_, string mod, string file_path); string v__util__qualify_module(v__pref__Preferences* pref_, string mod, string file_path); VV_LOCAL_SYMBOL _result_string v__util__mod_path_to_full_name(v__pref__Preferences* pref_, string mod, string path); string v__util__smart_quote(string str, bool raw); bool v__util__is_name_char(u8 c); bool v__util__is_func_char(u8 c); bool v__util__contains_capital(string s); bool v__util__good_type_name(string s); bool v__util__is_generic_type_name(string name); string v__util__cescaped_path(string s); v__util__Suggestion v__util__new_suggestion(string wanted, Array_string possibilities); void v__util__Suggestion_add(v__util__Suggestion* s, string val); void v__util__Suggestion_add_many(v__util__Suggestion* s, Array_string many); void v__util__Suggestion_sort(v__util__Suggestion* s); VV_LOCAL_SYMBOL int compare_6081961377856465380_v__util__Possibility_by_similarity(v__util__Possibility* a, v__util__Possibility* b) { if (a->similarity < b->similarity) return -1; else return 1; } string v__util__Suggestion_say(v__util__Suggestion s, string msg); VV_LOCAL_SYMBOL int compare_6081961377856465380_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } string v__util__short_module_name(string name); string v__util__highlight_suggestion(string message); v__util__Surrounder v__util__new_surrounder(int expected_length); void v__util__Surrounder_add(v__util__Surrounder* s, string before, string after); string v__util__Surrounder_before(v__util__Surrounder* s); string v__util__Surrounder_after(v__util__Surrounder* s); void v__util__Surrounder_builder_write_befores(v__util__Surrounder* s, strings__Builder* sb); void v__util__Surrounder_builder_write_afters(v__util__Surrounder* s, strings__Builder* sb); void v__util__Surrounder_free(v__util__Surrounder* s); v__util__Timers* v__util__new_timers(v__util__TimerParams params); v__util__Timers* v__util__get_timers(void); void v__util__timing_start(string label); void v__util__timing_measure(string label); void v__util__timing_measure_cumulative(string label); void v__util__timing_set_should_print(bool should_print); void v__util__Timers_start(v__util__Timers* t, string name); i64 v__util__Timers_measure(v__util__Timers* t, string name); i64 v__util__Timers_measure_cumulative(v__util__Timers* t, string name); void v__util__Timers_measure_pause(v__util__Timers* t, string name); void v__util__Timers_measure_resume(v__util__Timers* t, string name); string v__util__Timers_message(v__util__Timers* t, string name); void v__util__Timers_show(v__util__Timers* t, string label); void v__util__Timers_show_if_exists(v__util__Timers* t, string label); void v__util__Timers_show_remaining(v__util__Timers* t); void v__util__Timers_dump_all(v__util__Timers* t); string v__util__skip_bom(string file_content); bool v__util__module_is_builtin(string mod); string v__util__tabs(int n); void v__util__set_vroot_folder(string vroot_path); _result_string v__util__resolve_vmodroot(string str, string dir); _result_string v__util__resolve_env_value(string str, bool check_for_presence); void v__util__launch_tool(bool is_verbose, string tool_name, Array_string args); bool v__util__should_recompile_tool(string vexe, string tool_source, string tool_name, string tool_exe); VV_LOCAL_SYMBOL multi_return_string_string v__util__tool_source2name_and_exe(string tool_source); string v__util__quote_path(string s); string v__util__args_quote_paths(Array_string args); string v__util__path_of_executable(string path); _result_string v__util__cached_read_source_file(string path); string v__util__replace_op(string s); Array_string v__util__join_env_vflags_and_os_args(void); VV_LOCAL_SYMBOL Array_string v__util__non_empty(Array_string arg); _result_bool v__util__check_module_is_installed(string modulename, bool is_verbose); void v__util__ensure_modules_for_all_tools_are_installed(bool is_verbose); string v__util__strip_mod_name(string name); string v__util__strip_main_name(string name); string v__util__no_dots(string s); string v__util__no_cur_mod(string _v_typename, string cur_mod); void v__util__prepare_tool_when_needed(string source_name); void v__util__recompile_file(string vexe, string file); string v__util__get_vtmp_folder(void); bool v__util__should_bundle_module(string mod); _result_Array_string v__util__find_all_v_files(Array_string roots); void v__util__free_caches(void); _result_string v__util__read_file(string file_path); VV_LOCAL_SYMBOL voidptr sync__pool__empty_cb(sync__pool__PoolProcessor* p, int idx, int task_id); sync__pool__PoolProcessor* sync__pool__new_pool_processor(sync__pool__PoolProcessorConfig context); void sync__pool__PoolProcessor_set_max_jobs(sync__pool__PoolProcessor* pool, int njobs); void sync__pool__PoolProcessor_work_on_items_T___ptr__v__ast__File(sync__pool__PoolProcessor* pool, Array_v__ast__File_ptr items); void sync__pool__PoolProcessor_work_on_items_T_string(sync__pool__PoolProcessor* pool, Array_string items); void sync__pool__PoolProcessor_work_on_pointers(sync__pool__PoolProcessor* pool, Array_voidptr items); VV_LOCAL_SYMBOL void sync__pool__process_in_thread(sync__pool__PoolProcessor* pool, int task_id); v__ast__File* sync__pool__PoolProcessor_get_item_T___ptr__v__ast__File(sync__pool__PoolProcessor* pool, int idx); string sync__pool__PoolProcessor_get_item_T_string(sync__pool__PoolProcessor* pool, int idx); Array_v__gen__c__Gen_ptr sync__pool__PoolProcessor_get_results_ref_T_v__gen__c__Gen(sync__pool__PoolProcessor* pool); void sync__pool__PoolProcessor_set_shared_context(sync__pool__PoolProcessor* pool, voidptr context); voidptr sync__pool__PoolProcessor_get_shared_context(sync__pool__PoolProcessor* pool); void sync__pool__PoolProcessor_set_thread_context(sync__pool__PoolProcessor* pool, int idx, voidptr context); voidptr sync__pool__PoolProcessor_get_thread_context(sync__pool__PoolProcessor* pool, int idx); string v__ast__ComptimeType_str(v__ast__ComptimeType cty); _option_v__ast__Ident v__ast__SelectorExpr_root_ident(v__ast__SelectorExpr* e); bool v__ast__StructField_equals(v__ast__StructField* f, v__ast__StructField* o); v__ast__FnDecl v__ast__FnDecl_new_method_with_receiver_type(v__ast__FnDecl* f, v__ast__Type new_type); VV_LOCAL_SYMBOL bool v__ast__Fn_method_equals(v__ast__Fn* f, v__ast__Fn* o); string v__ast__Param_specifier(v__ast__Param* p); v__ast__Fn v__ast__Fn_new_method_with_receiver_type(v__ast__Fn* f, v__ast__Type new_type); VV_LOCAL_SYMBOL bool v__ast__Param_equals(v__ast__Param* p, v__ast__Param* o); VV_LOCAL_SYMBOL bool Array_v__ast__Param_equals(Array_v__ast__Param p, Array_v__ast__Param o); void v__ast__File_free(v__ast__File* f); bool v__ast__Ident_is_auto_heap(v__ast__Ident* i); bool v__ast__Ident_is_mut(v__ast__Ident* i); v__ast__IdentVar v__ast__Ident_var_info(v__ast__Ident* i); bool v__ast__Expr_is_blank_ident(v__ast__Expr expr); v__token__Pos v__ast__Expr_pos(v__ast__Expr expr); bool v__ast__Expr_is_lvalue(v__ast__Expr expr); bool v__ast__Expr_is_expr(v__ast__Expr expr); v__ast__Type v__ast__Expr_get_pure_type(v__ast__Expr expr); bool v__ast__Expr_is_pure_literal(v__ast__Expr expr); bool v__ast__Expr_is_auto_deref_var(v__ast__Expr expr); bool v__ast__Expr_is_lockable(v__ast__Expr* e); v__token__Pos v__ast__Node_pos(v__ast__Node node); Array_v__ast__Node v__ast__Node_children(v__ast__Node node); void v__ast__IndexExpr_recursive_mapset_is_setter(v__ast__IndexExpr* lx, bool val); void v__ast__IndexExpr_recursive_arraymap_set_is_setter(v__ast__IndexExpr* lx); Map_string_v__ast__ScopeObject v__ast__all_registers(v__ast__Table* t, v__pref__Arch arch); VV_LOCAL_SYMBOL Map_string_v__ast__ScopeObject v__ast__gen_all_registers(v__ast__Table* t, Array_string without_numbers, Map_string_int with_numbers, int bit_size); bool v__ast__Expr_is_literal(v__ast__Expr expr); bool v__ast__Expr_is_nil(v__ast__Expr e); bool v__ast__type_can_start_with_token(v__token__Token* tok); string v__ast__Attr_debug(v__ast__Attr* a); string v__ast__Attr_str(v__ast__Attr* a); bool Array_v__ast__Attr_contains(Array_v__ast__Attr attrs, string str); bool Array_v__ast__Attr_contains_arg(Array_v__ast__Attr attrs, string str, string arg); _option_v__ast__Attr Array_v__ast__Attr_find_first(Array_v__ast__Attr attrs, string aname); _option_v__ast__Attr Array_v__ast__Attr_find_last(Array_v__ast__Attr attrs, string aname); _option_int Array_v__ast__Attr_find_comptime_define(Array_v__ast__Attr attrs); bool v__ast__Table_has_cflag(v__ast__Table* t, v__cflag__CFlag flag); _result_void v__ast__Table_parse_cflag(v__ast__Table* t, string cflg, string mod, Array_string ctimedefines); v__ast__ComptTimeConstValue v__ast__empty_comptime_const_expr(void); _option_i8 v__ast__ComptTimeConstValue_i8(v__ast__ComptTimeConstValue val); _option_i16 v__ast__ComptTimeConstValue_i16(v__ast__ComptTimeConstValue val); _option_int v__ast__ComptTimeConstValue_int(v__ast__ComptTimeConstValue val); _option_voidptr v__ast__ComptTimeConstValue_voidptr(v__ast__ComptTimeConstValue val); _option_i64 v__ast__ComptTimeConstValue_i64(v__ast__ComptTimeConstValue val); _option_u8 v__ast__ComptTimeConstValue_u8(v__ast__ComptTimeConstValue val); _option_u16 v__ast__ComptTimeConstValue_u16(v__ast__ComptTimeConstValue val); _option_u32 v__ast__ComptTimeConstValue_u32(v__ast__ComptTimeConstValue val); _option_u64 v__ast__ComptTimeConstValue_u64(v__ast__ComptTimeConstValue val); _option_f32 v__ast__ComptTimeConstValue_f32(v__ast__ComptTimeConstValue val); _option_f64 v__ast__ComptTimeConstValue_f64(v__ast__ComptTimeConstValue val); _option_string v__ast__ComptTimeConstValue_string(v__ast__ComptTimeConstValue val); _option_v__ast__ComptTimeConstValue v__ast__ConstField_comptime_expr_value(v__ast__ConstField* obj); bool v__ast__ConstField_is_simple_define_const(v__ast__ConstField* obj); bool v__ast__ScopeObject_is_simple_define_const(v__ast__ScopeObject obj); VV_LOCAL_SYMBOL Array_string v__ast__all_valid_comptime_idents(void); u64 v__ast__EmbeddedFile_hash(v__ast__EmbeddedFile e); v__ast__Expr v__ast__Table_resolve_init(v__ast__Table* t, v__ast__StructInit node, v__ast__Type typ); void v__ast__Scope_free(v__ast__Scope* s); VV_LOCAL_SYMBOL bool v__ast__Scope_dont_lookup_parent(v__ast__Scope* s); _option_v__ast__ScopeObject v__ast__Scope_find(v__ast__Scope* s, string name); _option_v__ast__ScopeStructField v__ast__Scope_find_struct_field(v__ast__Scope* s, string name, v__ast__Type struct_type, string field_name); _option_v__ast__Var_ptr v__ast__Scope_find_var(v__ast__Scope* s, string name); _option_v__ast__GlobalField_ptr v__ast__Scope_find_global(v__ast__Scope* s, string name); _option_v__ast__ConstField_ptr v__ast__Scope_find_const(v__ast__Scope* s, string name); bool v__ast__Scope_known_var(v__ast__Scope* s, string name); bool v__ast__Scope_known_global(v__ast__Scope* s, string name); bool v__ast__Scope_known_const(v__ast__Scope* s, string name); void v__ast__Scope_update_var_type(v__ast__Scope* s, string name, v__ast__Type typ); void v__ast__Scope_update_ct_var_kind(v__ast__Scope* s, string name, v__ast__ComptimeVarKind kind); void v__ast__Scope_register_struct_field(v__ast__Scope* s, string name, v__ast__ScopeStructField field); void v__ast__Scope_register(v__ast__Scope* s, v__ast__ScopeObject obj); v__ast__Scope* v__ast__Scope_innermost(v__ast__Scope* s, int pos); bool v__ast__Scope_contains(v__ast__Scope* s, int pos); bool v__ast__Scope_has_inherited_vars(v__ast__Scope* s); string v__ast__Scope_show(v__ast__Scope _v_toheap_sc, int depth, int max_depth); string v__ast__Scope_str(v__ast__Scope _v_toheap_sc); string v__ast__FnDecl_get_name(v__ast__FnDecl* f); string v__ast__Table_get_anon_fn_name(v__ast__Table* table, string prefix, v__ast__Fn* func, int pos); string v__ast__CallExpr_get_name(v__ast__CallExpr* f); string v__ast__FnDecl_modname(v__ast__FnDecl* node); string v__ast__FnDecl_fkey(v__ast__FnDecl* node); string v__ast__Fn_fkey(v__ast__Fn* node); string v__ast__CallExpr_fkey(v__ast__CallExpr* node); string v__ast__Table_stringify_anon_decl(v__ast__Table* t, v__ast__AnonFn* node, string cur_mod, Map_string_string m2a); string v__ast__Table_stringify_fn_decl(v__ast__Table* t, v__ast__FnDecl* node, string cur_mod, Map_string_string m2a); VV_LOCAL_SYMBOL void v__ast__Table_stringify_fn_after_name(v__ast__Table* t, v__ast__FnDecl* node, strings__Builder* f, string cur_mod, Map_string_string m2a); VV_LOCAL_SYMBOL void v__ast__write_comments(Array_v__ast__Comment comments, strings__Builder* f); VV_LOCAL_SYMBOL void v__ast__write_comment(v__ast__Comment node, strings__Builder* f); VV_LOCAL_SYMBOL string v__ast__shorten_full_name_based_on_aliases(string input, Map_string_string m2a); VV_LOCAL_SYMBOL int compare_13857757049580525278_v__ast__StringifyModReplacement_by_weight_reverse(v__ast__StringifyModReplacement* a, v__ast__StringifyModReplacement* b) { if (b->weight < a->weight) return -1; else return 1; } multi_return_string_bool v__ast__StringInterLiteral_get_fspec_braces(v__ast__StringInterLiteral* lit, int i); string v__ast__Expr_str(v__ast__Expr x); string v__ast__CallArg_str(v__ast__CallArg a); string v__ast__args2str(Array_v__ast__CallArg args); string v__ast__BranchStmt_str(v__ast__BranchStmt* node); string v__ast__Stmt_str(v__ast__Stmt node); VV_LOCAL_SYMBOL string v__ast__field_to_string(v__ast__ConstField f); string v__ast__ComptimeForKind_str(v__ast__ComptimeForKind e); void v__ast__Table_free(v__ast__Table* t); VV_LOCAL_SYMBOL void v__ast__default_table_panic_handler(v__ast__Table* t, string message); void v__ast__Table_panic(v__ast__Table* t, string message); v__ast__Table* v__ast__new_table(void); string v__ast__Table_fn_type_signature(v__ast__Table* t, v__ast__Fn* f); string v__ast__Table_fn_type_source_signature(v__ast__Table* t, v__ast__Fn* f); string v__ast__Table_is_same_method(v__ast__Table* t, v__ast__Fn* f, v__ast__Fn* func); _option_v__ast__Fn v__ast__Table_find_fn(v__ast__Table* t, string name); bool v__ast__Table_known_fn(v__ast__Table* t, string name); void v__ast__Table_register_fn(v__ast__Table* t, v__ast__Fn new_fn); void v__ast__Table_register_interface(v__ast__Table* t, v__ast__InterfaceDecl idecl); int v__ast__TypeSymbol_register_method(v__ast__TypeSymbol* t, v__ast__Fn new_fn); _result_v__ast__Fn v__ast__Table_register_aggregate_method(v__ast__Table* t, v__ast__TypeSymbol* sym, string name); bool v__ast__Table_has_method(v__ast__Table* t, v__ast__TypeSymbol* s, string name); _result_v__ast__Fn v__ast__Table_find_method(v__ast__Table* t, v__ast__TypeSymbol* s, string name); Array_Array_v__ast__Type v__ast__Table_get_embeds(v__ast__Table* t, v__ast__TypeSymbol* sym, v__ast__GetEmbedsOptions options); _result_multi_return_v__ast__Fn_Array_v__ast__Type v__ast__Table_find_method_from_embeds(v__ast__Table* t, v__ast__TypeSymbol* sym, string method_name); _result_v__ast__Fn v__ast__Table_find_method_with_embeds(v__ast__Table* t, v__ast__TypeSymbol* sym, string method_name); _option_i64 v__ast__Table_find_enum_field_val(v__ast__Table* t, string name, string field_); Array_string v__ast__Table_get_enum_field_names(v__ast__Table* t, string name); Array_i64 v__ast__Table_get_enum_field_vals(v__ast__Table* t, string name); Array_v__ast__Fn v__ast__Table_get_embed_methods(v__ast__Table* t, v__ast__TypeSymbol* sym); VV_LOCAL_SYMBOL _result_v__ast__StructField v__ast__Table_register_aggregate_field(v__ast__Table* t, v__ast__TypeSymbol* sym, string name); bool v__ast__Table_struct_has_field(v__ast__Table* t, v__ast__TypeSymbol* struct_, string name); Array_v__ast__StructField v__ast__Table_struct_fields(v__ast__Table* t, v__ast__TypeSymbol* sym); _result_v__ast__StructField v__ast__Table_find_field(v__ast__Table* t, v__ast__TypeSymbol* s, string name); _result_multi_return_v__ast__StructField_Array_v__ast__Type v__ast__Table_find_field_from_embeds(v__ast__Table* t, v__ast__TypeSymbol* sym, string field_name); _result_v__ast__StructField v__ast__Table_find_field_with_embeds(v__ast__Table* t, v__ast__TypeSymbol* sym, string field_name); void v__ast__Table_resolve_common_sumtype_fields(v__ast__Table* t, v__ast__TypeSymbol* sym); int v__ast__Table_find_type_idx(v__ast__Table* t, string name); _option_v__ast__TypeSymbol_ptr v__ast__Table_find_sym(v__ast__Table* t, string name); multi_return_ref_v__ast__TypeSymbol_int v__ast__Table_find_sym_and_type_idx(v__ast__Table* t, string name); v__ast__TypeSymbol* v__ast__Table_sym_by_idx(v__ast__Table* t, int idx); v__ast__TypeSymbol* v__ast__Table_sym(v__ast__Table* t, v__ast__Type typ); v__ast__TypeSymbol* v__ast__Table_final_sym(v__ast__Table* t, v__ast__Type typ); string v__ast__Table_get_type_name(v__ast__Table* t, v__ast__Type typ); string v__ast__Table_get_final_type_name(v__ast__Table* t, v__ast__Type typ); v__ast__Type v__ast__Table_unalias_num_type(v__ast__Table* t, v__ast__Type typ); v__ast__Type v__ast__Table_unaliased_type(v__ast__Table* t, v__ast__Type typ); VV_LOCAL_SYMBOL int v__ast__Table_rewrite_already_registered_symbol(v__ast__Table* t, v__ast__TypeSymbol typ, int existing_idx); int v__ast__Table_register_sym(v__ast__Table* t, v__ast__TypeSymbol sym); void v__ast__Table_register_enum_decl(v__ast__Table* t, v__ast__EnumDecl enum_decl); void v__ast__Table_register_anon_struct(v__ast__Table* t, string name, int sym_idx); bool v__ast__Table_known_type(v__ast__Table* t, string name); void v__ast__Table_start_parsing_type(v__ast__Table* t, string type_name); void v__ast__Table_reset_parsing_type(v__ast__Table* t); bool v__ast__Table_known_type_idx(v__ast__Table* t, v__ast__Type typ); string v__ast__Table_array_name(v__ast__Table* t, v__ast__Type elem_type); string v__ast__Table_array_cname(v__ast__Table* t, v__ast__Type elem_type); string v__ast__Table_array_fixed_name(v__ast__Table* t, v__ast__Type elem_type, int size, v__ast__Expr size_expr); string v__ast__Table_array_fixed_cname(v__ast__Table* t, v__ast__Type elem_type, int size); string v__ast__Table_chan_name(v__ast__Table* t, v__ast__Type elem_type, bool is_mut); string v__ast__Table_chan_cname(v__ast__Table* t, v__ast__Type elem_type, bool is_mut); string v__ast__Table_promise_name(v__ast__Table* t, v__ast__Type return_type); string v__ast__Table_promise_cname(v__ast__Table* t, v__ast__Type return_type); string v__ast__Table_thread_name(v__ast__Table* t, v__ast__Type return_type); string v__ast__Table_thread_cname(v__ast__Table* t, v__ast__Type return_type); string v__ast__Table_map_name(v__ast__Table* t, v__ast__Type key_type, v__ast__Type value_type); string v__ast__Table_map_cname(v__ast__Table* t, v__ast__Type key_type, v__ast__Type value_type); int v__ast__Table_find_or_register_chan(v__ast__Table* t, v__ast__Type elem_type, bool is_mut); int v__ast__Table_find_or_register_map(v__ast__Table* t, v__ast__Type key_type, v__ast__Type value_type); int v__ast__Table_find_or_register_thread(v__ast__Table* t, v__ast__Type return_type); int v__ast__Table_find_or_register_promise(v__ast__Table* t, v__ast__Type return_type); int v__ast__Table_find_or_register_array(v__ast__Table* t, v__ast__Type elem_type); int v__ast__Table_find_or_register_array_with_dims(v__ast__Table* t, v__ast__Type elem_type, int nr_dims); int v__ast__Table_find_or_register_array_fixed(v__ast__Table* t, v__ast__Type elem_type, int size, v__ast__Expr size_expr, bool is_fn_ret); int v__ast__Table_find_or_register_multi_return(v__ast__Table* t, Array_v__ast__Type mr_typs); int v__ast__Table_find_or_register_fn_type(v__ast__Table* t, v__ast__Fn f, bool is_anon, bool has_decl); int v__ast__Table_add_placeholder_type(v__ast__Table* t, string name, v__ast__Language language); v__ast__Type v__ast__Table_value_type(v__ast__Table* t, v__ast__Type typ); void v__ast__Table_register_fn_generic_types(v__ast__Table* t, string fn_name); bool v__ast__Table_register_fn_concrete_types(v__ast__Table* t, string fn_name, Array_v__ast__Type types); bool v__ast__Table_sumtype_has_variant(v__ast__Table* t, v__ast__Type parent, v__ast__Type variant, bool is_as); VV_LOCAL_SYMBOL bool v__ast__Table_sumtype_check_function_variant(v__ast__Table* t, v__ast__SumType parent_info, v__ast__Type variant, bool is_as); VV_LOCAL_SYMBOL bool v__ast__Table_sumtype_check_variant_in_type(v__ast__Table* t, v__ast__SumType parent_info, v__ast__Type variant, bool is_as); VV_LOCAL_SYMBOL bool v__ast__Table_sumtype_check_aggregate_variant(v__ast__Table* t, v__ast__Type parent_type, v__ast__Type* aggregate_type, bool is_as); VV_LOCAL_SYMBOL bool v__ast__Table_sumtype_check_alias_variant(v__ast__Table* t, v__ast__Type parent_type, v__ast__Type alias_type, bool is_as); bool v__ast__Table_is_sumtype_or_in_variant(v__ast__Table* t, v__ast__Type parent, v__ast__Type typ); Array_string v__ast__Table_known_type_names(v__ast__Table* t); bool v__ast__Table_has_deep_child_no_ref(v__ast__Table* t, v__ast__TypeSymbol* ts, string name); void v__ast__Table_complete_interface_check(v__ast__Table* t); v__ast__Type v__ast__Table_bitsize_to_type(v__ast__Table* t, int bit_size); bool v__ast__Table_does_type_implement_interface(v__ast__Table* t, v__ast__Type typ, v__ast__Type inter_typ); _option_v__ast__Type v__ast__Table_resolve_generic_to_concrete(v__ast__Table* t, v__ast__Type generic_type, Array_string generic_names, Array_v__ast__Type concrete_types); VV_LOCAL_SYMBOL void v__ast__generic_names_push_with_filter(Array_string* to_names, Array_string from_names); Array_string v__ast__Table_generic_type_names(v__ast__Table* t, v__ast__Type generic_type); v__ast__Type v__ast__Table_unwrap_generic_type(v__ast__Table* t, v__ast__Type typ, Array_string generic_names, Array_v__ast__Type concrete_types); void v__ast__Table_generic_insts_to_concrete(v__ast__Table* t); Array_string v__ast__Table_get_generic_names(v__ast__Table* t, Array_v__ast__Type generic_types); bool v__ast__Table_is_comptime_type(v__ast__Table* t, v__ast__Type x, v__ast__ComptimeType y); Array_string v__ast__Table_dependent_names_in_expr(v__ast__Table* t, v__ast__Expr expr); Array_string v__ast__Table_dependent_names_in_stmt(v__ast__Table* t, v__ast__Stmt stmt); v__ast__Language v__ast__pref_arch_to_table_language(v__pref__Arch pref_arch); string v__ast__ShareType_str(v__ast__ShareType t); string v__ast__Type_atomic_typename(v__ast__Type t); v__ast__ShareType v__ast__sharetype_from_flags(bool is_shared, bool is_atomic); v__ast__ShareType v__ast__Type_share(v__ast__Type t); int v__ast__Type_idx(v__ast__Type t); bool v__ast__Type_is_void(v__ast__Type t); bool v__ast__Type_is_full(v__ast__Type t); int v__ast__Type_nr_muls(v__ast__Type t); bool v__ast__Type_is_ptr(v__ast__Type t); bool v__ast__Type_is_pointer(v__ast__Type typ); bool v__ast__Type_is_voidptr(v__ast__Type typ); bool v__ast__Type_is_any_kind_of_pointer(v__ast__Type t); v__ast__Type v__ast__Type_set_nr_muls(v__ast__Type t, int nr_muls); v__ast__Type v__ast__Type_ref(v__ast__Type t); v__ast__Type v__ast__Type_deref(v__ast__Type t); v__ast__Type v__ast__Type_set_flag(v__ast__Type t, v__ast__TypeFlag flag); v__ast__Type v__ast__Type_clear_flag(v__ast__Type t, v__ast__TypeFlag flag); v__ast__Type v__ast__Type_clear_flags(v__ast__Type t, Array_v__ast__TypeFlag flags); bool v__ast__Type_has_flag(v__ast__Type t, v__ast__TypeFlag flag); Array_string v__ast__TypeSymbol_debug(v__ast__TypeSymbol* ts); Array_string v__ast__TypeSymbol_dbg(v__ast__TypeSymbol* ts); VV_LOCAL_SYMBOL void v__ast__TypeSymbol_dbg_common(v__ast__TypeSymbol* ts, Array_string* res); string v__ast__Type_str(v__ast__Type t); string v__ast__Table_type_str(v__ast__Table* t, v__ast__Type typ); Array_string v__ast__Type_debug(v__ast__Type t); v__ast__Type v__ast__Type_derive(v__ast__Type t, v__ast__Type t_from); v__ast__Type v__ast__Type_derive_add_muls(v__ast__Type t, v__ast__Type t_from); v__ast__Type v__ast__new_type(int idx); v__ast__Type v__ast__new_type_ptr(int idx, int nr_muls); bool v__ast__Type_is_float(v__ast__Type typ); bool v__ast__Type_is_int(v__ast__Type typ); bool v__ast__Type_is_int_valptr(v__ast__Type typ); bool v__ast__Type_is_float_valptr(v__ast__Type typ); bool v__ast__Type_is_pure_int(v__ast__Type typ); bool v__ast__Type_is_pure_float(v__ast__Type typ); bool v__ast__Type_is_signed(v__ast__Type typ); bool v__ast__Type_is_unsigned(v__ast__Type typ); v__ast__Type v__ast__Type_flip_signedness(v__ast__Type typ); bool v__ast__Type_is_int_literal(v__ast__Type typ); bool v__ast__Type_is_number(v__ast__Type typ); bool v__ast__Type_is_string(v__ast__Type typ); bool v__ast__Type_is_bool(v__ast__Type typ); VV_LOCAL_SYMBOL Array_v__ast__Type v__ast__new_charptr_types(void); VV_LOCAL_SYMBOL Array_v__ast__Type v__ast__new_byteptr_types(void); VV_LOCAL_SYMBOL Array_v__ast__Type v__ast__new_voidptr_types(void); Array_v__ast__Type v__ast__merge_types(Array_Array_v__ast__Type params); v__ast__Type v__ast__mktyp(v__ast__Type typ); v__ast__Kind v__ast__Table_type_kind(v__ast__Table* t, v__ast__Type typ); bool v__ast__Table_type_is_for_pointer_arithmetic(v__ast__Table* t, v__ast__Type typ); string v__ast__TypeSymbol_str(v__ast__TypeSymbol* t); VV_LOCAL_SYMBOL void v__ast__TypeSymbol_no_info_panic(v__ast__TypeSymbol* t, string fname); v__ast__Enum v__ast__TypeSymbol_enum_info(v__ast__TypeSymbol* t); v__ast__MultiReturn v__ast__TypeSymbol_mr_info(v__ast__TypeSymbol* t); v__ast__Array v__ast__TypeSymbol_array_info(v__ast__TypeSymbol* t); v__ast__ArrayFixed v__ast__TypeSymbol_array_fixed_info(v__ast__TypeSymbol* t); v__ast__Chan v__ast__TypeSymbol_chan_info(v__ast__TypeSymbol* t); v__ast__Thread v__ast__TypeSymbol_thread_info(v__ast__TypeSymbol* t); v__ast__Map v__ast__TypeSymbol_map_info(v__ast__TypeSymbol* t); v__ast__Struct v__ast__TypeSymbol_struct_info(v__ast__TypeSymbol* t); v__ast__SumType v__ast__TypeSymbol_sumtype_info(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_heap(v__ast__TypeSymbol* t); bool v__ast__ArrayFixed_is_compatible(v__ast__ArrayFixed* t, v__ast__ArrayFixed t2); bool v__ast__TypeSymbol_is_array_fixed(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_array_fixed_ret(v__ast__TypeSymbol* t); void v__ast__Table_register_builtin_type_symbols(v__ast__Table* t); bool v__ast__TypeSymbol_is_pointer(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_int(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_float(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_string(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_number(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_bool(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_primitive(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_is_builtin(v__ast__TypeSymbol* t); multi_return_int_int v__ast__Table_type_size(v__ast__Table* t, v__ast__Type typ); VV_LOCAL_SYMBOL int v__ast__round_up(int n, int multiple); string v__ast__Kind_str(v__ast__Kind k); string Array_v__ast__Kind_str(Array_v__ast__Kind kinds); string v__ast__Table_type_to_str(v__ast__Table* t, v__ast__Type typ); string v__ast__Table_type_to_code(v__ast__Table* t, v__ast__Type typ); string v__ast__Table_clean_generics_type_str(v__ast__Table* t, v__ast__Type typ); VV_LOCAL_SYMBOL string v__ast__strip_extra_struct_types(string name); string v__ast__Table_type_to_str_using_aliases(v__ast__Table* t, v__ast__Type typ, Map_string_string import_aliases); VV_LOCAL_SYMBOL string v__ast__Table_shorten_user_defined_typenames(v__ast__Table* t, string originalname, Map_string_string import_aliases); string v__ast__Table_fn_signature(v__ast__Table* t, v__ast__Fn* func, v__ast__FnSignatureOpts opts); string v__ast__Table_fn_signature_using_aliases(v__ast__Table* t, v__ast__Fn* func, Map_string_string import_aliases, v__ast__FnSignatureOpts opts); string v__ast__TypeSymbol_symbol_name_except_generic(v__ast__TypeSymbol* t); string v__ast__TypeSymbol_embed_name(v__ast__TypeSymbol* t); bool v__ast__TypeSymbol_has_method(v__ast__TypeSymbol* t, string name); bool v__ast__TypeSymbol_has_method_with_generic_parent(v__ast__TypeSymbol* t, string name); _option_v__ast__Fn v__ast__TypeSymbol_find_method(v__ast__TypeSymbol* t, string name); _option_v__ast__Fn v__ast__TypeSymbol_find_method_with_generic_parent(v__ast__TypeSymbol* t, string name); bool v__ast__TypeSymbol_is_js_compatible(v__ast__TypeSymbol* t); multi_return_bool_bool_int v__ast__TypeSymbol_str_method_info(v__ast__TypeSymbol* t); _option_v__ast__StructField v__ast__TypeSymbol_find_field(v__ast__TypeSymbol* t, string name); bool v__ast__TypeSymbol_has_field(v__ast__TypeSymbol* t, string name); VV_LOCAL_SYMBOL _option_v__ast__StructField v__ast__Aggregate_find_field(v__ast__Aggregate* a, string name); _option_v__ast__StructField v__ast__Interface_find_field(v__ast__Interface* i, string name); _option_v__ast__Fn v__ast__Interface_find_method(v__ast__Interface* i, string name); bool v__ast__Interface_has_method(v__ast__Interface* i, string name); _option_v__ast__StructField v__ast__Struct_find_field(v__ast__Struct* s, string name); v__ast__StructField v__ast__Struct_get_field(v__ast__Struct* s, string name); _option_v__ast__StructField v__ast__SumType_find_field(v__ast__SumType* s, string name); bool v__ast__Interface_defines_method(v__ast__Interface* i, string name); VV_LOCAL_SYMBOL bool v__transformer__IndexState_safe_access(v__transformer__IndexState* i, string key, int _v_new); VV_LOCAL_SYMBOL int v__transformer__IndexState_safe_offset(v__transformer__IndexState* i, string key); VV_LOCAL_SYMBOL void v__transformer__IndexState_indent(v__transformer__IndexState* i, bool is_function); VV_LOCAL_SYMBOL void v__transformer__IndexState_unindent(v__transformer__IndexState* i); v__transformer__Transformer* v__transformer__new_transformer(v__pref__Preferences* pref_); v__transformer__Transformer* v__transformer__new_transformer_with_table(v__ast__Table* table, v__pref__Preferences* pref_); void v__transformer__Transformer_transform_files(v__transformer__Transformer* t, Array_v__ast__File_ptr ast_files); void v__transformer__Transformer_transform(v__transformer__Transformer* t, v__ast__File* ast_file); void v__transformer__Transformer_find_new_array_len(v__transformer__Transformer* t, v__ast__AssignStmt node); void v__transformer__Transformer_find_new_range(v__transformer__Transformer* t, v__ast__AssignStmt node); void v__transformer__Transformer_find_mut_self_assign(v__transformer__Transformer* t, v__ast__AssignStmt node); void v__transformer__Transformer_check_safe_array(v__transformer__Transformer* t, v__ast__IndexExpr* node); v__ast__Stmt v__transformer__Transformer_stmt(v__transformer__Transformer* t, v__ast__Stmt* node); v__ast__Stmt v__transformer__Transformer_assert_stmt(v__transformer__Transformer* t, v__ast__AssertStmt* node); v__ast__Expr v__transformer__Transformer_expr_stmt_if_expr(v__transformer__Transformer* t, v__ast__IfExpr* node); v__ast__Expr v__transformer__Transformer_expr_stmt_match_expr(v__transformer__Transformer* t, v__ast__MatchExpr* node); v__ast__Stmt v__transformer__Transformer_for_c_stmt(v__transformer__Transformer* t, v__ast__ForCStmt* node); v__ast__Stmt v__transformer__Transformer_for_stmt(v__transformer__Transformer* t, v__ast__ForStmt* node); v__ast__Stmt v__transformer__Transformer_interface_decl(v__transformer__Transformer* t, v__ast__InterfaceDecl* node); v__ast__Expr v__transformer__Transformer_expr(v__transformer__Transformer* t, v__ast__Expr* node); v__ast__Expr v__transformer__Transformer_call_expr(v__transformer__Transformer* t, v__ast__CallExpr* node); VV_LOCAL_SYMBOL void v__transformer__Transformer_trans_const_value_to_literal(v__transformer__Transformer* t, v__ast__Expr* expr); v__ast__Expr v__transformer__Transformer_infix_expr(v__transformer__Transformer* t, v__ast__InfixExpr* node); v__ast__Expr v__transformer__Transformer_if_expr(v__transformer__Transformer* t, v__ast__IfExpr* node); v__ast__Expr v__transformer__Transformer_match_expr(v__transformer__Transformer* t, v__ast__MatchExpr* node); v__ast__Expr v__transformer__Transformer_sql_expr(v__transformer__Transformer* t, v__ast__SqlExpr* node); void v__transformer__Transformer_fn_decl(v__transformer__Transformer* t, v__ast__FnDecl* node); void v__markused__mark_used(v__ast__Table* table, v__pref__Preferences* pref_, Array_v__ast__File_ptr ast_files); VV_LOCAL_SYMBOL multi_return_Map_string_v__ast__FnDecl_Map_string_v__ast__ConstField_Map_string_v__ast__GlobalField v__markused__all_fn_const_and_global(Array_v__ast__File_ptr ast_files); void v__markused__Walker_mark_fn_as_used(v__markused__Walker* w, string fkey); void v__markused__Walker_mark_const_as_used(v__markused__Walker* w, string ckey); void v__markused__Walker_mark_global_as_used(v__markused__Walker* w, string ckey); void v__markused__Walker_mark_root_fns(v__markused__Walker* w, Array_string all_fn_root_names); void v__markused__Walker_mark_exported_fns(v__markused__Walker* w); void v__markused__Walker_mark_markused_fns(v__markused__Walker* w); void v__markused__Walker_mark_markused_consts(v__markused__Walker* w); void v__markused__Walker_mark_markused_globals(v__markused__Walker* w); void v__markused__Walker_stmt(v__markused__Walker* w, v__ast__Stmt node_); VV_LOCAL_SYMBOL void v__markused__Walker_asm_io(v__markused__Walker* w, Array_v__ast__AsmIO ios); VV_LOCAL_SYMBOL void v__markused__Walker_defer_stmts(v__markused__Walker* w, Array_v__ast__DeferStmt stmts); VV_LOCAL_SYMBOL void v__markused__Walker_stmts(v__markused__Walker* w, Array_v__ast__Stmt stmts); VV_LOCAL_SYMBOL void v__markused__Walker_exprs(v__markused__Walker* w, Array_v__ast__Expr exprs); VV_LOCAL_SYMBOL void v__markused__Walker_expr(v__markused__Walker* w, v__ast__Expr node_); void v__markused__Walker_a_struct_info(v__markused__Walker* w, string sname, v__ast__Struct info); void v__markused__Walker_fn_decl(v__markused__Walker* w, v__ast__FnDecl* node); void v__markused__Walker_call_expr(v__markused__Walker* w, v__ast__CallExpr* node); void v__markused__Walker_fn_by_name(v__markused__Walker* w, string fn_name); void v__markused__Walker_struct_fields(v__markused__Walker* w, Array_v__ast__StructField sfields); void v__markused__Walker_const_fields(v__markused__Walker* w, Array_v__ast__ConstField cfields); void v__markused__Walker_or_block(v__markused__Walker* w, v__ast__OrExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_array_init(v__gen__c__Gen* g, v__ast__ArrayInit node, string var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_fixed_array_init(v__gen__c__Gen* g, v__ast__ArrayInit node, v__gen__c__Type array_type, string var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_expr_with_default(v__gen__c__Gen* g, v__ast__ArrayInit node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_struct_has_array_or_map_field(v__gen__c__Gen* g, v__ast__Type elem_typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_array_init_with_fields(v__gen__c__Gen* g, v__ast__ArrayInit node, v__gen__c__Type elem_type, bool is_amp, string shared_styp, string var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_closure_fn(v__gen__c__Gen* g, v__ast__AnonFn* expr, string var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_map(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_sorted(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_sort(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_sort_call(v__gen__c__Gen* g, v__ast__CallExpr node, string compare_fn); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_filter(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_insert(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_prepend(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_array_contains_method(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_contains_methods(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_contains(v__gen__c__Gen* g, v__ast__Type left_type, v__ast__Expr left, v__ast__Type right_type, v__ast__Expr right); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_array_index_method(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_index_methods(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_index(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_wait(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_fixed_array_wait(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_any(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_array_all(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_write_prepared_tmp_value(v__gen__c__Gen* g, string tmp, v__ast__CallExpr* node, string tmp_stype, string initial_value); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_prepared_var(v__gen__c__Gen* g, string var_name, v__ast__Array inp_info, string inp_elem_type, string tmp, string i); VV_LOCAL_SYMBOL void v__gen__c__Gen_fixed_array_var_init(v__gen__c__Gen* g, v__ast__Expr expr, int size); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_array_expr_param_name(v__gen__c__Gen* g, v__ast__Expr* expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_assert_stmt(v__gen__c__Gen* g, v__ast__AssertStmt original_assert_statement); VV_LOCAL_SYMBOL _result_v__ast__Expr v__gen__c__Gen_assert_subexpression_to_ctemp(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expr_type); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_assert_postfailure_mode(v__gen__c__Gen* g, v__ast__AssertStmt node); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_assert_metainfo(v__gen__c__Gen* g, v__ast__AssertStmt node, v__gen__c__AssertMetainfoKind kind); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_assert_single_expr(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_expr_with_opt_or_block(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expr_typ, v__ast__Expr var_expr, v__ast__Type ret_typ, bool in_heap); VV_LOCAL_SYMBOL string v__gen__c__Gen_expr_opt_with_cast(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expr_typ, v__ast__Type ret_typ); VV_LOCAL_SYMBOL string v__gen__c__Gen_expr_with_opt(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expr_typ, v__ast__Type ret_typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_assign_stmt(v__gen__c__Gen* g, v__ast__AssignStmt node_); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_multi_return_assign(v__gen__c__Gen* g, v__ast__AssignStmt* node, v__ast__Type return_type, v__ast__TypeSymbol return_sym); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_assign_vars_autofree(v__gen__c__Gen* g, v__ast__AssignStmt* node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_cross_var_assign(v__gen__c__Gen* g, v__ast__AssignStmt* node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_cross_tmp_variable(v__gen__c__Gen* g, Array_v__ast__Expr left, v__ast__Expr val); VV_LOCAL_SYMBOL string v__gen__c__Gen_equality_fn(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_equality_fns(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_sumtype_equality_fn(v__gen__c__Gen* g, v__ast__Type left_type); VV_LOCAL_SYMBOL string v__gen__c__Gen_read_opt(v__gen__c__Gen* g, v__ast__Type typ, string var_name); VV_LOCAL_SYMBOL string v__gen__c__Gen_read_field(v__gen__c__Gen* g, v__ast__Type struct_type, string field_name, string var_name); VV_LOCAL_SYMBOL string v__gen__c__Gen_read_opt_field(v__gen__c__Gen* g, v__ast__Type struct_type, string field_name, string var_name, v__ast__Type field_typ); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_struct_equality_fn(v__gen__c__Gen* g, v__ast__Type left_type); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_alias_equality_fn(v__gen__c__Gen* g, v__ast__Type left_type); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_array_equality_fn(v__gen__c__Gen* g, v__ast__Type left_type); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_fixed_array_equality_fn(v__gen__c__Gen* g, v__ast__Type left_type); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_map_equality_fn(v__gen__c__Gen* g, v__ast__Type left_type); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_interface_equality_fn(v__gen__c__Gen* g, v__ast__Type left_type); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_free_method(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_free_methods(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_free_method(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_free_for_struct(v__gen__c__Gen* g, v__ast__Struct info, string styp, string fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_free_for_array(v__gen__c__Gen* g, v__ast__Array info, string styp, string fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_free_for_map(v__gen__c__Gen* g, v__ast__Map info, string styp, string fn_name); VV_LOCAL_SYMBOL string v__gen__c__styp_to_free_fn_name(string styp); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_default(v__gen__c__Gen* g, v__ast__TypeSymbol sym, string styp, string str_fn_name); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_str_fn(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_final_gen_str(v__gen__c__Gen* g, v__gen__c__StrType typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_option(v__gen__c__Gen* g, v__ast__Type typ, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_result(v__gen__c__Gen* g, v__ast__Type typ, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_alias(v__gen__c__Gen* g, v__ast__Alias info, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_multi_return(v__gen__c__Gen* g, v__ast__MultiReturn info, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_enum(v__gen__c__Gen* g, v__ast__Enum info, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_interface(v__gen__c__Gen* g, v__ast__Interface info, string styp, string typ_str, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_union_sum_type(v__gen__c__Gen* g, v__ast__SumType info, string styp, string typ_str, string str_fn_name); VV_LOCAL_SYMBOL string v__gen__c__Gen_fn_decl_str(v__gen__c__Gen* g, v__ast__FnType info); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_fn_type(v__gen__c__Gen* g, v__ast__FnType info, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_chan(v__gen__c__Gen* g, v__ast__Chan info, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_thread(v__gen__c__Gen* g, v__ast__Thread info, string styp, string str_fn_name); VV_LOCAL_SYMBOL string v__gen__c__styp_to_str_fn_name(string styp); VV_LOCAL_SYMBOL multi_return_string_string v__gen__c__deref_kind(bool str_method_expects_ptr, bool is_elem_ptr, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_array(v__gen__c__Gen* g, v__ast__Array info, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_array_fixed(v__gen__c__Gen* g, v__ast__ArrayFixed info, string styp, string str_fn_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_map(v__gen__c__Gen* g, v__ast__Map info, string styp, string str_fn_name); VV_LOCAL_SYMBOL StrIntpType v__gen__c__Gen_type_to_fmt(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_for_struct(v__gen__c__Gen* g, v__ast__Struct info, v__ast__Language lang, string styp, string typ_str, string str_fn_name); VV_LOCAL_SYMBOL multi_return_string_bool v__gen__c__struct_auto_str_func(v__ast__TypeSymbol* sym, v__ast__Language lang, v__ast__Type _field_type, string fn_name, string field_name, bool has_custom_str, bool expects_ptr); VV_LOCAL_SYMBOL string v__gen__c__data_str(StrIntpType x); VV_LOCAL_SYMBOL bool v__gen__c__should_use_indent_func(v__ast__Kind kind); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_enum_static_from_string(v__gen__c__Gen* g, string fn_name); VV_LOCAL_SYMBOL Map_string_bool v__gen__c__string_array_to_map(Array_string a); multi_return_string_string_string_Array_int v__gen__c__gen(Array_v__ast__File_ptr files, v__ast__Table* table, v__pref__Preferences* pref_); VV_LOCAL_SYMBOL v__gen__c__Gen* v__gen__c__cgen_process_one_file_cb(sync__pool__PoolProcessor* p, int idx, int wid); void v__gen__c__Gen_free_builders(v__gen__c__Gen* g); void v__gen__c__Gen_gen_file(v__gen__c__Gen* g); string v__gen__c__Gen_hashes(v__gen__c__Gen* g); void v__gen__c__Gen_init(v__gen__c__Gen* g); void v__gen__c__Gen_finish(v__gen__c__Gen* g); void v__gen__c__Gen_write_typeof_functions(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_typ(v__gen__c__Gen* g, v__ast__Type t); VV_LOCAL_SYMBOL string v__gen__c__Gen_base_type(v__gen__c__Gen* g, v__ast__Type _t); VV_LOCAL_SYMBOL string v__gen__c__Gen_generic_fn_name(v__gen__c__Gen* g, Array_v__ast__Type types, string before); VV_LOCAL_SYMBOL string v__gen__c__Gen_expr_string(v__gen__c__Gen* g, v__ast__Expr expr); VV_LOCAL_SYMBOL string v__gen__c__Gen_expr_string_with_cast(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type typ, v__ast__Type exp); VV_LOCAL_SYMBOL string v__gen__c__Gen_expr_string_surround(v__gen__c__Gen* g, string prepend, v__ast__Expr expr, string append); VV_LOCAL_SYMBOL multi_return_string_string v__gen__c__Gen_option_type_name(v__gen__c__Gen* g, v__ast__Type t); VV_LOCAL_SYMBOL multi_return_string_string v__gen__c__Gen_result_type_name(v__gen__c__Gen* g, v__ast__Type t); VV_LOCAL_SYMBOL string v__gen__c__Gen_option_type_text(v__gen__c__Gen* g, string styp, string base); VV_LOCAL_SYMBOL string v__gen__c__Gen_result_type_text(v__gen__c__Gen* g, string styp, string base); VV_LOCAL_SYMBOL string v__gen__c__Gen_register_option(v__gen__c__Gen* g, v__ast__Type t); VV_LOCAL_SYMBOL string v__gen__c__Gen_register_result(v__gen__c__Gen* g, v__ast__Type t); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_options(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_results(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_find_or_register_shared(v__gen__c__Gen* g, v__ast__Type t, string base); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_shareds(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_register_thread_void_wait_call(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_register_thread_array_wait_call(v__gen__c__Gen* g, string eltyp); VV_LOCAL_SYMBOL string v__gen__c__Gen_register_thread_fixed_array_wait_call(v__gen__c__Gen* g, v__ast__CallExpr node, string eltyp); VV_LOCAL_SYMBOL void v__gen__c__Gen_register_chan_pop_option_call(v__gen__c__Gen* g, string opt_el_type, string styp); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_chan_pop_option_fns(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_register_chan_push_option_fn(v__gen__c__Gen* g, string el_type, string styp); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_chan_push_option_fns(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_cc_type(v__gen__c__Gen* g, v__ast__Type typ, bool is_prefix_struct); VV_LOCAL_SYMBOL string v__gen__c__Gen_type_sidx(v__gen__c__Gen* g, v__ast__Type t); void v__gen__c__Gen_write_typedef_types(v__gen__c__Gen* g); void v__gen__c__Gen_write_alias_typesymbol_declaration(v__gen__c__Gen* g, v__ast__TypeSymbol sym); void v__gen__c__Gen_write_interface_typedef(v__gen__c__Gen* g, v__ast__TypeSymbol sym); void v__gen__c__Gen_write_interface_typesymbol_declaration(v__gen__c__Gen* g, v__ast__TypeSymbol sym); void v__gen__c__Gen_write_fn_typesymbol_declaration(v__gen__c__Gen* g, v__ast__TypeSymbol sym); void v__gen__c__Gen_write_array_fixed_return_types(v__gen__c__Gen* g); void v__gen__c__Gen_write_multi_return_types(v__gen__c__Gen* g); string v__gen__c__Gen_new_tmp_var(v__gen__c__Gen* g); string v__gen__c__Gen_new_global_tmp_var(v__gen__c__Gen* g); string v__gen__c__Gen_new_tmp_declaration_name(v__gen__c__Gen* g); string v__gen__c__Gen_current_tmp_var(v__gen__c__Gen* g); void v__gen__c__Gen_reset_tmp_count(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_decrement_inside_ternary(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_stmts(v__gen__c__Gen* g, Array_v__ast__Stmt stmts); VV_LOCAL_SYMBOL bool v__gen__c__is_noreturn_callexpr(v__ast__Expr expr); VV_LOCAL_SYMBOL bool v__gen__c__Gen_stmts_with_tmp_var(v__gen__c__Gen* g, Array_v__ast__Stmt stmts, string tmp_var); VV_LOCAL_SYMBOL void v__gen__c__Gen_expr_with_tmp_var(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expr_typ, v__ast__Type ret_typ, string tmp_var); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_v_source_line_info(v__gen__c__Gen* g, v__token__Pos pos); VV_LOCAL_SYMBOL void v__gen__c__Gen_stmt(v__gen__c__Gen* g, v__ast__Stmt node); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_defer_stmts(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_sumtype_casting_fn(v__gen__c__Gen* g, v__ast__Type got_, v__ast__Type exp_); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_sumtype_casting_fn(v__gen__c__Gen* g, v__gen__c__SumtypeCastingFn fun); VV_LOCAL_SYMBOL void v__gen__c__Gen_call_cfn_for_casting_expr(v__gen__c__Gen* g, string fname, v__ast__Expr expr, bool exp_is_ptr, string exp_styp, bool got_is_ptr, bool got_is_fn, string got_styp); VV_LOCAL_SYMBOL void v__gen__c__Gen_expr_with_cast(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type got_type_raw, v__ast__Type expected_type); VV_LOCAL_SYMBOL void v__gen__c__write_octal_escape(strings__Builder* b, u8 c); VV_LOCAL_SYMBOL string v__gen__c__cescape_nonascii(string original); VV_LOCAL_SYMBOL string v__gen__c__cestring(string s); VV_LOCAL_SYMBOL string v__gen__c__ctoslit(string s); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_attrs(v__gen__c__Gen* g, Array_v__ast__Attr attrs); VV_LOCAL_SYMBOL void v__gen__c__Gen_asm_stmt(v__gen__c__Gen* g, v__ast__AsmStmt stmt); VV_LOCAL_SYMBOL void v__gen__c__Gen_asm_arg(v__gen__c__Gen* g, v__ast__AsmArg arg, v__ast__AsmStmt stmt); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_asm_ios(v__gen__c__Gen* g, Array_v__ast__AsmIO ios); VV_LOCAL_SYMBOL string v__gen__c__cnewlines(string s); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_fn_ptr_decl(v__gen__c__Gen* g, v__ast__FnType* func, string ptr_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_register_ternary_name(v__gen__c__Gen* g, string name); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_ternary_name(v__gen__c__Gen* g, string name); VV_LOCAL_SYMBOL bool v__gen__c__Gen_gen_clone_assignment(v__gen__c__Gen* g, v__ast__Expr val, v__ast__Type typ, bool add_eq); VV_LOCAL_SYMBOL void v__gen__c__Gen_autofree_scope_vars(v__gen__c__Gen* g, int pos, int line_nr, bool free_parent_scopes); VV_LOCAL_SYMBOL void v__gen__c__Gen_autofree_scope_vars_stop(v__gen__c__Gen* g, int pos, int line_nr, bool free_parent_scopes, int stop_pos); VV_LOCAL_SYMBOL void v__gen__c__Gen_autofree_scope_vars2(v__gen__c__Gen* g, v__ast__Scope* scope, int start_pos, int end_pos, int line_nr, bool free_parent_scopes, int stop_pos); VV_LOCAL_SYMBOL void v__gen__c__Gen_autofree_variable(v__gen__c__Gen* g, v__ast__Var v); VV_LOCAL_SYMBOL void v__gen__c__Gen_autofree_var_call(v__gen__c__Gen* g, string free_fn_name, v__ast__Var v); VV_LOCAL_SYMBOL multi_return_string_string_string_string v__gen__c__Gen_map_fn_ptrs(v__gen__c__Gen* g, v__ast__TypeSymbol key_typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_expr(v__gen__c__Gen* g, v__ast__Expr node_); VV_LOCAL_SYMBOL void v__gen__c__Gen_char_literal(v__gen__c__Gen* g, v__ast__CharLiteral node); VV_LOCAL_SYMBOL void v__gen__c__Gen_type_name(v__gen__c__Gen* g, v__ast__Type raw_type); VV_LOCAL_SYMBOL void v__gen__c__Gen_typeof_expr(v__gen__c__Gen* g, v__ast__TypeOf node); VV_LOCAL_SYMBOL void v__gen__c__Gen_selector_expr(v__gen__c__Gen* g, v__ast__SelectorExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_enum_decl(v__gen__c__Gen* g, v__ast__EnumDecl node); VV_LOCAL_SYMBOL void v__gen__c__Gen_enum_expr(v__gen__c__Gen* g, v__ast__Expr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_lock_expr(v__gen__c__Gen* g, v__ast__LockExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_unlock_locks(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_map_init(v__gen__c__Gen* g, v__ast__MapInit node); VV_LOCAL_SYMBOL void v__gen__c__Gen_select_expr(v__gen__c__Gen* g, v__ast__SelectExpr node); bool v__gen__c__Gen_is_generic_param_var(v__gen__c__Gen* g, v__ast__Expr node); bool v__gen__c__Gen_is_comptime_var(v__gen__c__Gen* g, v__ast__Expr node); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_const_name(v__gen__c__Gen* g, v__ast__Ident node); VV_LOCAL_SYMBOL void v__gen__c__Gen_ident(v__gen__c__Gen* g, v__ast__Ident node); VV_LOCAL_SYMBOL void v__gen__c__Gen_cast_expr(v__gen__c__Gen* g, v__ast__CastExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_concat_expr(v__gen__c__Gen* g, v__ast__ConcatExpr node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_expr_is_multi_return_call(v__gen__c__Gen* g, v__ast__Expr expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_result_error(v__gen__c__Gen* g, v__ast__Type target_type, v__ast__Expr expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_option_error(v__gen__c__Gen* g, v__ast__Type target_type, v__ast__Expr expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_hash_stmt(v__gen__c__Gen* g, v__ast__HashStmt node); VV_LOCAL_SYMBOL void v__gen__c__Gen_branch_stmt(v__gen__c__Gen* g, v__ast__BranchStmt node); VV_LOCAL_SYMBOL void v__gen__c__Gen_return_stmt(v__gen__c__Gen* g, v__ast__Return node); VV_LOCAL_SYMBOL void v__gen__c__Gen_const_decl(v__gen__c__Gen* g, v__ast__ConstDecl node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_const_decl_precomputed(v__gen__c__Gen* g, string mod, string name, string field_name, v__ast__ComptTimeConstValue ct_value, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_const_decl_write_precomputed(v__gen__c__Gen* g, string mod, string styp, string cname, string field_name, string ct_value); VV_LOCAL_SYMBOL void v__gen__c__Gen_const_decl_simple_define(v__gen__c__Gen* g, string mod, string name, string val); VV_LOCAL_SYMBOL string v__gen__c__Gen_c_const_name(v__gen__c__Gen* g, string name); VV_LOCAL_SYMBOL void v__gen__c__Gen_const_decl_init_later(v__gen__c__Gen* g, string mod, string name, v__ast__Expr expr, v__ast__Type typ, bool unwrap_option); VV_LOCAL_SYMBOL void v__gen__c__Gen_global_decl(v__gen__c__Gen* g, v__ast__GlobalDecl node); VV_LOCAL_SYMBOL void v__gen__c__Gen_assoc(v__gen__c__Gen* g, v__ast__Assoc node); VV_LOCAL_SYMBOL void v__gen__c__verror(string s); VV_LOCAL_SYMBOL void v__gen__c__Gen_error(v__gen__c__Gen* g, string s, v__token__Pos pos); VV_LOCAL_SYMBOL void v__gen__c__Gen_checker_bug(v__gen__c__Gen* g, string s, v__token__Pos pos); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_debug_calls_typeof_functions(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_init_function(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_builtin_types(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_sorted_types(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_types(v__gen__c__Gen* g, Array_v__ast__TypeSymbol_ptr symbols); VV_LOCAL_SYMBOL void v__gen__c__Gen_sort_globals_consts(v__gen__c__Gen* g); VV_LOCAL_SYMBOL Array_v__ast__TypeSymbol_ptr v__gen__c__Gen_sort_structs(v__gen__c__Gen* g, Array_v__ast__TypeSymbol_ptr typesa); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_or_block_stmts(v__gen__c__Gen* g, string cvar_name, string cast_typ, Array_v__ast__Stmt stmts, v__ast__Type return_type, bool is_option); VV_LOCAL_SYMBOL void v__gen__c__Gen_or_block(v__gen__c__Gen* g, string var_name, v__ast__OrExpr or_block, v__ast__Type return_type); VV_LOCAL_SYMBOL string v__gen__c__c_name(string name_); VV_LOCAL_SYMBOL string v__gen__c__Gen_type_default(v__gen__c__Gen* g, v__ast__Type typ_); VV_LOCAL_SYMBOL Array_string v__gen__c__Gen_get_all_test_function_names(v__gen__c__Gen* g); VV_LOCAL_SYMBOL v__ast__Type v__gen__c__Gen_get_type(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_size_of(v__gen__c__Gen* g, v__ast__SizeOf node); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_enum_prefix(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_enum_val(v__gen__c__Gen* g, v__ast__EnumVal node); VV_LOCAL_SYMBOL void v__gen__c__Gen_as_cast(v__gen__c__Gen* g, v__ast__AsCast node); VV_LOCAL_SYMBOL string v__gen__c__Gen_as_cast_name_table(v__gen__c__Gen* g); VV_LOCAL_SYMBOL bool v__gen__c__Gen_has_been_referenced(v__gen__c__Gen* g, string fn_name); VV_LOCAL_SYMBOL string v__gen__c__Gen_interface_table(v__gen__c__Gen* g); VV_LOCAL_SYMBOL multi_return_int_string_string_string v__gen__c__Gen_panic_debug_info(v__gen__c__Gen* g, v__token__Pos pos); string v__gen__c__get_guarded_include_text(string iname, string imessage); int v__gen__c__Gen_get_array_depth(v__gen__c__Gen* g, v__ast__Type el_typ); bool v__gen__c__Gen_contains_ptr(v__gen__c__Gen* g, v__ast__Type el_typ); VV_LOCAL_SYMBOL string v__gen__c__Gen_check_noscan(v__gen__c__Gen* g, v__ast__Type elem_typ); VV_LOCAL_SYMBOL string v__gen__c__c_closure_helpers(v__pref__Preferences* pref_); void v__gen__c__Gen_gen_c_main(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_vlines_reset(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_c_main_function_only_header(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_c_main_function_header(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_c_main_header(v__gen__c__Gen* g); void v__gen__c__Gen_gen_c_main_footer(v__gen__c__Gen* g); void v__gen__c__Gen_gen_c_android_sokol_main(v__gen__c__Gen* g); void v__gen__c__Gen_write_tests_definitions(v__gen__c__Gen* g); void v__gen__c__Gen_gen_failing_error_propagation_for_test_fn(v__gen__c__Gen* g, v__ast__OrExpr or_block, string cvar_name); void v__gen__c__Gen_gen_failing_return_error_for_test_fn(v__gen__c__Gen* g, v__ast__Return return_stmt, string cvar_name); void v__gen__c__Gen_gen_c_main_profile_hook(v__gen__c__Gen* g); void v__gen__c__Gen_gen_c_main_for_tests(v__gen__c__Gen* g); Array_string v__gen__c__Gen_filter_only_matching_fn_names(v__gen__c__Gen* g, Array_string fnames); void v__gen__c__Gen_gen_c_main_trace_calls_hook(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_comptime_selector_key_type(v__gen__c__Gen* g, v__ast__ComptimeSelector val); VV_LOCAL_SYMBOL multi_return_v__ast__StructField_string v__gen__c__Gen_get_comptime_selector_var_type(v__gen__c__Gen* g, v__ast__ComptimeSelector node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_get_comptime_selector_bool_field(v__gen__c__Gen* g, string field_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_comptime_selector(v__gen__c__Gen* g, v__ast__ComptimeSelector node); VV_LOCAL_SYMBOL void v__gen__c__Gen_comptime_call(v__gen__c__Gen* g, v__ast__ComptimeCall* node); VV_LOCAL_SYMBOL Array_string v__gen__c__cgen_attrs(Array_v__ast__Attr attrs); VV_LOCAL_SYMBOL void v__gen__c__Gen_comptime_at(v__gen__c__Gen* g, v__ast__AtExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_comptime_if(v__gen__c__Gen* g, v__ast__IfExpr node); VV_LOCAL_SYMBOL v__ast__Type v__gen__c__Gen_get_expr_type(v__gen__c__Gen* g, v__ast__Expr cond); VV_LOCAL_SYMBOL multi_return_bool_bool v__gen__c__Gen_comptime_if_cond(v__gen__c__Gen* g, v__ast__Expr cond, bool pkg_exist); VV_LOCAL_SYMBOL void v__gen__c__Gen_push_existing_comptime_values(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_pop_existing_comptime_values(v__gen__c__Gen* g); VV_LOCAL_SYMBOL bool v__gen__c__Gen_is_comptime_selector_field_name(v__gen__c__Gen* g, v__ast__SelectorExpr node, string field_name); VV_LOCAL_SYMBOL bool v__gen__c__Gen_is_comptime_selector_type(v__gen__c__Gen* g, v__ast__SelectorExpr node); VV_LOCAL_SYMBOL v__ast__Type v__gen__c__Gen_get_comptime_var_type(v__gen__c__Gen* g, v__ast__Expr node); VV_LOCAL_SYMBOL v__ast__Type v__gen__c__Gen_resolve_comptime_type(v__gen__c__Gen* g, v__ast__Expr node, v__ast__Type default_type); VV_LOCAL_SYMBOL void v__gen__c__Gen_comptime_for(v__gen__c__Gen* g, v__ast__ComptimeFor node); VV_LOCAL_SYMBOL _result_string v__gen__c__Gen_comptime_if_to_ifdef(v__gen__c__Gen* g, string name, bool is_comptime_option); VV_LOCAL_SYMBOL v__ast__CTempVar v__gen__c__Gen_new_ctemp_var(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expr_type); VV_LOCAL_SYMBOL v__ast__CTempVar v__gen__c__Gen_new_ctemp_var_then_gen(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expr_type); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_ctemp_var(v__gen__c__Gen* g, v__ast__CTempVar tvar); VV_LOCAL_SYMBOL void v__gen__c__Gen_dump_expr(v__gen__c__Gen* g, v__ast__DumpExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_dump_expr_definitions(v__gen__c__Gen* g); VV_LOCAL_SYMBOL bool v__gen__c__Gen_writeln_fn_header(v__gen__c__Gen* g, string s, strings__Builder* sb); VV_LOCAL_SYMBOL bool v__gen__c__Gen_should_really_embed_file(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_handle_embedded_files_finish(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_embed_file_init(v__gen__c__Gen* g, v__ast__ComptimeCall* node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_embedded_metadata(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_embedded_data(v__gen__c__Gen* g); VV_LOCAL_SYMBOL bool v__gen__c__Gen_is_used_by_main(v__gen__c__Gen* g, v__ast__FnDecl node); VV_LOCAL_SYMBOL void v__gen__c__Gen_fn_decl(v__gen__c__Gen* g, v__ast__FnDecl node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_fn_decl(v__gen__c__Gen* g, v__ast__FnDecl* node, bool skip); VV_LOCAL_SYMBOL string v__gen__c__Gen_c_fn_name(v__gen__c__Gen* g, v__ast__FnDecl* node); VV_LOCAL_SYMBOL string v__gen__c__Gen_closure_ctx(v__gen__c__Gen* g, v__ast__FnDecl node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_anon_fn(v__gen__c__Gen* g, v__ast__AnonFn* node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_anon_fn_decl(v__gen__c__Gen* g, v__ast__AnonFn* node); VV_LOCAL_SYMBOL string v__gen__c__Gen_defer_flag_var(v__gen__c__Gen* g, v__ast__DeferStmt* stmt); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_defer_stmts_when_needed(v__gen__c__Gen* g); VV_LOCAL_SYMBOL multi_return_Array_string_Array_string_Array_bool v__gen__c__Gen_fn_decl_params(v__gen__c__Gen* g, Array_v__ast__Param params, v__ast__Scope* scope, bool is_variadic); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_anon_fn_type_name(v__gen__c__Gen* g, v__ast__AnonFn* node, string var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_call_expr(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_conversion_function_call(v__gen__c__Gen* g, string prefix, string postfix, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_arg_from_type(v__gen__c__Gen* g, v__ast__Type node_type, v__ast__Expr node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_gen_map_method_call(v__gen__c__Gen* g, v__ast__CallExpr node, v__ast__Type left_type, v__ast__TypeSymbol left_sym); VV_LOCAL_SYMBOL bool v__gen__c__Gen_gen_array_method_call(v__gen__c__Gen* g, v__ast__CallExpr node, v__ast__Type left_type); VV_LOCAL_SYMBOL bool v__gen__c__Gen_gen_to_str_method_call(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL v__ast__Type v__gen__c__Gen_get_gn_var_type(v__gen__c__Gen* g, v__ast__Ident var); VV_LOCAL_SYMBOL v__ast__Type v__gen__c__Gen_get_generic_array_element_type(v__gen__c__Gen* g, v__ast__Array _v_array); VV_LOCAL_SYMBOL Map_int_v__ast__Type v__gen__c__Gen_change_comptime_args(v__gen__c__Gen* g, v__ast__Fn func, v__ast__CallExpr* node_, Array_v__ast__Type concrete_types); VV_LOCAL_SYMBOL void v__gen__c__Gen_method_call(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_fn_call(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_autofree_call_pregen(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_autofree_call_postgen(v__gen__c__Gen* g, int node_pos); VV_LOCAL_SYMBOL void v__gen__c__Gen_call_args(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL int v__gen__c__Gen_keep_alive_call_pregen(v__gen__c__Gen* g, v__ast__CallExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_keep_alive_call_postgen(v__gen__c__Gen* g, v__ast__CallExpr node, int tmp_cnt_save); VV_LOCAL_SYMBOL void v__gen__c__Gen_ref_or_deref_arg(v__gen__c__Gen* g, v__ast__CallArg arg, v__ast__Type expected_type, v__ast__Language lang); VV_LOCAL_SYMBOL bool v__gen__c__Gen_is_gui_app(v__gen__c__Gen* g); VV_LOCAL_SYMBOL bool v__gen__c__Gen_fileis(v__gen__c__Gen* g, string s); VV_LOCAL_SYMBOL string v__gen__c__Gen_write_fn_attrs(v__gen__c__Gen* g, Array_v__ast__Attr attrs); VV_LOCAL_SYMBOL string v__gen__c__call_convention_attribute(string cconvention, bool is_cc_msvc); VV_LOCAL_SYMBOL void v__gen__c__Gen_for_c_stmt(v__gen__c__Gen* g, v__ast__ForCStmt node); VV_LOCAL_SYMBOL void v__gen__c__Gen_for_stmt(v__gen__c__Gen* g, v__ast__ForStmt node); VV_LOCAL_SYMBOL void v__gen__c__Gen_for_in_stmt(v__gen__c__Gen* g, v__ast__ForInStmt node_); VV_LOCAL_SYMBOL bool v__gen__c__Gen_need_tmp_var_in_if(v__gen__c__Gen* g, v__ast__IfExpr node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_need_tmp_var_in_expr(v__gen__c__Gen* g, v__ast__Expr expr); VV_LOCAL_SYMBOL bool v__gen__c__Gen_needs_conds_order(v__gen__c__Gen* g, v__ast__IfExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_if_expr(v__gen__c__Gen* g, v__ast__IfExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_index_expr(v__gen__c__Gen* g, v__ast__IndexExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_index_range_expr(v__gen__c__Gen* g, v__ast__IndexExpr node, v__ast__RangeExpr range); VV_LOCAL_SYMBOL void v__gen__c__Gen_index_of_array(v__gen__c__Gen* g, v__ast__IndexExpr node, v__ast__TypeSymbol sym); VV_LOCAL_SYMBOL void v__gen__c__Gen_index_of_fixed_array(v__gen__c__Gen* g, v__ast__IndexExpr node, v__ast__TypeSymbol sym); VV_LOCAL_SYMBOL void v__gen__c__Gen_index_of_map(v__gen__c__Gen* g, v__ast__IndexExpr node, v__ast__TypeSymbol sym); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_arrow_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_eq_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_cmp_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_in_sumtype_interface_array(v__gen__c__Gen* g, Array_v__ast__InfixExpr infix_exprs); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_in_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_in_optimization(v__gen__c__Gen* g, v__ast__Expr left, v__ast__ArrayInit right); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_is_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_interface_is_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_arithmetic_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_left_shift_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_need_tmp_var_in_array_call(v__gen__c__Gen* g, v__ast__Expr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_and_or_op(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_is_none_check(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_plain_infix_expr(v__gen__c__Gen* g, v__ast__InfixExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_op_arg(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type expected, v__ast__Type got); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_safe_integer_infix_expr(v__gen__c__Gen* g, v__gen__c__GenSafeIntegerCfg cfg); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_json_for_type(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_jsons(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_enum_to_str(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__TypeSymbol sym, string enum_var, string result_var, string ident, strings__Builder* enc); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_str_to_enum(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__TypeSymbol sym, string val_var, string result_var, string ident, strings__Builder* dec); VV_LOCAL_SYMBOL bool v__gen__c__Gen_is_enum_as_int(v__gen__c__Gen* g, v__ast__TypeSymbol sym); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_enum_enc_dec(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__TypeSymbol sym, strings__Builder* enc, strings__Builder* dec); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_prim_enc_dec(v__gen__c__Gen* g, v__ast__Type typ, strings__Builder* enc, strings__Builder* dec); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_option_enc_dec(v__gen__c__Gen* g, v__ast__Type typ, strings__Builder* enc, strings__Builder* dec); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_sumtype_enc_dec(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__TypeSymbol sym, strings__Builder* enc, strings__Builder* dec, string ret_styp); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_struct_enc_dec(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__TypeInfo type_info, string styp, strings__Builder* enc, strings__Builder* dec); VV_LOCAL_SYMBOL void v__gen__c__gen_js_get(string styp, string tmp, string name, strings__Builder* dec, bool is_required); VV_LOCAL_SYMBOL void v__gen__c__gen_js_get_opt(string dec_name, string field_type, string styp, string tmp, string name, strings__Builder* dec, bool is_required); VV_LOCAL_SYMBOL string v__gen__c__js_enc_name(string typ); VV_LOCAL_SYMBOL string v__gen__c__js_dec_name(string typ); VV_LOCAL_SYMBOL bool v__gen__c__is_js_prim(string typ); VV_LOCAL_SYMBOL string v__gen__c__Gen_decode_array(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__Type value_type, int fixed_array_size, string ret_styp); VV_LOCAL_SYMBOL string v__gen__c__Gen_encode_array(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__Type value_type, int fixed_array_size); VV_LOCAL_SYMBOL string v__gen__c__Gen_decode_map(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__Type key_type, v__ast__Type value_type, string ustyp); VV_LOCAL_SYMBOL string v__gen__c__Gen_encode_map(v__gen__c__Gen* g, v__ast__Type utyp, v__ast__Type key_type, v__ast__Type value_type); VV_LOCAL_SYMBOL void v__gen__c__Gen_generate_hotcode_reloading_declarations(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_generate_hotcode_reloader_code(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_generate_hotcode_reloading_main_caller(v__gen__c__Gen* g); VV_LOCAL_SYMBOL bool v__gen__c__Gen_need_tmp_var_in_match(v__gen__c__Gen* g, v__ast__MatchExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_match_expr(v__gen__c__Gen* g, v__ast__MatchExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_match_expr_sumtype(v__gen__c__Gen* g, v__ast__MatchExpr node, bool is_expr, string cond_var, string tmp_var); VV_LOCAL_SYMBOL void v__gen__c__Gen_match_expr_switch(v__gen__c__Gen* g, v__ast__MatchExpr node, bool is_expr, string cond_var, string tmp_var, v__ast__TypeSymbol cond_fsym); VV_LOCAL_SYMBOL bool v__gen__c__Gen_should_check_low_bound_in_range_expr(v__gen__c__Gen* g, v__ast__RangeExpr expr, bool node_cond_type_unsigned); VV_LOCAL_SYMBOL void v__gen__c__Gen_match_expr_classic(v__gen__c__Gen* g, v__ast__MatchExpr node, bool is_expr, string cond_var, string tmp_var); VV_LOCAL_SYMBOL void v__gen__c__Gen_sql_select_expr(v__gen__c__Gen* g, v__ast__SqlExpr node); VV_LOCAL_SYMBOL void v__gen__c__Gen_sql_stmt(v__gen__c__Gen* g, v__ast__SqlStmt node); VV_LOCAL_SYMBOL void v__gen__c__Gen_sql_stmt_line(v__gen__c__Gen* g, v__ast__SqlStmtLine stmt_line, string connection_var_name, v__ast__OrExpr or_expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_connection_init(v__gen__c__Gen* g, string connection_var_name, v__ast__Expr* db_expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_create_table(v__gen__c__Gen* g, v__ast__SqlStmtLine node, string table_name, string connection_var_name, string result_var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_drop_table(v__gen__c__Gen* g, string table_name, string connection_var_name, string result_var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_insert(v__gen__c__Gen* g, v__ast__SqlStmtLine* node, string table_name, string connection_var_name, string result_var_name, v__ast__OrExpr* or_expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_update(v__gen__c__Gen* g, v__ast__SqlStmtLine* node, string table_name, string connection_var_name, string result_var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_delete(v__gen__c__Gen* g, v__ast__SqlStmtLine* node, string table_name, string connection_var_name, string result_var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_insert_with_last_ids(v__gen__c__Gen* g, v__ast__SqlStmtLine node, string connection_var_name, string table_name, string last_ids_arr, string res, string pid, string fkey, v__ast__OrExpr or_expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_expr_to_primitive(v__gen__c__Gen* g, v__ast__Expr expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_primitive(v__gen__c__Gen* g, v__ast__Type t, v__ast__Expr expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_where(v__gen__c__Gen* g, v__ast__Expr where_expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_where_expr(v__gen__c__Gen* g, v__ast__Expr expr, Array_string* fields, Array_Array_int* parentheses, Array_string* kinds, Array_v__ast__Expr* data, Array_bool* is_and); VV_LOCAL_SYMBOL void v__gen__c__Gen_write_orm_select(v__gen__c__Gen* g, v__ast__SqlExpr node, string connection_var_name, string left_expr_string, v__ast__OrExpr or_expr); VV_LOCAL_SYMBOL Array_v__ast__StructField v__gen__c__Gen_filter_struct_fields_by_orm_attrs(v__gen__c__Gen* _d1, Array_v__ast__StructField fields); VV_LOCAL_SYMBOL _option_v__ast__Type v__gen__c__Gen_get_db_expr_type(v__gen__c__Gen* g, v__ast__Expr expr); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_table_name_by_struct_type(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL _option_v__ast__StructField v__gen__c__Gen_get_orm_current_table_field(v__gen__c__Gen* g, string name); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_orm_column_name_from_struct_field(v__gen__c__Gen* g, v__ast__StructField field); VV_LOCAL_SYMBOL _option_v__ast__StructField v__gen__c__Gen_get_orm_struct_primary_field(v__gen__c__Gen* _d2, Array_v__ast__StructField fields); VV_LOCAL_SYMBOL v__gen__c__PastTmpVar v__gen__c__Gen_past_tmp_var_new(v__gen__c__Gen* g); VV_LOCAL_SYMBOL v__gen__c__PastTmpVar v__gen__c__Gen_past_tmp_var_from_var_name(v__gen__c__Gen* g, string var_name); VV_LOCAL_SYMBOL void v__gen__c__Gen_past_tmp_var_done(v__gen__c__Gen* g, v__gen__c__PastTmpVar* p); VV_LOCAL_SYMBOL void v__gen__c__Gen_profile_fn(v__gen__c__Gen* g, v__ast__FnDecl fn_decl); void v__gen__c__Gen_gen_vprint_profile_stats(v__gen__c__Gen* g); VV_LOCAL_SYMBOL int v__gen__c__Gen_reflection_string(v__gen__c__Gen* g, string str); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_reflection_strings(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_empty_array(v__gen__c__Gen* g, string type_name); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_functionarg_array(v__gen__c__Gen* g, string type_name, v__ast__Fn node); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_function_array(v__gen__c__Gen* g, Array_v__ast__Fn nodes); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_reflection_fn(v__gen__c__Gen* g, v__ast__Fn node); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_reflection_sym(v__gen__c__Gen* g, v__ast__TypeSymbol tsym); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_attrs_array(v__gen__c__Gen* g, Array_v__ast__Attr attrs); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_fields_array(v__gen__c__Gen* g, Array_v__ast__StructField fields); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_type_array(v__gen__c__Gen* g, Array_v__ast__Type types); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_string_array(v__gen__c__Gen* g, Array_string strs); VV_LOCAL_SYMBOL string v__gen__c__Gen_gen_reflection_sym_info(v__gen__c__Gen* g, v__ast__TypeSymbol tsym); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_reflection_data(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_spawn_and_go_expr(v__gen__c__Gen* g, v__ast__SpawnExpr node, v__gen__c__SpawnGoMode mode); VV_LOCAL_SYMBOL string v__gen__c__Gen_get_cur_thread_stack_size(v__gen__c__Gen* g, string name); VV_LOCAL_SYMBOL void v__gen__c__Gen_string_literal(v__gen__c__Gen* g, v__ast__StringLiteral node); VV_LOCAL_SYMBOL void v__gen__c__Gen_string_inter_literal_sb_optimized(v__gen__c__Gen* g, v__ast__CallExpr call_expr); VV_LOCAL_SYMBOL void v__gen__c__Gen_gen_expr_to_string(v__gen__c__Gen* g, v__ast__Expr expr, v__ast__Type etype); VV_LOCAL_SYMBOL u8 v__gen__c__Gen_get_default_fmt(v__gen__c__Gen* g, v__ast__Type ftyp, v__ast__Type typ); VV_LOCAL_SYMBOL multi_return_u64_string v__gen__c__Gen_str_format(v__gen__c__Gen* g, v__ast__StringInterLiteral node, int i, Array_u8 fmts); VV_LOCAL_SYMBOL void v__gen__c__Gen_str_val(v__gen__c__Gen* g, v__ast__StringInterLiteral node, int i, Array_u8 fmts); VV_LOCAL_SYMBOL void v__gen__c__Gen_string_inter_literal(v__gen__c__Gen* g, v__ast__StringInterLiteral node); VV_LOCAL_SYMBOL void v__gen__c__Gen_struct_init(v__gen__c__Gen* g, v__ast__StructInit node); VV_LOCAL_SYMBOL bool v__gen__c__Gen_zero_struct_field(v__gen__c__Gen* g, v__ast__StructField field); VV_LOCAL_SYMBOL bool v__gen__c__Gen_is_empty_struct(v__gen__c__Gen* g, v__gen__c__Type t); VV_LOCAL_SYMBOL void v__gen__c__Gen_struct_decl(v__gen__c__Gen* g, v__ast__Struct s, string name, bool is_anon); VV_LOCAL_SYMBOL void v__gen__c__Gen_struct_init_field(v__gen__c__Gen* g, v__ast__StructInitField sfield, v__ast__Language language); VV_LOCAL_SYMBOL void v__gen__c__Gen_write(v__gen__c__Gen* g, string s); VV_LOCAL_SYMBOL void v__gen__c__Gen_writeln(v__gen__c__Gen* g, string s); VV_LOCAL_SYMBOL void v__gen__c__Gen_go_back(v__gen__c__Gen* g, int n); VV_LOCAL_SYMBOL void v__gen__c__Gen_go_back_to(v__gen__c__Gen* g, int n); VV_LOCAL_SYMBOL int v__gen__c__Gen_nth_stmt_pos(v__gen__c__Gen* g, int n); VV_LOCAL_SYMBOL void v__gen__c__Gen_set_current_pos_as_last_stmt_pos(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_go_before_last_stmt(v__gen__c__Gen* g); VV_LOCAL_SYMBOL string v__gen__c__Gen_go_before_ternary(v__gen__c__Gen* g); VV_LOCAL_SYMBOL void v__gen__c__Gen_insert_before_stmt(v__gen__c__Gen* g, string s); VV_LOCAL_SYMBOL void v__gen__c__Gen_insert_at(v__gen__c__Gen* g, int pos, string s); VV_LOCAL_SYMBOL v__ast__Type v__gen__c__Gen_unwrap_generic(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL v__gen__c__Type v__gen__c__Gen_unwrap(v__gen__c__Gen* g, v__ast__Type typ); VV_LOCAL_SYMBOL string v__gen__c__Gen_fn_var_signature(v__gen__c__Gen* g, v__ast__Type return_type, Array_v__ast__Type arg_types, string var_name); VV_LOCAL_SYMBOL string v__gen__c__escape_quotes(string val); VV_LOCAL_SYMBOL string v__gen__c__Gen_dot_or_ptr(v__gen__c__Gen* g, v__ast__Type val_type); _result_v__scanner__Scanner_ptr v__scanner__new_scanner_file(string file_path, v__scanner__CommentsMode comments_mode, v__pref__Preferences* pref_); v__scanner__Scanner* v__scanner__new_scanner(string text, v__scanner__CommentsMode comments_mode, v__pref__Preferences* pref_); void v__scanner__Scanner_free(v__scanner__Scanner* s); VV_LOCAL_SYMBOL bool v__scanner__Scanner_should_parse_comment(v__scanner__Scanner* s); void v__scanner__Scanner_set_is_inside_toplevel_statement(v__scanner__Scanner* s, bool newstate); void v__scanner__Scanner_set_current_tidx(v__scanner__Scanner* s, int cidx); VV_LOCAL_SYMBOL v__token__Token v__scanner__Scanner_new_token(v__scanner__Scanner* s, v__token__Kind tok_kind, string lit, int len); VV_LOCAL_SYMBOL v__token__Token v__scanner__Scanner_new_eof_token(v__scanner__Scanner* s); VV_LOCAL_SYMBOL v__token__Token v__scanner__Scanner_new_multiline_token(v__scanner__Scanner* s, v__token__Kind tok_kind, string lit, int len, int start_line); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_name(v__scanner__Scanner* s); VV_LOCAL_SYMBOL string v__scanner__Scanner_num_lit(v__scanner__Scanner* s, int start, int end); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_bin_number(v__scanner__Scanner* s); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_hex_number(v__scanner__Scanner* s); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_oct_number(v__scanner__Scanner* s); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_dec_number(v__scanner__Scanner* s); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_number(v__scanner__Scanner* s); VV_LOCAL_SYMBOL void v__scanner__Scanner_skip_whitespace(v__scanner__Scanner* s); VV_LOCAL_SYMBOL v__token__Token v__scanner__Scanner_end_of_file(v__scanner__Scanner* s); VV_LOCAL_SYMBOL void v__scanner__Scanner_scan_all_tokens_in_buffer(v__scanner__Scanner* s); VV_LOCAL_SYMBOL void v__scanner__Scanner_scan_remaining_text(v__scanner__Scanner* s); v__token__Token v__scanner__Scanner_scan(v__scanner__Scanner* s); v__token__Token v__scanner__Scanner_peek_token(v__scanner__Scanner* s, int n); VV_LOCAL_SYMBOL u8 v__scanner__Scanner_look_ahead(v__scanner__Scanner* s, int n); VV_LOCAL_SYMBOL v__token__Token v__scanner__Scanner_text_scan(v__scanner__Scanner* s); VV_LOCAL_SYMBOL void v__scanner__Scanner_invalid_character(v__scanner__Scanner* s); VV_LOCAL_SYMBOL int v__scanner__Scanner_current_column(v__scanner__Scanner* s); VV_LOCAL_SYMBOL int v__scanner__Scanner_count_symbol_before(v__scanner__Scanner* s, int p, u8 sym); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_string(v__scanner__Scanner* s); VV_LOCAL_SYMBOL int compare_2358202099351622853_int(int* a, int* b) { if (*a < *b) return -1; else return 1; } VV_LOCAL_SYMBOL multi_return_int_string v__scanner__Scanner_decode_h_escape_single(v__scanner__Scanner* s, string str, int idx); VV_LOCAL_SYMBOL string v__scanner__Scanner_decode_h_escapes(v__scanner__Scanner* s, string sinput, int start, Array_int escapes_pos); VV_LOCAL_SYMBOL string v__scanner__Scanner_decode_o_escapes(v__scanner__Scanner* s, string sinput, int start, Array_int escapes_pos); VV_LOCAL_SYMBOL multi_return_int_string v__scanner__Scanner_decode_u_escape_single(v__scanner__Scanner* s, string str, int idx); VV_LOCAL_SYMBOL string v__scanner__Scanner_decode_u_escapes(v__scanner__Scanner* s, string str, int start, Array_int escapes_pos); VV_LOCAL_SYMBOL string v__scanner__trim_slash_line_break(string s); VV_LOCAL_SYMBOL bool v__scanner__is_escape_sequence(u8 c); VV_LOCAL_SYMBOL string v__scanner__Scanner_ident_char(v__scanner__Scanner* s); VV_LOCAL_SYMBOL bool v__scanner__Scanner_expect(v__scanner__Scanner* s, string want, int start_pos); VV_LOCAL_SYMBOL void v__scanner__Scanner_ignore_line(v__scanner__Scanner* s); VV_LOCAL_SYMBOL void v__scanner__Scanner_eat_to_end_of_line(v__scanner__Scanner* s); VV_LOCAL_SYMBOL void v__scanner__Scanner_inc_line_number(v__scanner__Scanner* s); v__token__Pos v__scanner__Scanner_current_pos(v__scanner__Scanner* s); void v__scanner__Scanner_note(v__scanner__Scanner* s, string msg); void v__scanner__Scanner_add_error_detail(v__scanner__Scanner* s, string msg); void v__scanner__Scanner_add_error_detail_with_pos(v__scanner__Scanner* s, string msg, v__token__Pos pos); VV_LOCAL_SYMBOL string v__scanner__Scanner_eat_details(v__scanner__Scanner* s); void v__scanner__Scanner_warn(v__scanner__Scanner* s, string msg); void v__scanner__Scanner_warn_with_pos(v__scanner__Scanner* s, string msg, v__token__Pos pos); void v__scanner__Scanner_error(v__scanner__Scanner* s, string msg); void v__scanner__Scanner_error_with_pos(v__scanner__Scanner* s, string msg, v__token__Pos pos); VV_LOCAL_SYMBOL void v__scanner__Scanner_vet_error(v__scanner__Scanner* s, string msg, v__vet__FixKind fix); VV_LOCAL_SYMBOL bool v__ast__walker__empty_callback(v__ast__Node* node, voidptr data); _result_void v__ast__walker__Inspector_visit(v__ast__walker__Inspector* i, v__ast__Node* node); void v__ast__walker__inspect(v__ast__Node* node, voidptr data, bool (*inspector_callback)(v__ast__Node* node, voidptr data)); void v__ast__walker__walk(v__ast__walker__Visitor* visitor, v__ast__Node* node); VV_LOCAL_SYMBOL void v__checker__Checker_assign_stmt(v__checker__Checker* c, v__ast__AssignStmt* node); VV_LOCAL_SYMBOL void v__checker__Checker_ident_autocomplete(v__checker__Checker* c, v__ast__Ident node); VV_LOCAL_SYMBOL int compare_11428131622760361090_v__checker__ACFieldMethod_by_name(v__checker__ACFieldMethod* a, v__checker__ACFieldMethod* b) { if (string__lt(a->name, b->name)) return -1; else return 1; } VV_LOCAL_SYMBOL string v__checker__build_method_summary(v__ast__Fn method); VV_LOCAL_SYMBOL bool v__checker__Checker_check_types(v__checker__Checker* c, v__ast__Type got, v__ast__Type expected); VV_LOCAL_SYMBOL bool v__checker__Checker_check_multiple_ptr_match(v__checker__Checker _v_toheap_c, v__ast__Type got, v__ast__Type expected, v__ast__Param param, v__ast__CallArg arg); VV_LOCAL_SYMBOL _result_void v__checker__Checker_check_expected_call_arg(v__checker__Checker* c, v__ast__Type got, v__ast__Type expected_, v__ast__Language language, v__ast__CallArg arg); VV_LOCAL_SYMBOL multi_return_string_string v__checker__Checker_get_string_names_of(v__checker__Checker _v_toheap_c, v__ast__Type got, v__ast__Type expected); VV_LOCAL_SYMBOL bool v__checker__Checker_check_same_module(v__checker__Checker _v_toheap_c, v__ast__Type got, v__ast__Type expected); VV_LOCAL_SYMBOL bool v__checker__Checker_check_basic(v__checker__Checker* c, v__ast__Type got, v__ast__Type expected); VV_LOCAL_SYMBOL bool v__checker__Checker_check_matching_function_symbols(v__checker__Checker* c, v__ast__TypeSymbol* got_type_sym, v__ast__TypeSymbol* exp_type_sym); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_check_shift(v__checker__Checker* c, v__ast__InfixExpr* node, v__ast__Type left_type_, v__ast__Type right_type_); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_promote_keeping_aliases(v__checker__Checker* c, v__ast__Type left_type, v__ast__Type right_type, v__ast__Kind left_kind, v__ast__Kind right_kind); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_promote(v__checker__Checker* c, v__ast__Type left_type, v__ast__Type right_type); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_promote_num(v__checker__Checker* c, v__ast__Type left_type, v__ast__Type right_type); VV_LOCAL_SYMBOL _result_void v__checker__Checker_check_expected(v__checker__Checker* c, v__ast__Type got, v__ast__Type expected); VV_LOCAL_SYMBOL string v__checker__Checker_expected_msg(v__checker__Checker* c, v__ast__Type got, v__ast__Type expected); VV_LOCAL_SYMBOL bool v__checker__Checker_symmetric_check(v__checker__Checker* c, v__ast__Type left, v__ast__Type right); VV_LOCAL_SYMBOL Array_v__ast__Type v__checker__Checker_infer_struct_generic_types(v__checker__Checker* c, v__ast__Type typ, v__ast__StructInit node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_get_generic_array_element_type(v__checker__Checker _v_toheap_g, v__ast__Array _v_array); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_get_generic_array_fixed_element_type(v__checker__Checker _v_toheap_g, v__ast__ArrayFixed _v_array); VV_LOCAL_SYMBOL void v__checker__Checker_infer_fn_generic_types(v__checker__Checker* c, v__ast__Fn func, v__ast__CallExpr* node); v__checker__Checker* v__checker__new_checker(v__ast__Table* table, v__pref__Preferences* pref_); VV_LOCAL_SYMBOL void v__checker__Checker_reset_checker_state_at_start_of_new_file(v__checker__Checker* c); void v__checker__Checker_check(v__checker__Checker* c, v__ast__File* ast_file); void v__checker__Checker_check_scope_vars(v__checker__Checker* c, v__ast__Scope* sc); Array_v__errors__Error v__checker__Checker_check2(v__checker__Checker* c, v__ast__File* ast_file); void v__checker__Checker_change_current_file(v__checker__Checker* c, v__ast__File* file); void v__checker__Checker_check_files(v__checker__Checker* c, Array_v__ast__File_ptr ast_files); VV_LOCAL_SYMBOL bool v__checker__Checker_file_has_main_fn(v__checker__Checker* c, v__ast__File* file); VV_LOCAL_SYMBOL void v__checker__Checker_check_valid_snake_case(v__checker__Checker* c, string name, string identifier, v__token__Pos pos); VV_LOCAL_SYMBOL string v__checker__stripped_name(string name); VV_LOCAL_SYMBOL void v__checker__Checker_check_valid_pascal_case(v__checker__Checker* c, string name, string identifier, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_type_decl(v__checker__Checker* c, v__ast__TypeDecl node); VV_LOCAL_SYMBOL void v__checker__Checker_alias_type_decl(v__checker__Checker* c, v__ast__AliasTypeDecl node); VV_LOCAL_SYMBOL void v__checker__Checker_check_alias_vs_element_type_of_parent(v__checker__Checker* c, v__ast__AliasTypeDecl node, v__ast__Type element_type_of_parent, string label); VV_LOCAL_SYMBOL void v__checker__Checker_fn_type_decl(v__checker__Checker* c, v__ast__FnTypeDecl node); VV_LOCAL_SYMBOL void v__checker__Checker_sum_type_decl(v__checker__Checker* c, v__ast__SumTypeDecl node); VV_LOCAL_SYMBOL Array_v__ast__InterfaceEmbedding v__checker__Checker_expand_iface_embeds(v__checker__Checker* c, v__ast__InterfaceDecl* idecl, int level, Array_v__ast__InterfaceEmbedding iface_embeds); VV_LOCAL_SYMBOL multi_return_string_v__token__Pos v__checker__Checker_fail_if_immutable(v__checker__Checker* c, v__ast__Expr* expr); VV_LOCAL_SYMBOL bool v__checker__Checker_type_implements(v__checker__Checker* c, v__ast__Type typ, v__ast__Type interface_type, v__token__Pos pos); VV_LOCAL_SYMBOL string v__checker__is_field_to_description(string expr_name, bool is_field); VV_LOCAL_SYMBOL void v__checker__Checker_expr_or_block_err(v__checker__Checker* c, v__ast__OrKind kind, string expr_name, v__token__Pos pos, bool is_field); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_check_expr_opt_call(v__checker__Checker* c, v__ast__Expr expr, v__ast__Type ret_type); VV_LOCAL_SYMBOL void v__checker__Checker_check_or_expr(v__checker__Checker* c, v__ast__OrExpr node, v__ast__Type ret_type, v__ast__Type expr_return_type, v__ast__Expr expr); VV_LOCAL_SYMBOL void v__checker__Checker_check_or_last_stmt(v__checker__Checker* c, v__ast__Stmt* stmt, v__ast__Type ret_type, v__ast__Type expr_return_type); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_selector_expr(v__checker__Checker* c, v__ast__SelectorExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_const_decl(v__checker__Checker* c, v__ast__ConstDecl* node); VV_LOCAL_SYMBOL void v__checker__Checker_enum_decl(v__checker__Checker* c, v__ast__EnumDecl* node); VV_LOCAL_SYMBOL void v__checker__Checker_check_enum_field_integer_literal(v__checker__Checker* c, v__ast__IntegerLiteral expr, bool is_signed, bool is_multi_allowed, string styp, v__token__Pos pos, Array_u64* useen, u64 umin, u64 umax, Array_i64* iseen, i64 imin, i64 imax); VV_LOCAL_SYMBOL void v__checker__Checker_check_loop_label(v__checker__Checker* c, string label, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_stmt(v__checker__Checker* c, v__ast__Stmt* node); VV_LOCAL_SYMBOL void v__checker__Checker_assert_stmt(v__checker__Checker* c, v__ast__AssertStmt* node); VV_LOCAL_SYMBOL void v__checker__Checker_block(v__checker__Checker* c, v__ast__Block* node); VV_LOCAL_SYMBOL void v__checker__Checker_branch_stmt(v__checker__Checker* c, v__ast__BranchStmt node); VV_LOCAL_SYMBOL void v__checker__Checker_global_decl(v__checker__Checker* c, v__ast__GlobalDecl* node); VV_LOCAL_SYMBOL void v__checker__Checker_asm_stmt(v__checker__Checker* c, v__ast__AsmStmt* stmt); VV_LOCAL_SYMBOL void v__checker__Checker_asm_arg(v__checker__Checker* c, v__ast__AsmArg arg, v__ast__AsmStmt stmt, Array_string aliases); VV_LOCAL_SYMBOL Array_string v__checker__Checker_asm_ios(v__checker__Checker* c, Array_v__ast__AsmIO* ios, v__ast__Scope* scope, bool output); VV_LOCAL_SYMBOL void v__checker__Checker_hash_stmt(v__checker__Checker* c, v__ast__HashStmt* node); VV_LOCAL_SYMBOL void v__checker__Checker_import_stmt(v__checker__Checker* c, v__ast__Import node); VV_LOCAL_SYMBOL void v__checker__Checker_stmts(v__checker__Checker* c, Array_v__ast__Stmt* stmts); VV_LOCAL_SYMBOL void v__checker__Checker_stmts_ending_with_expression(v__checker__Checker* c, Array_v__ast__Stmt* stmts); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_unwrap_generic(v__checker__Checker* c, v__ast__Type typ); v__ast__Type v__checker__Checker_expr(v__checker__Checker* c, v__ast__Expr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_cast_expr(v__checker__Checker* c, v__ast__CastExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_at_expr(v__checker__Checker* c, v__ast__AtExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_ident(v__checker__Checker* c, v__ast__Ident* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_concat_expr(v__checker__Checker* c, v__ast__ConcatExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_smartcast(v__checker__Checker* c, v__ast__Expr* expr, v__ast__Type cur_type, v__ast__Type to_type_, v__ast__Scope* scope); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_select_expr(v__checker__Checker* c, v__ast__SelectExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_lock_expr(v__checker__Checker* c, v__ast__LockExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_unsafe_expr(v__checker__Checker* c, v__ast__UnsafeExpr* node); VV_LOCAL_SYMBOL _result_v__ast__Expr v__checker__Checker_find_definition(v__checker__Checker* c, v__ast__Ident ident); VV_LOCAL_SYMBOL _result_v__ast__Expr v__checker__Checker_find_obj_definition(v__checker__Checker* c, v__ast__ScopeObject obj); VV_LOCAL_SYMBOL _option_bool v__checker__Checker_has_return(v__checker__Checker* c, Array_v__ast__Stmt stmts); bool v__checker__Checker_is_comptime_var(v__checker__Checker* c, v__ast__Expr node); VV_LOCAL_SYMBOL void v__checker__Checker_mark_as_referenced(v__checker__Checker* c, v__ast__Expr* node, bool as_interface); VV_LOCAL_SYMBOL string v__checker__Checker_get_base_name(v__checker__Checker* c, v__ast__Expr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_prefix_expr(v__checker__Checker* c, v__ast__PrefixExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_type_error_for_operator(v__checker__Checker* c, string op_label, string types_label, string found_type_label, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_check_index(v__checker__Checker* c, v__ast__TypeSymbol* typ_sym, v__ast__Expr index, v__ast__Type index_type, v__token__Pos pos, bool range_index, bool is_gated); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_index_expr(v__checker__Checker* c, v__ast__IndexExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_enum_val(v__checker__Checker* c, v__ast__EnumVal* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_chan_init(v__checker__Checker* c, v__ast__ChanInit* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_offset_of(v__checker__Checker* c, v__ast__OffsetOf node); VV_LOCAL_SYMBOL void v__checker__Checker_check_dup_keys(v__checker__Checker* c, v__ast__MapInit* node, int i); VV_LOCAL_SYMBOL void v__checker__Checker_add_error_detail(v__checker__Checker* c, string s); VV_LOCAL_SYMBOL void v__checker__Checker_add_error_detail_with_pos(v__checker__Checker* c, string msg, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_add_instruction_for_option_type(v__checker__Checker* c); VV_LOCAL_SYMBOL void v__checker__Checker_add_instruction_for_result_type(v__checker__Checker* c); VV_LOCAL_SYMBOL void v__checker__Checker_warn(v__checker__Checker* c, string s, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_error(v__checker__Checker* c, string message, v__token__Pos pos); VV_LOCAL_SYMBOL bool v__checker__Checker_check_struct_signature_init_fields(v__checker__Checker* c, v__ast__Struct from, v__ast__Struct to, v__ast__StructInit node); VV_LOCAL_SYMBOL bool v__checker__Checker_check_struct_signature(v__checker__Checker* c, v__ast__Struct from, v__ast__Struct to); VV_LOCAL_SYMBOL void v__checker__Checker_note(v__checker__Checker* c, string message, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_warn_or_error(v__checker__Checker* c, string message, v__token__Pos pos, bool warn); VV_LOCAL_SYMBOL bool v__checker__Checker_fileis(v__checker__Checker* c, string s); VV_LOCAL_SYMBOL string v__checker__Checker_fetch_field_name(v__checker__Checker* c, v__ast__StructField field); VV_LOCAL_SYMBOL bool v__checker__Checker_ensure_generic_type_specify_type_names(v__checker__Checker* c, v__ast__Type typ, v__token__Pos pos); VV_LOCAL_SYMBOL bool v__checker__Checker_ensure_type_exists(v__checker__Checker* c, v__ast__Type typ, v__token__Pos pos); VV_LOCAL_SYMBOL bool v__checker__Checker_fail_if_unreadable(v__checker__Checker* c, v__ast__Expr expr, v__ast__Type typ, string what); VV_LOCAL_SYMBOL void v__checker__Checker_fail_if_stack_struct_action_outside_unsafe(v__checker__Checker* c, v__ast__Ident* ident, string failed_action); VV_LOCAL_SYMBOL void v__checker__Checker_goto_label(v__checker__Checker* c, v__ast__GotoLabel node); VV_LOCAL_SYMBOL void v__checker__Checker_goto_stmt(v__checker__Checker* c, v__ast__GotoStmt node); VV_LOCAL_SYMBOL void v__checker__Checker_check_unused_labels(v__checker__Checker* c); VV_LOCAL_SYMBOL void v__checker__Checker_deprecate(v__checker__Checker* c, string kind, string name, Array_v__ast__Attr attrs, v__token__Pos pos); VV_LOCAL_SYMBOL string v__checker__semicolonize(string main, string details); VV_LOCAL_SYMBOL void v__checker__Checker_deprecate_old_isreftype_and_sizeof_of_a_guessed_type(v__checker__Checker* c, bool is_guessed_type, v__ast__Type typ, v__token__Pos pos, string label); VV_LOCAL_SYMBOL bool v__checker__Checker_check_import_sym_conflict(v__checker__Checker* c, string ident); VV_LOCAL_SYMBOL v__ast__ComptimeVarKind v__checker__Checker_get_ct_type_var(v__checker__Checker* c, v__ast__Expr node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_get_comptime_var_type(v__checker__Checker* c, v__ast__Expr node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_comptime_call(v__checker__Checker* c, v__ast__ComptimeCall* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_comptime_selector(v__checker__Checker* c, v__ast__ComptimeSelector* node); VV_LOCAL_SYMBOL void v__checker__Checker_comptime_for(v__checker__Checker* c, v__ast__ComptimeFor* node); VV_LOCAL_SYMBOL _option_v__ast__ComptTimeConstValue v__checker__Checker_eval_comptime_const_expr(v__checker__Checker* c, v__ast__Expr expr, int nlevel); VV_LOCAL_SYMBOL multi_return_bool_int_int v__checker__Checker_verify_vweb_params_for_method(v__checker__Checker* c, v__ast__Fn node); VV_LOCAL_SYMBOL void v__checker__Checker_verify_all_vweb_routes(v__checker__Checker* c); VV_LOCAL_SYMBOL bool v__checker__Checker_evaluate_once_comptime_if_attribute(v__checker__Checker* c, v__ast__Attr* node); VV_LOCAL_SYMBOL v__checker__ComptimeBranchSkipState v__checker__Checker_comptime_if_branch(v__checker__Checker* c, v__ast__Expr* cond, v__token__Pos pos); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_get_comptime_selector_type(v__checker__Checker* c, v__ast__ComptimeSelector node, v__ast__Type default_type); VV_LOCAL_SYMBOL bool v__checker__Checker_is_comptime_selector_field_name(v__checker__Checker* c, v__ast__SelectorExpr node, string field_name); VV_LOCAL_SYMBOL bool v__checker__Checker_is_comptime_selector_type(v__checker__Checker* c, v__ast__SelectorExpr node); VV_LOCAL_SYMBOL bool v__checker__Checker_check_comptime_is_field_selector(v__checker__Checker* c, v__ast__SelectorExpr node); VV_LOCAL_SYMBOL bool v__checker__Checker_check_comptime_is_field_selector_bool(v__checker__Checker* c, v__ast__SelectorExpr node); VV_LOCAL_SYMBOL bool v__checker__Checker_get_comptime_selector_bool_field(v__checker__Checker* c, string field_name); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_array_init(v__checker__Checker* c, v__ast__ArrayInit* node); VV_LOCAL_SYMBOL void v__checker__Checker_check_array_init_para_type(v__checker__Checker* c, string para, v__ast__Expr* expr, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_ensure_sumtype_array_has_default_value(v__checker__Checker* c, v__ast__ArrayInit node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_map_init(v__checker__Checker* c, v__ast__MapInit* node); VV_LOCAL_SYMBOL void v__checker__Checker_fn_decl(v__checker__Checker* c, v__ast__FnDecl* node); VV_LOCAL_SYMBOL bool v__checker__Checker_check_same_type_ignoring_pointers(v__checker__Checker* c, v__ast__Type type_a, v__ast__Type type_b); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_anon_fn(v__checker__Checker* c, v__ast__AnonFn* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_call_expr(v__checker__Checker* c, v__ast__CallExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_builtin_args(v__checker__Checker* c, v__ast__CallExpr* node, string fn_name, v__ast__Fn func); VV_LOCAL_SYMBOL bool v__checker__Checker_needs_unwrap_generic_type(v__checker__Checker* c, v__ast__Type typ); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_fn_call(v__checker__Checker* c, v__ast__CallExpr* node, bool* continue_check); VV_LOCAL_SYMBOL Map_int_v__ast__Type v__checker__Checker_get_comptime_args(v__checker__Checker* c, v__ast__Fn func, v__ast__CallExpr node_, Array_v__ast__Type concrete_types); VV_LOCAL_SYMBOL Array_v__ast__Type v__checker__Checker_resolve_fn_generic_args(v__checker__Checker* c, v__ast__Fn func, v__ast__CallExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_cast_fixed_array_ret(v__checker__Checker* c, v__ast__Type typ, v__ast__TypeSymbol sym); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_cast_to_fixed_array_ret(v__checker__Checker* c, v__ast__Type typ, v__ast__TypeSymbol sym); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__CallExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_spawn_expr(v__checker__Checker* c, v__ast__SpawnExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_go_expr(v__checker__Checker* c, v__ast__GoExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_set_node_expected_arg_types(v__checker__Checker* c, v__ast__CallExpr* node, v__ast__Fn* func); VV_LOCAL_SYMBOL _result_void v__checker__Checker_post_process_generic_fns(v__checker__Checker* c); VV_LOCAL_SYMBOL _result_void v__checker__Checker_check_expected_arg_count(v__checker__Checker* c, v__ast__CallExpr* node, v__ast__Fn* f); VV_LOCAL_SYMBOL void v__checker__Checker_check_map_and_filter(v__checker__Checker* c, bool is_map, v__ast__Type elem_typ, v__ast__CallExpr node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_map_builtin_method_call(v__checker__Checker* c, v__ast__CallExpr* node, v__ast__Type left_type, v__ast__TypeSymbol left_sym); VV_LOCAL_SYMBOL void v__checker__Checker_ensure_same_array_return_type(v__checker__Checker* c, v__ast__CallExpr* node, v__ast__Type left_type); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_array_builtin_method_call(v__checker__Checker* c, v__ast__CallExpr* node, v__ast__Type left_type, v__ast__TypeSymbol left_sym); VV_LOCAL_SYMBOL void v__checker__scope_register_it(v__ast__Scope* s, v__token__Pos pos, v__ast__Type typ); VV_LOCAL_SYMBOL void v__checker__scope_register_a_b(v__ast__Scope* s, v__token__Pos pos, v__ast__Type typ); VV_LOCAL_SYMBOL void v__checker__scope_register_var_name(v__ast__Scope* s, v__token__Pos pos, v__ast__Type typ, string name); VV_LOCAL_SYMBOL void v__checker__Checker_for_c_stmt(v__checker__Checker* c, v__ast__ForCStmt* node); VV_LOCAL_SYMBOL void v__checker__Checker_for_in_stmt(v__checker__Checker* c, v__ast__ForInStmt* node); VV_LOCAL_SYMBOL void v__checker__Checker_for_stmt(v__checker__Checker* c, v__ast__ForStmt* node); VV_LOCAL_SYMBOL v__checker__ComptimeBranchSkipState v__checker__Checker_check_compatible_types(v__checker__Checker* c, v__ast__Type left_type, v__ast__TypeNode right); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_if_expr(v__checker__Checker* c, v__ast__IfExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_smartcast_if_conds(v__checker__Checker* c, v__ast__Expr* node, v__ast__Scope* scope); VV_LOCAL_SYMBOL void v__checker__Checker_check_non_expr_branch_last_stmt(v__checker__Checker* c, Array_v__ast__Stmt stmts); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_infix_expr(v__checker__Checker* c, v__ast__InfixExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_check_div_mod_by_zero(v__checker__Checker* c, v__ast__Expr expr, v__token__Kind op_kind); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_check_like_operator(v__checker__Checker* c, v__ast__InfixExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_invalid_operator_error(v__checker__Checker* c, v__token__Kind op, v__ast__Type left_type, v__ast__Type right_type, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_autocast_in_if_conds(v__checker__Checker* c, v__ast__Expr* right, v__ast__Expr from_expr, v__ast__Type from_type, v__ast__Type to_type); VV_LOCAL_SYMBOL void v__checker__Checker_interface_decl(v__checker__Checker* c, v__ast__InterfaceDecl* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_resolve_generic_interface(v__checker__Checker* c, v__ast__Type typ, v__ast__Type interface_type, v__token__Pos pos); v__ast__Type v__checker__Checker_lambda_expr(v__checker__Checker* c, v__ast__LambdaExpr* node, v__ast__Type exp_typ); void v__checker__Checker_lambda_expr_fix_type_of_param(v__checker__Checker* c, v__ast__LambdaExpr* node, v__ast__Ident* pident, v__ast__Type ptype); void v__checker__Checker_support_lambda_expr_in_sort(v__checker__Checker* c, v__ast__Type param_type, v__ast__Type return_type, v__ast__LambdaExpr* expr); void v__checker__Checker_support_lambda_expr_one_param(v__checker__Checker* c, v__ast__Type param_type, v__ast__Type return_type, v__ast__LambdaExpr* expr); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_match_expr(v__checker__Checker* c, v__ast__MatchExpr* node); VV_LOCAL_SYMBOL void v__checker__Checker_check_match_branch_last_stmt(v__checker__Checker* c, v__ast__ExprStmt last_stmt, v__ast__Type ret_type, v__ast__Type expr_type); VV_LOCAL_SYMBOL _option_i64 v__checker__Checker_get_comptime_number_value(v__checker__Checker* c, v__ast__Expr* expr); VV_LOCAL_SYMBOL void v__checker__Checker_match_exprs(v__checker__Checker* c, v__ast__MatchExpr* node, v__ast__TypeSymbol cond_type_sym); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_sql_expr(v__checker__Checker* c, v__ast__SqlExpr* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_sql_stmt(v__checker__Checker* c, v__ast__SqlStmt* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_sql_stmt_line(v__checker__Checker* c, v__ast__SqlStmtLine* node); VV_LOCAL_SYMBOL void v__checker__Checker_check_orm_struct_field_attributes(v__checker__Checker* c, v__ast__StructField field); VV_LOCAL_SYMBOL Array_v__ast__StructField v__checker__Checker_fetch_and_verify_orm_fields(v__checker__Checker* c, v__ast__Struct info, v__token__Pos pos, string table_name, v__ast__SqlExpr sql_expr); VV_LOCAL_SYMBOL void v__checker__Checker_check_sql_value_expr_is_comptime_with_natural_number_or_expr_with_int_type(v__checker__Checker* c, v__ast__Expr* expr, string sql_keyword); VV_LOCAL_SYMBOL void v__checker__Checker_check_sql_expr_type_is_int(v__checker__Checker* c, v__ast__Expr* expr, string sql_keyword); VV_LOCAL_SYMBOL void v__checker__Checker_orm_error(v__checker__Checker* c, string message, v__token__Pos pos); VV_LOCAL_SYMBOL void v__checker__Checker_check_expr_has_no_fn_calls_with_non_orm_return_type(v__checker__Checker* c, v__ast__Expr* expr); VV_LOCAL_SYMBOL void v__checker__Checker_check_where_expr_has_no_pointless_exprs(v__checker__Checker* c, v__ast__TypeSymbol* table_type_symbol, Array_string field_names, v__ast__Expr* expr); VV_LOCAL_SYMBOL string v__checker__Checker_fn_return_type_flag_to_string(v__checker__Checker* _d1, v__ast__Type typ); VV_LOCAL_SYMBOL void v__checker__Checker_check_orm_or_expr(v__checker__Checker* c, v__checker__ORMExpr* expr); VV_LOCAL_SYMBOL bool v__checker__Checker_check_db_expr(v__checker__Checker* c, v__ast__Expr* db_expr); VV_LOCAL_SYMBOL bool v__checker__Checker_check_orm_table_expr_type(v__checker__Checker* c, v__ast__TypeNode* type_node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_get_type_of_field_with_related_table(v__checker__Checker* c, v__ast__StructField* table_field); VV_LOCAL_SYMBOL Array_v__ast__StructField v__checker__Checker_get_orm_non_primitive_fields(v__checker__Checker* c, Array_v__ast__StructField fields); struct _V_anon_fn_135e2010175ca59e_v__ast__structfield__bool_19063_Ctx; VV_LOCAL_SYMBOL bool anon_fn_135e2010175ca59e_v__ast__structfield__bool_19063(v__ast__StructField field); VV_LOCAL_SYMBOL bool v__checker__Checker_check_field_of_inserting_struct_is_uninitialized(v__checker__Checker* _d2, v__ast__SqlStmtLine* node, string field_name); VV_LOCAL_SYMBOL v__token__Pos v__checker__Checker_orm_get_field_pos(v__checker__Checker* c, v__ast__Expr* expr); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_postfix_expr(v__checker__Checker* c, v__ast__PostfixExpr* node); VV_LOCAL_SYMBOL string v__checker__Checker_error_type_name(v__checker__Checker* c, v__ast__Type exp_type); VV_LOCAL_SYMBOL void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* node); VV_LOCAL_SYMBOL void v__checker__Checker_find_unreachable_statements_after_noreturn_calls(v__checker__Checker* c, Array_v__ast__Stmt stmts); VV_LOCAL_SYMBOL bool v__checker__has_top_return(Array_v__ast__Stmt stmts); VV_LOCAL_SYMBOL void v__checker__Checker_check_noreturn_fn_decl(v__checker__Checker* c, v__ast__FnDecl* node); VV_LOCAL_SYMBOL bool v__checker__uses_return_stmt(Array_v__ast__Stmt stmts); VV_LOCAL_SYMBOL bool v__checker__is_noreturn_callexpr(v__ast__Expr expr); VV_LOCAL_SYMBOL int v__checker__imin(int a, int b); VV_LOCAL_SYMBOL int v__checker__imax(int a, int b); VV_LOCAL_SYMBOL u8 v__checker__Checker_get_default_fmt(v__checker__Checker* c, v__ast__Type ftyp, v__ast__Type typ); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_string_inter_lit(v__checker__Checker* c, v__ast__StringInterLiteral* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_string_lit(v__checker__Checker* c, v__ast__StringLiteral* node); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_int_lit(v__checker__Checker* c, v__ast__IntegerLiteral* node); VV_LOCAL_SYMBOL _result_void v__checker__Checker_check_num_literal(v__checker__Checker* c, v__checker__LoHiLimit lohi, bool is_neg, string lit); VV_LOCAL_SYMBOL void v__checker__Checker_num_lit_overflow_error(v__checker__Checker* c, v__ast__IntegerLiteral* node); VV_LOCAL_SYMBOL void v__checker__Checker_struct_decl(v__checker__Checker* c, v__ast__StructDecl* node); VV_LOCAL_SYMBOL int v__checker__minify_sort_fn(v__ast__StructField* a, v__ast__StructField* b); VV_LOCAL_SYMBOL v__ast__Type v__checker__Checker_struct_init(v__checker__Checker* c, v__ast__StructInit* node, bool is_field_zero_struct_init, Array_string* inited_fields); VV_LOCAL_SYMBOL int compare_12155997196440863451_v__ast__StructField_by_i(v__ast__StructField* a, v__ast__StructField* b) { if (a->i < b->i) return -1; else return 1; } VV_LOCAL_SYMBOL void v__checker__Checker_check_ref_fields_initialized(v__checker__Checker* c, v__ast__TypeSymbol* struct_sym, Array_v__ast__Type* checked_types, string linked_name, v__ast__StructInit* node); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_assign_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL _result_void v__parser__Parser_check_undefined_variables(v__parser__Parser* p, Array_string names, v__ast__Expr val); VV_LOCAL_SYMBOL bool v__parser__Parser_check_cross_variables(v__parser__Parser* p, Array_v__ast__Expr exprs, v__ast__Expr val); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_partial_assign_stmt(v__parser__Parser* p, Array_v__ast__Expr left, Array_v__ast__Comment left_comments); VV_LOCAL_SYMBOL v__ast__ComptimeType v__parser__Parser_parse_comptime_type(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__HashStmt v__parser__Parser_hash(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__ComptimeCall v__parser__Parser_comptime_call(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__ComptimeFor v__parser__Parser_comptime_for(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__AtExpr v__parser__Parser_at(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_comptime_selector(v__parser__Parser* p, v__ast__Expr left); VV_LOCAL_SYMBOL v__ast__ArrayInit v__parser__Parser_array_init(v__parser__Parser* p, bool is_option); VV_LOCAL_SYMBOL v__ast__MapInit v__parser__Parser_map_init(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_scope_register_index(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_handle_index_variable(v__parser__Parser* p, v__ast__Expr* default_expr); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_expr(v__parser__Parser* p, int precedence); VV_LOCAL_SYMBOL _result_v__ast__Expr v__parser__Parser_check_expr(v__parser__Parser* p, int precedence); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_expr_with_left(v__parser__Parser* p, v__ast__Expr left, int precedence, bool is_stmt_ident); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_infix_expr(v__parser__Parser* p, v__ast__Expr left); VV_LOCAL_SYMBOL bool v__parser__Parser_fileis(v__parser__Parser* p, string s); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_prefix_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_recast_as_pointer(v__parser__Parser* p, v__ast__CastExpr* cast_expr, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_prefix_inc_dec_error(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_process_custom_orm_operators(v__parser__Parser* p); VV_LOCAL_SYMBOL _option_v__ast__LambdaExpr v__parser__Parser_lambda_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__CallExpr v__parser__Parser_call_expr(v__parser__Parser* p, v__ast__Language language, string mod); VV_LOCAL_SYMBOL Array_v__ast__CallArg v__parser__Parser_call_args(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__FnDecl v__parser__Parser_fn_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL _result_void v__parser__Parser_fn_receiver(v__parser__Parser* p, Array_v__ast__Param* params, v__parser__ReceiverParsingInfo* rec); VV_LOCAL_SYMBOL v__ast__AnonFn v__parser__Parser_anon_fn(v__parser__Parser* p); VV_LOCAL_SYMBOL multi_return_Array_v__ast__Param_bool_bool v__parser__Parser_fn_params(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__SpawnExpr v__parser__Parser_spawn_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__GoExpr v__parser__Parser_go_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL Array_v__ast__Param v__parser__Parser_closure_vars(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_check_fn_mutable_arguments(v__parser__Parser* p, v__ast__Type typ, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_check_fn_shared_arguments(v__parser__Parser* p, v__ast__Type typ, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_check_fn_atomic_arguments(v__parser__Parser* p, v__ast__Type typ, v__token__Pos pos); VV_LOCAL_SYMBOL bool v__parser__have_fn_main(Array_v__ast__Stmt stmts); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_for_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__IfExpr v__parser__Parser_if_expr(v__parser__Parser* p, bool is_comptime); VV_LOCAL_SYMBOL bool v__parser__Parser_is_only_array_type(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__MatchExpr v__parser__Parser_match_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__SelectExpr v__parser__Parser_select_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_lockable(v__parser__Parser* p); VV_LOCAL_SYMBOL multi_return_Array_v__ast__Expr_Array_v__ast__Comment v__parser__Parser_lockable_list(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__LockExpr v__parser__Parser_lock_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_known_import(v__parser__Parser* p, string mod); VV_LOCAL_SYMBOL string v__parser__Parser_prepend_mod(v__parser__Parser* p, string name); VV_LOCAL_SYMBOL bool v__parser__Parser_is_used_import(v__parser__Parser* p, string alias); VV_LOCAL_SYMBOL void v__parser__Parser_register_used_import(v__parser__Parser* p, string alias); VV_LOCAL_SYMBOL void v__parser__Parser_register_auto_import(v__parser__Parser* p, string alias); VV_LOCAL_SYMBOL void v__parser__Parser_check_unused_imports(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_sql_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__SqlStmt v__parser__Parser_sql_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__OrExpr v__parser__Parser_parse_sql_or_block(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__SqlStmtLine v__parser__Parser_parse_sql_stmt_line(v__parser__Parser* p); VV_LOCAL_SYMBOL _option_bool v__parser__Parser_check_sql_keyword(v__parser__Parser* p, string name); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_check_sql_where_expr_has_no_undefined_variables(v__parser__Parser* p, v__ast__Expr* expr, Array_string unacceptable_variable_names); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_array_type(v__parser__Parser* p, v__token__Kind expecting, bool is_option); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_map_type(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_chan_type(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_thread_type(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_multi_return_type(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_fn_type(v__parser__Parser* p, string name, Array_v__ast__Type generic_types); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_type_with_mut(v__parser__Parser* p, bool is_mut); VV_LOCAL_SYMBOL v__ast__Language v__parser__Parser_parse_language(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_inline_sum_type(v__parser__Parser* p); VV_LOCAL_SYMBOL int compare_1376677008124459278_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } VV_LOCAL_SYMBOL Array_v__ast__TypeNode v__parser__Parser_parse_sum_type_variants(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_type(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_any_type(v__parser__Parser* p, v__ast__Language language, bool is_ptr, bool check_dot, bool is_option); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_find_type_or_add_placeholder(v__parser__Parser* p, string name, v__ast__Language language); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_generic_type(v__parser__Parser* p, string name); VV_LOCAL_SYMBOL v__ast__Type v__parser__Parser_parse_generic_inst_type(v__parser__Parser* p, string name); v__ast__Stmt v__parser__parse_stmt(string text, v__ast__Table* table, v__ast__Scope* scope); v__ast__File* v__parser__parse_comptime(string tmpl_path, string text, v__ast__Table* table, v__pref__Preferences* pref_, v__ast__Scope* scope); v__ast__File* v__parser__parse_text(string text, string path, v__ast__Table* table, v__scanner__CommentsMode comments_mode, v__pref__Preferences* pref_); void v__parser__Parser_free(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_free_scanner(v__parser__Parser* p); void v__parser__Parser_set_path(v__parser__Parser* p, string path); v__ast__File* v__parser__parse_file(string path, v__ast__Table* table, v__scanner__CommentsMode comments_mode, v__pref__Preferences* pref_); multi_return_ref_v__ast__File_Array_v__vet__Error_Array_v__vet__Error v__parser__parse_vet_file(string path, v__ast__Table* table_, v__pref__Preferences* pref_); v__ast__File* v__parser__Parser_parse(v__parser__Parser* p); Array_v__ast__File_ptr v__parser__parse_files(Array_string paths, v__ast__Table* table, v__pref__Preferences* pref_); void v__parser__Parser_codegen(v__parser__Parser* p, string code); VV_LOCAL_SYMBOL void v__parser__Parser_init_parse_fns(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_read_first_token(v__parser__Parser* p); VV_LOCAL_SYMBOL v__token__Token v__parser__Parser_peek_token(v__parser__Parser* p, int n); VV_LOCAL_SYMBOL v__token__Token v__parser__Parser_peek_token_after_var_list(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_is_fn_type_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_is_array_type(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_open_scope(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_close_scope(v__parser__Parser* p); VV_LOCAL_SYMBOL Array_v__ast__Stmt v__parser__Parser_parse_block(v__parser__Parser* p); VV_LOCAL_SYMBOL Array_v__ast__Stmt v__parser__Parser_parse_block_no_scope(v__parser__Parser* p, bool is_top_level); VV_LOCAL_SYMBOL void v__parser__Parser_next(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_check(v__parser__Parser* p, v__token__Kind expected); VV_LOCAL_SYMBOL v__ast__NodeError v__parser__Parser_unexpected(v__parser__Parser* p, v__parser__ParamsForUnexpected params); VV_LOCAL_SYMBOL v__ast__NodeError v__parser__Parser_unexpected_with_pos(v__parser__Parser* p, v__token__Pos pos, v__parser__ParamsForUnexpected params); VV_LOCAL_SYMBOL string v__parser__Parser_check_js_name(v__parser__Parser* p); VV_LOCAL_SYMBOL string v__parser__Parser_check_name(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_top_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__comptime_if_expr_contains_top_stmt(v__ast__IfExpr if_expr); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_other_stmts(v__parser__Parser* p, v__ast__Stmt cur_stmt); VV_LOCAL_SYMBOL v__ast__Comment v__parser__Parser_check_comment(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Comment v__parser__Parser_comment(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__ExprStmt v__parser__Parser_comment_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL Array_v__ast__Comment v__parser__Parser_eat_comments(v__parser__Parser* p, v__parser__EatCommentsConfig cfg); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_stmt(v__parser__Parser* p, bool is_top_level); VV_LOCAL_SYMBOL v__ast__SemicolonStmt v__parser__Parser_semicolon_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__AsmStmt v__parser__Parser_asm_stmt(v__parser__Parser* p, bool is_top_level); VV_LOCAL_SYMBOL v__ast__AsmArg v__parser__Parser_reg_or_alias(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__AsmAddressing v__parser__Parser_asm_addressing(v__parser__Parser* p); VV_LOCAL_SYMBOL Array_v__ast__AsmIO v__parser__Parser_asm_ios(v__parser__Parser* p, bool output); VV_LOCAL_SYMBOL multi_return_Array_v__ast__Expr_Array_v__ast__Comment v__parser__Parser_expr_list(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_is_attributes(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_attributes(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Attr v__parser__Parser_parse_attr(v__parser__Parser* p, bool is_at); VV_LOCAL_SYMBOL void v__parser__Parser_language_not_allowed_error(v__parser__Parser* p, v__ast__Language language, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_language_not_allowed_warning(v__parser__Parser* p, v__ast__Language language, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_check_for_impure_v(v__parser__Parser* p, v__ast__Language language, v__token__Pos pos); VV_LOCAL_SYMBOL v__ast__NodeError v__parser__Parser_error(v__parser__Parser* p, string s); VV_LOCAL_SYMBOL void v__parser__Parser_warn(v__parser__Parser* p, string s); VV_LOCAL_SYMBOL void v__parser__Parser_note(v__parser__Parser* p, string s); VV_LOCAL_SYMBOL v__ast__NodeError v__parser__Parser_error_with_pos(v__parser__Parser* p, string s, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_error_with_error(v__parser__Parser* p, v__errors__Error _v_error); VV_LOCAL_SYMBOL void v__parser__Parser_warn_with_pos(v__parser__Parser* p, string s, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_note_with_pos(v__parser__Parser* p, string s, v__token__Pos pos); VV_LOCAL_SYMBOL void v__parser__Parser_vet_error(v__parser__Parser* p, string msg, int line, v__vet__FixKind fix, v__vet__ErrorType typ); VV_LOCAL_SYMBOL void v__parser__Parser_vet_notice(v__parser__Parser* p, string msg, int line, v__vet__FixKind fix, v__vet__ErrorType typ); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_parse_multi_expr(v__parser__Parser* p, bool is_top_level); VV_LOCAL_SYMBOL bool v__parser__Parser_is_following_concrete_types(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Ident v__parser__Parser_ident(v__parser__Parser* p, v__ast__Language language); VV_LOCAL_SYMBOL bool v__parser__Parser_is_generic_struct_init(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_is_typename(v__parser__Parser* p, v__token__Token t); VV_LOCAL_SYMBOL bool v__parser__Parser_is_generic_call(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_is_generic_cast(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_name_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL multi_return_Array_v__ast__Stmt_v__token__Pos v__parser__Parser_or_block(v__parser__Parser* p, v__parser__OrBlockErrVarMode err_var_mode); VV_LOCAL_SYMBOL v__ast__IndexExpr v__parser__Parser_index_expr(v__parser__Parser* p, v__ast__Expr left, bool is_gated); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_dot_expr(v__parser__Parser* p, v__ast__Expr left); VV_LOCAL_SYMBOL multi_return_Array_v__ast__Type_Array_string v__parser__Parser_parse_generic_types(v__parser__Parser* p); VV_LOCAL_SYMBOL Array_v__ast__Type v__parser__Parser_parse_concrete_types(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_is_generic_name(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__EnumVal v__parser__Parser_enum_val(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_filter_string_vet_errors(v__parser__Parser* p, v__token__Pos pos); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_string_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_parse_number_literal(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Module v__parser__Parser_module_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Import v__parser__Parser_import_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_import_syms(v__parser__Parser* p, v__ast__Import* parent); VV_LOCAL_SYMBOL v__ast__ConstDecl v__parser__Parser_const_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Return v__parser__Parser_return_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__GlobalDecl v__parser__Parser_global_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__EnumDecl v__parser__Parser_enum_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__TypeDecl v__parser__Parser_type_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Assoc v__parser__Parser_assoc(v__parser__Parser* p); VV_LOCAL_SYMBOL v__ast__Expr v__parser__Parser_new_true_expr(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__verror(string s); VV_LOCAL_SYMBOL void v__parser__Parser_top_level_statement_start(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_top_level_statement_end(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_rewind_scanner_to_current_token_in_new_mode(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_mark_var_as_used(v__parser__Parser* p, string varname); VV_LOCAL_SYMBOL v__ast__Stmt v__parser__Parser_unsafe_stmt(v__parser__Parser* p); VV_LOCAL_SYMBOL bool v__parser__Parser_disallow_declarations_in_script_mode(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__Parser_show(v__parser__Parser* p, v__parser__ParserShowParams params); VV_LOCAL_SYMBOL void v__parser__Parser_add_defer_var(v__parser__Parser* p, v__ast__Ident ident); VV_LOCAL_SYMBOL v__ast__StructDecl v__parser__Parser_struct_decl(v__parser__Parser* p, bool is_anon); VV_LOCAL_SYMBOL v__ast__StructInit v__parser__Parser_struct_init(v__parser__Parser* p, string typ_str, v__ast__StructInitKind kind, bool is_option); VV_LOCAL_SYMBOL v__ast__InterfaceDecl v__parser__Parser_interface_decl(v__parser__Parser* p); VV_LOCAL_SYMBOL void v__parser__State_update(v__parser__State* state, string line); VV_LOCAL_SYMBOL bool v__parser__is_html_open_tag(string name, string s); VV_LOCAL_SYMBOL string v__parser__insert_template_code(string fn_name, string tmpl_str_start, string line); string v__parser__Parser_compile_template_file(v__parser__Parser* p, string template_file, string fn_name); void v__callgraph__show(v__ast__Table* table, v__pref__Preferences* pref_, Array_v__ast__File_ptr ast_files); VV_LOCAL_SYMBOL string v__callgraph__Mapper_dot_normalise_node_name(v__callgraph__Mapper* m, string name); VV_LOCAL_SYMBOL string v__callgraph__Mapper_fn_name(v__callgraph__Mapper* m, string fname, v__ast__Type receiver_type, bool is_method); VV_LOCAL_SYMBOL string v__callgraph__Mapper_dot_fn_name(v__callgraph__Mapper* m, string fname, v__ast__Type recv_type, bool is_method); VV_LOCAL_SYMBOL _result_void v__callgraph__Mapper_visit(v__callgraph__Mapper* m, v__ast__Node* node); v__builder__Builder v__builder__new_builder(v__pref__Preferences* pref_); _result_void v__builder__Builder_interpret_text(v__builder__Builder* b, string code, Array_string v_files); _result_void v__builder__Builder_front_stages(v__builder__Builder* b, Array_string v_files); _result_void v__builder__Builder_middle_stages(v__builder__Builder* b); _result_void v__builder__Builder_front_and_middle_stages(v__builder__Builder* b, Array_string v_files); void v__builder__Builder_parse_imports(v__builder__Builder* b); void v__builder__Builder_resolve_deps(v__builder__Builder* b); v__depgraph__DepGraph* v__builder__Builder_import_graph(v__builder__Builder* b); Array_string v__builder__Builder_v_files_from_dir(v__builder__Builder* b, string dir); void v__builder__Builder_log(v__builder__Builder* b, string s); void v__builder__Builder_info(v__builder__Builder* b, string s); string v__builder__module_path(string mod); _result_string v__builder__Builder_find_module_path(v__builder__Builder* b, string mod, string fpath); void v__builder__Builder_show_total_warns_and_errors_stats(v__builder__Builder* b); void v__builder__Builder_print_warnings_and_errors(v__builder__Builder* b); v__errors__Error v__builder__Builder_error_with_pos(v__builder__Builder* b, string s, string fpath, v__token__Pos pos); void v__builder__verror(string s); VV_LOCAL_SYMBOL void v__builder__Builder_show_c_compiler_output(v__builder__Builder* v, os__Result res); VV_LOCAL_SYMBOL void v__builder__Builder_post_process_c_compiler_output(v__builder__Builder* v, os__Result res); VV_LOCAL_SYMBOL void v__builder__Builder_show_cc(v__builder__Builder* v, string cmd, string response_file, string response_file_content); VV_LOCAL_SYMBOL void v__builder__Builder_setup_ccompiler_options(v__builder__Builder* v, string ccompiler); VV_LOCAL_SYMBOL Array_string v__builder__Builder_all_args(v__builder__Builder* v, v__builder__CcompilerOptions ccoptions); VV_LOCAL_SYMBOL Array_string v__builder__Builder_thirdparty_object_args(v__builder__Builder* v, v__builder__CcompilerOptions ccoptions, Array_string middle, bool cpp_file); VV_LOCAL_SYMBOL void v__builder__Builder_setup_output_name(v__builder__Builder* v); void v__builder__Builder_cc(v__builder__Builder* v); VV_LOCAL_SYMBOL void v__builder__Builder_ensure_linuxroot_exists(v__builder__Builder* b, string sysroot); VV_LOCAL_SYMBOL void v__builder__Builder_cc_linux_cross(v__builder__Builder* b); VV_LOCAL_SYMBOL void v__builder__Builder_cc_windows_cross(v__builder__Builder* c); VV_LOCAL_SYMBOL void v__builder__Builder_build_thirdparty_obj_files(v__builder__Builder* b); VV_LOCAL_SYMBOL void v__builder__Builder_build_thirdparty_obj_file(v__builder__Builder* v, string mod, string path, Array_v__cflag__CFlag moduleflags); VV_LOCAL_SYMBOL string v__builder__missing_compiler_info(void); VV_LOCAL_SYMBOL Array_string v__builder__error_context_lines(string text, string keyword, int before, int after); string v__builder__Builder_quote_compiler_name(v__builder__Builder* v, string name); _result_void v__builder__Builder_find_win_cc(v__builder__Builder* v); VV_LOCAL_SYMBOL Array_v__cflag__CFlag v__builder__Builder_get_os_cflags(v__builder__Builder* v); VV_LOCAL_SYMBOL Array_v__cflag__CFlag v__builder__Builder_get_rest_of_module_cflags(v__builder__Builder* v, v__cflag__CFlag* c); void v__builder__compile(string command, v__pref__Preferences* pref_, void (*backend_cb)(v__builder__Builder* b)); VV_LOCAL_SYMBOL void v__builder__check_if_output_folder_is_writable(v__pref__Preferences* pref_); VV_LOCAL_SYMBOL void v__builder__Builder_myfree(v__builder__Builder* b); VV_LOCAL_SYMBOL void v__builder__Builder_exit_on_invalid_syntax(v__builder__Builder* b); VV_LOCAL_SYMBOL void v__builder__Builder_run_compiled_executable_and_exit(v__builder__Builder* b); VV_LOCAL_SYMBOL void v__builder__eshcb(os__Signal _d1); VV_LOCAL_SYMBOL void v__builder__serror(string reason, IError e); VV_LOCAL_SYMBOL void v__builder__Builder_cleanup_run_executable_after_exit(v__builder__Builder* v, string exefile); void v__builder__Builder_set_module_lookup_paths(v__builder__Builder* v); Array_string v__builder__Builder_get_builtin_files(v__builder__Builder* v); Array_string v__builder__Builder_get_user_files(v__builder__Builder* v); void v__builder__Builder_dump_c_options(v__builder__Builder* b, Array_string all_args); void v__builder__Builder_dump_modules(v__builder__Builder* b, Array_string mods); void v__builder__Builder_dump_files(v__builder__Builder* b, Array_string files); VV_LOCAL_SYMBOL void v__builder__dump_list(string file_path, Array_string list); VV_LOCAL_SYMBOL _result_string v__builder__find_windows_kit_internal(v__builder__RegKey key, Array_string versions); VV_LOCAL_SYMBOL _result_v__builder__WindowsKit v__builder__find_windows_kit_root(string target_arch); VV_LOCAL_SYMBOL _result_v__builder__WindowsKit v__builder__find_windows_kit_root_by_reg(string target_arch); VV_LOCAL_SYMBOL _result_v__builder__WindowsKit v__builder__new_windows_kit(string kit_root, string target_arch); VV_LOCAL_SYMBOL _result_v__builder__WindowsKit v__builder__find_windows_kit_root_by_env(string target_arch); VV_LOCAL_SYMBOL _result_v__builder__VsInstallation v__builder__find_vs(string vswhere_dir, string host_arch, string target_arch); VV_LOCAL_SYMBOL _result_v__builder__VsInstallation v__builder__find_vs_by_reg(string vswhere_dir, string host_arch, string target_arch); VV_LOCAL_SYMBOL _result_v__builder__VsInstallation v__builder__find_vs_by_env(string host_arch, string target_arch); VV_LOCAL_SYMBOL _result_v__builder__MsvcResult v__builder__find_msvc(bool m64_target); void v__builder__Builder_cc_msvc(v__builder__Builder* v); VV_LOCAL_SYMBOL void v__builder__Builder_build_thirdparty_obj_file_with_msvc(v__builder__Builder* v, string mod, string path, Array_v__cflag__CFlag moduleflags); v__builder__MsvcStringFlags v__builder__msvc_string_flags(Array_v__cflag__CFlag cflags); VV_LOCAL_SYMBOL Array_string v__builder__MsvcResult_include_paths(v__builder__MsvcResult* r); VV_LOCAL_SYMBOL Array_string v__builder__MsvcResult_library_paths(v__builder__MsvcResult* r); void v__builder__Builder_rebuild_modules(v__builder__Builder* b); Array_string v__builder__Builder_find_invalidated_modules_by_files(v__builder__Builder* b, Array_string all_files); VV_LOCAL_SYMBOL void v__builder__Builder_v_build_module(v__builder__Builder* b, string vexe, string imp_path); VV_LOCAL_SYMBOL string v__builder__Builder_rebuild_cached_module(v__builder__Builder* b, string vexe, string imp_path); VV_LOCAL_SYMBOL void v__builder__Builder_handle_usecache(v__builder__Builder* b, string vexe); bool v__builder__Builder_should_rebuild(v__builder__Builder* b); VV_LOCAL_SYMBOL int compare_10151352214168403551_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } VV_LOCAL_SYMBOL i64 v__builder__most_recent_timestamp(Array_string files); void v__builder__Builder_rebuild(v__builder__Builder* b, void (*backend_cb)(v__builder__Builder* b)); string v__builder__Builder_get_vtmp_filename(v__builder__Builder* b, string base_file_name, string postfix); void v__builder__cbuilder__start(void); void v__builder__cbuilder__compile_c(v__builder__Builder* b); void v__builder__cbuilder__build_c(v__builder__Builder* b, Array_string v_files, string out_file); string v__builder__cbuilder__gen_c(v__builder__Builder* b, Array_string v_files); VV_LOCAL_SYMBOL void v__builder__cbuilder__parallel_cc(v__builder__Builder* b, string header, string res, string out_str, Array_int out_fn_start_pos); VV_LOCAL_SYMBOL voidptr v__builder__cbuilder__build_parallel_o_cb(sync__pool__PoolProcessor* p, int idx, int wid); VV_LOCAL_SYMBOL void v__builder__cbuilder__eprint_time(string label, string cmd, os__Result res, time__StopWatch sw); VV_LOCAL_SYMBOL void main__main(void); VV_LOCAL_SYMBOL int compare_7642010017538462575_string(string* a, string* b) { if (string__lt(*a, *b)) return -1; else return 1; } VV_LOCAL_SYMBOL void main__invoke_help_and_exit(Array_string remaining); VV_LOCAL_SYMBOL void main__rebuild(v__pref__Preferences* prefs); string _v_dump_expr_string(string fpath, int line, string sexpr, string dump_arg); v__ast__Type _v_dump_expr_v__ast__Type(string fpath, int line, string sexpr, v__ast__Type dump_arg); v__ast__Kind _v_dump_expr_v__ast__Kind(string fpath, int line, string sexpr, v__ast__Kind dump_arg); v__token__Pos _v_dump_expr_v__token__Pos(string fpath, int line, string sexpr, v__token__Pos dump_arg); int _v_dump_expr_int(string fpath, int line, string sexpr, int dump_arg); static string time__FormatTime_str(time__FormatTime it); // auto static string time__FormatDate_str(time__FormatDate it); // auto static string v__pref__Backend_str(v__pref__Backend it); // auto static string v__ast__AttrKind_str(v__ast__AttrKind it); // auto static string Array_v__ast__Expr_str(Array_v__ast__Expr a); // auto static string indent_Array_v__ast__Expr_str(Array_v__ast__Expr a, int indent_count); // auto static string v__ast__CallExpr_str(v__ast__CallExpr it); // auto static string indent_v__ast__CallExpr_str(v__ast__CallExpr it, int indent_count); // auto static string v__ast__TypeInfo_str(v__ast__TypeInfo x); // auto static string indent_v__ast__TypeInfo_str(v__ast__TypeInfo x, int indent_count); // auto static string v__ast__Fn_str(v__ast__Fn it); // auto static string indent_v__ast__Fn_str(v__ast__Fn it, int indent_count); // auto static string v__ast__Language_str(v__ast__Language it); // auto static string v__gen__c__StrType_str(v__gen__c__StrType it); // auto static string indent_v__gen__c__StrType_str(v__gen__c__StrType it, int indent_count); // auto static string Array_v__ast__Type_str(Array_v__ast__Type a); // auto static string indent_Array_v__ast__Type_str(Array_v__ast__Type a, int indent_count); // auto static string v__ast__Enum_str(v__ast__Enum it); // auto static string indent_v__ast__Enum_str(v__ast__Enum it, int indent_count); // auto static string v__token__Pos_str(v__token__Pos it); // auto static string indent_v__token__Pos_str(v__token__Pos it, int indent_count); // auto static string v__ast__ComptTimeConstValue_str(v__ast__ComptTimeConstValue x); // auto static string indent_v__ast__ComptTimeConstValue_str(v__ast__ComptTimeConstValue x, int indent_count); // auto static string Array_Array_v__ast__Type_str(Array_Array_v__ast__Type a); // auto static string indent_Array_Array_v__ast__Type_str(Array_Array_v__ast__Type a, int indent_count); // auto static string Array_rune_str(Array_rune a); // auto static string indent_Array_rune_str(Array_rune a, int indent_count); // auto static string v__ast__IdentKind_str(v__ast__IdentKind it); // auto static string Array_v__ast__Attr_str(Array_v__ast__Attr a); // auto static string indent_Array_v__ast__Attr_str(Array_v__ast__Attr a, int indent_count); // auto static string v__ast__Ident_str(v__ast__Ident it); // auto static string indent_v__ast__Ident_str(v__ast__Ident it, int indent_count); // auto static string v__scanner__CommentsMode_str(v__scanner__CommentsMode it); // auto static string v__parser__State_str(v__parser__State it); // auto static string v__errors__Reporter_str(v__errors__Reporter it); // auto static string v__builder__CcompilerOptions_str(v__builder__CcompilerOptions it); // auto static string indent_v__builder__CcompilerOptions_str(v__builder__CcompilerOptions it, int indent_count); // auto static string Array_v__cflag__CFlag_str(Array_v__cflag__CFlag a); // auto static string indent_Array_v__cflag__CFlag_str(Array_v__cflag__CFlag a, int indent_count); // auto static string Map_string_int_str(Map_string_int m); // auto static string indent_Map_string_int_str(Map_string_int m, int indent_count); // auto static string v__ast__OrExpr_str(v__ast__OrExpr it); // auto static string indent_v__ast__OrExpr_str(v__ast__OrExpr it, int indent_count); // auto static string Array_v__ast__CallArg_str(Array_v__ast__CallArg a); // auto static string indent_Array_v__ast__CallArg_str(Array_v__ast__CallArg a, int indent_count); // auto static string Array_v__ast__Comment_str(Array_v__ast__Comment a); // auto static string indent_Array_v__ast__Comment_str(Array_v__ast__Comment a, int indent_count); // auto static string v__ast__Aggregate_str(v__ast__Aggregate it); // auto static string indent_v__ast__Aggregate_str(v__ast__Aggregate it, int indent_count); // auto static string v__ast__Alias_str(v__ast__Alias it); // auto static string indent_v__ast__Alias_str(v__ast__Alias it, int indent_count); // auto static string v__ast__Array_str(v__ast__Array it); // auto static string indent_v__ast__Array_str(v__ast__Array it, int indent_count); // auto static string v__ast__ArrayFixed_str(v__ast__ArrayFixed it); // auto static string indent_v__ast__ArrayFixed_str(v__ast__ArrayFixed it, int indent_count); // auto static string v__ast__Chan_str(v__ast__Chan it); // auto static string indent_v__ast__Chan_str(v__ast__Chan it, int indent_count); // auto static string v__ast__FnType_str(v__ast__FnType it); // auto static string indent_v__ast__FnType_str(v__ast__FnType it, int indent_count); // auto static string v__ast__GenericInst_str(v__ast__GenericInst it); // auto static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_count); // auto static string v__ast__Interface_str(v__ast__Interface it); // auto static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_count); // auto static string v__ast__Map_str(v__ast__Map it); // auto static string indent_v__ast__Map_str(v__ast__Map it, int indent_count); // auto static string v__ast__MultiReturn_str(v__ast__MultiReturn it); // auto static string indent_v__ast__MultiReturn_str(v__ast__MultiReturn it, int indent_count); // auto static string v__ast__Struct_str(v__ast__Struct it); // auto static string indent_v__ast__Struct_str(v__ast__Struct it, int indent_count); // auto static string v__ast__SumType_str(v__ast__SumType it); // auto static string indent_v__ast__SumType_str(v__ast__SumType it, int indent_count); // auto static string v__ast__Thread_str(v__ast__Thread it); // auto static string indent_v__ast__Thread_str(v__ast__Thread it, int indent_count); // auto static string Array_v__ast__Param_str(Array_v__ast__Param a); // auto static string indent_Array_v__ast__Param_str(Array_v__ast__Param a, int indent_count); // auto static string Map_string_Array_v__ast__Attr_str(Map_string_Array_v__ast__Attr m); // auto static string indent_Map_string_Array_v__ast__Attr_str(Map_string_Array_v__ast__Attr m, int indent_count); // auto static string v__ast__EmptyExpr_str(v__ast__EmptyExpr it); // auto static string indent_v__ast__EmptyExpr_str(v__ast__EmptyExpr it, int indent_count); // auto static string v__ast__ScopeObject_str(v__ast__ScopeObject x); // auto static string indent_v__ast__ScopeObject_str(v__ast__ScopeObject x, int indent_count); // auto static string v__ast__IdentInfo_str(v__ast__IdentInfo x); // auto static string indent_v__ast__IdentInfo_str(v__ast__IdentInfo x, int indent_count); // auto static string v__ast__OrKind_str(v__ast__OrKind it); // auto static string Array_v__ast__Stmt_str(Array_v__ast__Stmt a); // auto static string indent_Array_v__ast__Stmt_str(Array_v__ast__Stmt a, int indent_count); // auto static string v__ast__Comment_str(v__ast__Comment it); // auto static string indent_v__ast__Comment_str(v__ast__Comment it, int indent_count); // auto static string Array_v__ast__StructField_str(Array_v__ast__StructField a); // auto static string indent_Array_v__ast__StructField_str(Array_v__ast__StructField a, int indent_count); // auto static string Map_int_Array_v__ast__Type_str(Map_int_Array_v__ast__Type m); // auto static string indent_Map_int_Array_v__ast__Type_str(Map_int_Array_v__ast__Type m, int indent_count); // auto static string Array_v__ast__Fn_str(Array_v__ast__Fn a); // auto static string indent_Array_v__ast__Fn_str(Array_v__ast__Fn a, int indent_count); // auto static string v__ast__Param_str(v__ast__Param it); // auto static string indent_v__ast__Param_str(v__ast__Param it, int indent_count); // auto static string v__ast__AsmRegister_str(v__ast__AsmRegister it); // auto static string indent_v__ast__AsmRegister_str(v__ast__AsmRegister it, int indent_count); // auto static string v__ast__ConstField_str(v__ast__ConstField it); // auto static string indent_v__ast__ConstField_str(v__ast__ConstField it, int indent_count); // auto static string v__ast__GlobalField_str(v__ast__GlobalField it); // auto static string indent_v__ast__GlobalField_str(v__ast__GlobalField it, int indent_count); // auto static string v__ast__Var_str(v__ast__Var it); // auto static string indent_v__ast__Var_str(v__ast__Var it, int indent_count); // auto static string v__ast__IdentFn_str(v__ast__IdentFn it); // auto static string indent_v__ast__IdentFn_str(v__ast__IdentFn it, int indent_count); // auto static string v__ast__IdentVar_str(v__ast__IdentVar it); // auto static string indent_v__ast__IdentVar_str(v__ast__IdentVar it, int indent_count); // auto static string v__ast__StructField_str(v__ast__StructField it); // auto static string indent_v__ast__StructField_str(v__ast__StructField it, int indent_count); // auto static string v__ast__ComptimeVarKind_str(v__ast__ComptimeVarKind it); // auto static string v__ast__StructDecl_str(v__ast__StructDecl it); // auto static string indent_v__ast__StructDecl_str(v__ast__StructDecl it, int indent_count); // auto static string Array_v__ast__Embed_str(Array_v__ast__Embed a); // auto static string indent_Array_v__ast__Embed_str(Array_v__ast__Embed a, int indent_count); // auto static string v__ast__Embed_str(v__ast__Embed it); // auto static string indent_v__ast__Embed_str(v__ast__Embed it, int indent_count); // auto static bool Array_rune_arr_eq(Array_rune a, Array_rune b); // auto static bool time__Duration_alias_eq(time__Duration a, time__Duration b); // auto static bool v__ast__Type_alias_eq(v__ast__Type a, v__ast__Type b); // auto static bool Array_string_arr_eq(Array_string a, Array_string b); // auto static bool Array_v__ast__Type_arr_eq(Array_v__ast__Type a, Array_v__ast__Type b); // auto static bool v__token__Pos_struct_eq(v__token__Pos a, v__token__Pos b); // auto static bool v__ast__Stmt_sumtype_eq(v__ast__Stmt a, v__ast__Stmt b); // auto static bool v__ast__AsmStmt_struct_eq(v__ast__AsmStmt a, v__ast__AsmStmt b); // auto static bool Array_v__ast__AsmClobbered_arr_eq(Array_v__ast__AsmClobbered a, Array_v__ast__AsmClobbered b); // auto static bool v__ast__AsmClobbered_struct_eq(v__ast__AsmClobbered a, v__ast__AsmClobbered b); // auto static bool v__ast__AsmRegister_struct_eq(v__ast__AsmRegister a, v__ast__AsmRegister b); // auto static bool Array_v__ast__Comment_arr_eq(Array_v__ast__Comment a, Array_v__ast__Comment b); // auto static bool v__ast__Comment_struct_eq(v__ast__Comment a, v__ast__Comment b); // auto static bool Array_v__ast__AsmTemplate_arr_eq(Array_v__ast__AsmTemplate a, Array_v__ast__AsmTemplate b); // auto static bool v__ast__AsmTemplate_struct_eq(v__ast__AsmTemplate a, v__ast__AsmTemplate b); // auto static bool Array_v__ast__AsmArg_arr_eq(Array_v__ast__AsmArg a, Array_v__ast__AsmArg b); // auto static bool v__ast__AsmArg_sumtype_eq(v__ast__AsmArg a, v__ast__AsmArg b); // auto static bool v__ast__AsmAddressing_struct_eq(v__ast__AsmAddressing a, v__ast__AsmAddressing b); // auto static bool v__ast__AsmAlias_struct_eq(v__ast__AsmAlias a, v__ast__AsmAlias b); // auto static bool v__ast__AsmDisp_struct_eq(v__ast__AsmDisp a, v__ast__AsmDisp b); // auto static bool v__ast__BoolLiteral_struct_eq(v__ast__BoolLiteral a, v__ast__BoolLiteral b); // auto static bool v__ast__CharLiteral_struct_eq(v__ast__CharLiteral a, v__ast__CharLiteral b); // auto static bool v__ast__FloatLiteral_struct_eq(v__ast__FloatLiteral a, v__ast__FloatLiteral b); // auto static bool v__ast__IntegerLiteral_struct_eq(v__ast__IntegerLiteral a, v__ast__IntegerLiteral b); // auto static bool Array_v__ast__AsmIO_arr_eq(Array_v__ast__AsmIO a, Array_v__ast__AsmIO b); // auto static bool v__ast__AsmIO_struct_eq(v__ast__AsmIO a, v__ast__AsmIO b); // auto static bool v__ast__Expr_sumtype_eq(v__ast__Expr a, v__ast__Expr b); // auto static bool v__ast__AnonFn_struct_eq(v__ast__AnonFn a, v__ast__AnonFn b); // auto static bool v__ast__FnDecl_struct_eq(v__ast__FnDecl a, v__ast__FnDecl b); // auto static bool v__ast__StructField_struct_eq(v__ast__StructField a, v__ast__StructField b); // auto static bool v__ast__StructDecl_struct_eq(v__ast__StructDecl a, v__ast__StructDecl b); // auto static bool Array_v__ast__Attr_arr_eq(Array_v__ast__Attr a, Array_v__ast__Attr b); // auto static bool v__ast__Attr_struct_eq(v__ast__Attr a, v__ast__Attr b); // auto static bool Array_v__ast__Embed_arr_eq(Array_v__ast__Embed a, Array_v__ast__Embed b); // auto static bool v__ast__Embed_struct_eq(v__ast__Embed a, v__ast__Embed b); // auto static bool Array_v__ast__StructField_arr_eq(Array_v__ast__StructField a, Array_v__ast__StructField b); // auto static bool Array_v__ast__Param_arr_eq(Array_v__ast__Param a, Array_v__ast__Param b); // auto static bool v__ast__Param_struct_eq(v__ast__Param a, v__ast__Param b); // auto static bool Array_v__ast__Stmt_arr_eq(Array_v__ast__Stmt a, Array_v__ast__Stmt b); // auto static bool Array_v__ast__DeferStmt_arr_eq(Array_v__ast__DeferStmt a, Array_v__ast__DeferStmt b); // auto static bool v__ast__DeferStmt_struct_eq(v__ast__DeferStmt a, v__ast__DeferStmt b); // auto static bool Array_v__ast__Ident_arr_eq(Array_v__ast__Ident a, Array_v__ast__Ident b); // auto static bool v__ast__Ident_struct_eq(v__ast__Ident a, v__ast__Ident b); // auto static bool v__ast__OrExpr_struct_eq(v__ast__OrExpr a, v__ast__OrExpr b); // auto static bool v__ast__ScopeObject_sumtype_eq(v__ast__ScopeObject a, v__ast__ScopeObject b); // auto static bool v__ast__ConstField_struct_eq(v__ast__ConstField a, v__ast__ConstField b); // auto static bool v__ast__ComptTimeConstValue_sumtype_eq(v__ast__ComptTimeConstValue a, v__ast__ComptTimeConstValue b); // auto static bool v__ast__EmptyExpr_alias_eq(v__ast__EmptyExpr a, v__ast__EmptyExpr b); // auto static bool v__ast__GlobalField_struct_eq(v__ast__GlobalField a, v__ast__GlobalField b); // auto static bool v__ast__Var_struct_eq(v__ast__Var a, v__ast__Var b); // auto static bool v__ast__IdentInfo_sumtype_eq(v__ast__IdentInfo a, v__ast__IdentInfo b); // auto static bool v__ast__IdentFn_struct_eq(v__ast__IdentFn a, v__ast__IdentFn b); // auto static bool v__ast__IdentVar_struct_eq(v__ast__IdentVar a, v__ast__IdentVar b); // auto static bool Map_string_bool_map_eq(Map_string_bool a, Map_string_bool b); // auto static bool v__ast__ArrayDecompose_struct_eq(v__ast__ArrayDecompose a, v__ast__ArrayDecompose b); // auto static bool v__ast__ArrayInit_struct_eq(v__ast__ArrayInit a, v__ast__ArrayInit b); // auto static bool Array_Array_v__ast__Comment_arr_eq(Array_Array_v__ast__Comment a, Array_Array_v__ast__Comment b); // auto static bool Array_v__ast__Expr_arr_eq(Array_v__ast__Expr a, Array_v__ast__Expr b); // auto static bool v__ast__AsCast_struct_eq(v__ast__AsCast a, v__ast__AsCast b); // auto static bool v__ast__Assoc_struct_eq(v__ast__Assoc a, v__ast__Assoc b); // auto static bool v__ast__AtExpr_struct_eq(v__ast__AtExpr a, v__ast__AtExpr b); // auto static bool v__ast__CTempVar_struct_eq(v__ast__CTempVar a, v__ast__CTempVar b); // auto static bool v__ast__CallExpr_struct_eq(v__ast__CallExpr a, v__ast__CallExpr b); // auto static bool Array_v__ast__CallArg_arr_eq(Array_v__ast__CallArg a, Array_v__ast__CallArg b); // auto static bool v__ast__CallArg_struct_eq(v__ast__CallArg a, v__ast__CallArg b); // auto static bool v__ast__CastExpr_struct_eq(v__ast__CastExpr a, v__ast__CastExpr b); // auto static bool v__ast__ChanInit_struct_eq(v__ast__ChanInit a, v__ast__ChanInit b); // auto static bool v__ast__ComptimeCall_struct_eq(v__ast__ComptimeCall a, v__ast__ComptimeCall b); // auto static bool v__ast__File_struct_eq(v__ast__File a, v__ast__File b); // auto static bool v__ast__Module_struct_eq(v__ast__Module a, v__ast__Module b); // auto static bool Array_v__ast__Import_arr_eq(Array_v__ast__Import a, Array_v__ast__Import b); // auto static bool v__ast__Import_struct_eq(v__ast__Import a, v__ast__Import b); // auto static bool Array_v__ast__ImportSymbol_arr_eq(Array_v__ast__ImportSymbol a, Array_v__ast__ImportSymbol b); // auto static bool v__ast__ImportSymbol_struct_eq(v__ast__ImportSymbol a, v__ast__ImportSymbol b); // auto static bool Array_v__ast__EmbeddedFile_arr_eq(Array_v__ast__EmbeddedFile a, Array_v__ast__EmbeddedFile b); // auto static bool v__ast__EmbeddedFile_struct_eq(v__ast__EmbeddedFile a, v__ast__EmbeddedFile b); // auto static bool Array_u8_arr_eq(Array_u8 a, Array_u8 b); // auto static bool Map_string_string_map_eq(Map_string_string a, Map_string_string b); // auto static bool Array_v__errors__Error_arr_eq(Array_v__errors__Error a, Array_v__errors__Error b); // auto static bool v__errors__Error_struct_eq(v__errors__Error a, v__errors__Error b); // auto static bool v__errors__CompilerMessage_struct_eq(v__errors__CompilerMessage a, v__errors__CompilerMessage b); // auto static bool Array_v__errors__Warning_arr_eq(Array_v__errors__Warning a, Array_v__errors__Warning b); // auto static bool v__errors__Warning_struct_eq(v__errors__Warning a, v__errors__Warning b); // auto static bool Array_v__errors__Notice_arr_eq(Array_v__errors__Notice a, Array_v__errors__Notice b); // auto static bool v__errors__Notice_struct_eq(v__errors__Notice a, v__errors__Notice b); // auto static bool Array_v__ast__FnDecl_ptr_arr_eq(Array_v__ast__FnDecl_ptr a, Array_v__ast__FnDecl_ptr b); // auto static bool v__ast__ComptimeSelector_struct_eq(v__ast__ComptimeSelector a, v__ast__ComptimeSelector b); // auto static bool v__ast__ComptimeType_struct_eq(v__ast__ComptimeType a, v__ast__ComptimeType b); // auto static bool v__ast__ConcatExpr_struct_eq(v__ast__ConcatExpr a, v__ast__ConcatExpr b); // auto static bool v__ast__DumpExpr_struct_eq(v__ast__DumpExpr a, v__ast__DumpExpr b); // auto static bool v__ast__EnumVal_struct_eq(v__ast__EnumVal a, v__ast__EnumVal b); // auto static bool v__ast__GoExpr_struct_eq(v__ast__GoExpr a, v__ast__GoExpr b); // auto static bool v__ast__IfExpr_struct_eq(v__ast__IfExpr a, v__ast__IfExpr b); // auto static bool Array_v__ast__IfBranch_arr_eq(Array_v__ast__IfBranch a, Array_v__ast__IfBranch b); // auto static bool v__ast__IfBranch_struct_eq(v__ast__IfBranch a, v__ast__IfBranch b); // auto static bool v__ast__IfGuardExpr_struct_eq(v__ast__IfGuardExpr a, v__ast__IfGuardExpr b); // auto static bool Array_v__ast__IfGuardVar_arr_eq(Array_v__ast__IfGuardVar a, Array_v__ast__IfGuardVar b); // auto static bool v__ast__IfGuardVar_struct_eq(v__ast__IfGuardVar a, v__ast__IfGuardVar b); // auto static bool v__ast__IndexExpr_struct_eq(v__ast__IndexExpr a, v__ast__IndexExpr b); // auto static bool v__ast__InfixExpr_struct_eq(v__ast__InfixExpr a, v__ast__InfixExpr b); // auto static bool v__ast__IsRefType_struct_eq(v__ast__IsRefType a, v__ast__IsRefType b); // auto static bool v__ast__LambdaExpr_struct_eq(v__ast__LambdaExpr a, v__ast__LambdaExpr b); // auto static bool v__ast__Likely_struct_eq(v__ast__Likely a, v__ast__Likely b); // auto static bool v__ast__LockExpr_struct_eq(v__ast__LockExpr a, v__ast__LockExpr b); // auto static bool Array_bool_arr_eq(Array_bool a, Array_bool b); // auto static bool v__ast__MapInit_struct_eq(v__ast__MapInit a, v__ast__MapInit b); // auto static bool v__ast__MatchExpr_struct_eq(v__ast__MatchExpr a, v__ast__MatchExpr b); // auto static bool Array_v__ast__MatchBranch_arr_eq(Array_v__ast__MatchBranch a, Array_v__ast__MatchBranch b); // auto static bool v__ast__MatchBranch_struct_eq(v__ast__MatchBranch a, v__ast__MatchBranch b); // auto static bool v__ast__Nil_struct_eq(v__ast__Nil a, v__ast__Nil b); // auto static bool v__ast__NodeError_struct_eq(v__ast__NodeError a, v__ast__NodeError b); // auto static bool v__ast__None_struct_eq(v__ast__None a, v__ast__None b); // auto static bool v__ast__OffsetOf_struct_eq(v__ast__OffsetOf a, v__ast__OffsetOf b); // auto static bool v__ast__ParExpr_struct_eq(v__ast__ParExpr a, v__ast__ParExpr b); // auto static bool v__ast__PostfixExpr_struct_eq(v__ast__PostfixExpr a, v__ast__PostfixExpr b); // auto static bool v__ast__PrefixExpr_struct_eq(v__ast__PrefixExpr a, v__ast__PrefixExpr b); // auto static bool v__ast__RangeExpr_struct_eq(v__ast__RangeExpr a, v__ast__RangeExpr b); // auto static bool v__ast__SelectExpr_struct_eq(v__ast__SelectExpr a, v__ast__SelectExpr b); // auto static bool Array_v__ast__SelectBranch_arr_eq(Array_v__ast__SelectBranch a, Array_v__ast__SelectBranch b); // auto static bool v__ast__SelectBranch_struct_eq(v__ast__SelectBranch a, v__ast__SelectBranch b); // auto static bool v__ast__SelectorExpr_struct_eq(v__ast__SelectorExpr a, v__ast__SelectorExpr b); // auto static bool v__ast__SizeOf_struct_eq(v__ast__SizeOf a, v__ast__SizeOf b); // auto static bool v__ast__SpawnExpr_struct_eq(v__ast__SpawnExpr a, v__ast__SpawnExpr b); // auto static bool v__ast__SqlExpr_struct_eq(v__ast__SqlExpr a, v__ast__SqlExpr b); // auto static bool v__ast__TypeNode_struct_eq(v__ast__TypeNode a, v__ast__TypeNode b); // auto static bool Map_int_v__ast__SqlExpr_map_eq(Map_int_v__ast__SqlExpr a, Map_int_v__ast__SqlExpr b); // auto static bool v__ast__StringInterLiteral_struct_eq(v__ast__StringInterLiteral a, v__ast__StringInterLiteral b); // auto static bool Array_int_arr_eq(Array_int a, Array_int b); // auto static bool Array_v__token__Pos_arr_eq(Array_v__token__Pos a, Array_v__token__Pos b); // auto static bool v__ast__StringLiteral_struct_eq(v__ast__StringLiteral a, v__ast__StringLiteral b); // auto static bool v__ast__StructInit_struct_eq(v__ast__StructInit a, v__ast__StructInit b); // auto static bool Array_v__ast__StructInitField_arr_eq(Array_v__ast__StructInitField a, Array_v__ast__StructInitField b); // auto static bool v__ast__StructInitField_struct_eq(v__ast__StructInitField a, v__ast__StructInitField b); // auto static bool v__ast__TypeOf_struct_eq(v__ast__TypeOf a, v__ast__TypeOf b); // auto static bool v__ast__UnsafeExpr_struct_eq(v__ast__UnsafeExpr a, v__ast__UnsafeExpr b); // auto static bool v__ast__AssertStmt_struct_eq(v__ast__AssertStmt a, v__ast__AssertStmt b); // auto static bool v__ast__AssignStmt_struct_eq(v__ast__AssignStmt a, v__ast__AssignStmt b); // auto static bool v__ast__Block_struct_eq(v__ast__Block a, v__ast__Block b); // auto static bool v__ast__BranchStmt_struct_eq(v__ast__BranchStmt a, v__ast__BranchStmt b); // auto static bool v__ast__ComptimeFor_struct_eq(v__ast__ComptimeFor a, v__ast__ComptimeFor b); // auto static bool v__ast__ConstDecl_struct_eq(v__ast__ConstDecl a, v__ast__ConstDecl b); // auto static bool Array_v__ast__ConstField_arr_eq(Array_v__ast__ConstField a, Array_v__ast__ConstField b); // auto static bool v__ast__EmptyStmt_struct_eq(v__ast__EmptyStmt a, v__ast__EmptyStmt b); // auto static bool v__ast__EnumDecl_struct_eq(v__ast__EnumDecl a, v__ast__EnumDecl b); // auto static bool Array_v__ast__EnumField_arr_eq(Array_v__ast__EnumField a, Array_v__ast__EnumField b); // auto static bool v__ast__EnumField_struct_eq(v__ast__EnumField a, v__ast__EnumField b); // auto static bool v__ast__ExprStmt_struct_eq(v__ast__ExprStmt a, v__ast__ExprStmt b); // auto static bool v__ast__ForCStmt_struct_eq(v__ast__ForCStmt a, v__ast__ForCStmt b); // auto static bool v__ast__ForInStmt_struct_eq(v__ast__ForInStmt a, v__ast__ForInStmt b); // auto static bool v__ast__ForStmt_struct_eq(v__ast__ForStmt a, v__ast__ForStmt b); // auto static bool v__ast__GlobalDecl_struct_eq(v__ast__GlobalDecl a, v__ast__GlobalDecl b); // auto static bool Array_v__ast__GlobalField_arr_eq(Array_v__ast__GlobalField a, Array_v__ast__GlobalField b); // auto static bool v__ast__GotoLabel_struct_eq(v__ast__GotoLabel a, v__ast__GotoLabel b); // auto static bool v__ast__GotoStmt_struct_eq(v__ast__GotoStmt a, v__ast__GotoStmt b); // auto static bool v__ast__HashStmt_struct_eq(v__ast__HashStmt a, v__ast__HashStmt b); // auto static bool v__ast__InterfaceDecl_struct_eq(v__ast__InterfaceDecl a, v__ast__InterfaceDecl b); // auto static bool Array_v__ast__FnDecl_arr_eq(Array_v__ast__FnDecl a, Array_v__ast__FnDecl b); // auto static bool Array_v__ast__InterfaceEmbedding_arr_eq(Array_v__ast__InterfaceEmbedding a, Array_v__ast__InterfaceEmbedding b); // auto static bool v__ast__InterfaceEmbedding_struct_eq(v__ast__InterfaceEmbedding a, v__ast__InterfaceEmbedding b); // auto static bool v__ast__Return_struct_eq(v__ast__Return a, v__ast__Return b); // auto static bool v__ast__SemicolonStmt_struct_eq(v__ast__SemicolonStmt a, v__ast__SemicolonStmt b); // auto static bool v__ast__SqlStmt_struct_eq(v__ast__SqlStmt a, v__ast__SqlStmt b); // auto static bool Array_v__ast__SqlStmtLine_arr_eq(Array_v__ast__SqlStmtLine a, Array_v__ast__SqlStmtLine b); // auto static bool v__ast__SqlStmtLine_struct_eq(v__ast__SqlStmtLine a, v__ast__SqlStmtLine b); // auto static bool Map_int_v__ast__SqlStmtLine_map_eq(Map_int_v__ast__SqlStmtLine a, Map_int_v__ast__SqlStmtLine b); // auto static bool v__ast__TypeDecl_sumtype_eq(v__ast__TypeDecl a, v__ast__TypeDecl b); // auto static bool v__ast__AliasTypeDecl_struct_eq(v__ast__AliasTypeDecl a, v__ast__AliasTypeDecl b); // auto static bool v__ast__FnTypeDecl_struct_eq(v__ast__FnTypeDecl a, v__ast__FnTypeDecl b); // auto static bool v__ast__SumTypeDecl_struct_eq(v__ast__SumTypeDecl a, v__ast__SumTypeDecl b); // auto static bool Array_v__ast__TypeNode_arr_eq(Array_v__ast__TypeNode a, Array_v__ast__TypeNode b); // auto static bool v__gen__c__StrType_struct_eq(v__gen__c__StrType a, v__gen__c__StrType b); // auto static bool v__gen__c__SumtypeCastingFn_struct_eq(v__gen__c__SumtypeCastingFn a, v__gen__c__SumtypeCastingFn b); // auto void v__ast__TypeSymbol_free(v__ast__TypeSymbol* it); // auto void Array_v__ast__Fn_free(Array_v__ast__Fn* it); // auto void v__ast__Fn_free(v__ast__Fn* it); // auto void Array_v__ast__Param_free(Array_v__ast__Param* it); // auto void v__ast__Param_free(v__ast__Param* it); // auto void Array_v__ast__Comment_free(Array_v__ast__Comment* it); // auto void v__ast__Comment_free(v__ast__Comment* it); // auto void Array_v__ast__Attr_free(Array_v__ast__Attr* it); // auto void v__ast__Attr_free(v__ast__Attr* it); // auto void Array_v__ast__Type_free(Array_v__ast__Type* it); // auto // V global/const definitions: string _const_math__bits__overflow_error; // a string literal, inited later string _const_math__bits__divide_error; // a string literal, inited later #define _const_strconv__digits 18 #define _const_strconv__int_size 32 #define _const_strconv__bias32 127 #define _const_strconv__maxexp32 255 #define _const_strconv__bias64 1023 #define _const_strconv__maxexp64 2047 #define _const_strconv__max_size_f64_char 32 string _const_strconv__digit_pairs; // a string literal, inited later string _const_strconv__base_digits; // a string literal, inited later #define _const_strconv__pow5_num_bits_32 61 #define _const_strconv__pow5_inv_num_bits_32 59 #define _const_strconv__pow5_num_bits_64 121 #define _const_strconv__pow5_inv_num_bits_64 122 string _const_digit_pairs; // a string literal, inited later #define _const_hashbits 24 #define _const_max_cached_hashbits 16 #define _const_init_log_capicity 5 #define _const_init_capicity 32 #define _const_init_even_index 30 #define _const_extra_metas_inc 4 #define _const_prealloc_block_size 16777216 #define _const_degree 6 #define _const_mid_index 5 #define _const_max_len 11 string _const_si_s_code; // a string literal, inited later string _const_si_g32_code; // a string literal, inited later string _const_si_g64_code; // a string literal, inited later #define _const_cp_utf8 65001 #define _const_term__termios__cclen 32 string _const_time__days_string; // a string literal, inited later string _const_time__months_string; // a string literal, inited later #define _const_time__seconds_per_minute 60 #define _const_time__seconds_per_hour 3600 #define _const_time__seconds_per_day 86400 #define _const_time__seconds_per_week 604800 #define _const_time__days_per_400_years 146097 #define _const_time__days_per_100_years 36524 #define _const_time__days_per_4_years 1461 #define _const_time__days_in_year 365 #define _const_sync__stdatomic__used 1 string _const_flag__space; // a string literal, inited later string _const_flag__underline; // a string literal, inited later #define _const_flag__max_args_number 4048 #define _const_semver__ver_major 0 #define _const_semver__ver_minor 1 #define _const_semver__ver_patch 2 string _const_semver__comparator_sep; // a string literal, inited later string _const_semver__comparator_set_sep; // a string literal, inited later string _const_semver__hyphen_range_sep; // a string literal, inited later string _const_semver__x_range_symbols; // a string literal, inited later #define _const_os__max_path_buffer_size 4096 #define _const_os__o_binary 0 #define _const_os__bslash '\\' string _const_os__fslash_str; // a string literal, inited later string _const_os__dot_dot; // a string literal, inited later string _const_os__empty_str; // a string literal, inited later string _const_os__dot_str; // a string literal, inited later #define _const_os__buf_size 4096 #define _const_os__max_path_len 4096 #define _const_os__f_ok 0 #define _const_os__x_ok 1 #define _const_os__w_ok 2 #define _const_os__r_ok 4 #define _const_os__prot_read 1 #define _const_os__prot_write 2 #define _const_os__map_private 2 #define _const_os__map_anonymous 32 #define _const_os__sys_write 1 #define _const_os__sys_open 2 #define _const_os__sys_close 3 #define _const_os__sys_mkdir 83 #define _const_os__sys_creat 85 string _const_os__path_separator; // a string literal, inited later string _const_os__path_delimiter; // a string literal, inited later #define _const_os__stdin_value 0 #define _const_os__stdout_value 1 #define _const_os__stderr_value 2 #define _const_os__s_ifmt 61440 #define _const_os__s_ifdir 16384 #define _const_os__s_iflnk 40960 #define _const_os__s_isuid 2048 #define _const_os__s_isgid 1024 #define _const_os__s_isvtx 512 #define _const_os__s_irusr 256 #define _const_os__s_iwusr 128 #define _const_os__s_ixusr 64 #define _const_os__s_irgrp 32 #define _const_os__s_iwgrp 16 #define _const_os__s_ixgrp 8 #define _const_os__s_iroth 4 #define _const_os__s_iwoth 2 #define _const_os__s_ixoth 1 #define _const_term__default_columns_size 80 #define _const_term__default_rows_size 25 string _const_v__help__unknown_topic; // a string literal, inited later string _const_v__util__version__v_version; // a string literal, inited later string _const_v__vmod__err_label; // a string literal, inited later string _const_v__cflag__fexisting_literal; // a string literal, inited later #define _const_rand__wyrand__seed_len 2 string _const_v__pkgconfig__version; // a string literal, inited later string _const_rand__ulid_encoding; // a string literal, inited later string _const_rand__english_letters; // a string literal, inited later string _const_rand__hex_chars; // a string literal, inited later string _const_rand__ascii_chars; // a string literal, inited later #define _const_sync__aops_used 1 #define _const_sync__spinloops 750 #define _const_sync__spinloops_sem 4000 #define _const_v__util__error_context_before 2 #define _const_v__util__error_context_after 2 #define _const_v__util__backslash 92 #define _const_v__util__backslash_r 13 #define _const_v__util__backslash_n 10 #define _const_v__util__double_quote 34 string _const_v__util__double_escape; // a string literal, inited later string _const_v__util__map_prefix; // a string literal, inited later #define _const_v__ast__invalid_type_idx -1 #define _const_v__ast__void_type_idx 1 #define _const_v__ast__voidptr_type_idx 2 #define _const_v__ast__byteptr_type_idx 3 #define _const_v__ast__charptr_type_idx 4 #define _const_v__ast__i8_type_idx 5 #define _const_v__ast__i16_type_idx 6 #define _const_v__ast__int_type_idx 7 #define _const_v__ast__i64_type_idx 8 #define _const_v__ast__isize_type_idx 9 #define _const_v__ast__u8_type_idx 10 #define _const_v__ast__u16_type_idx 11 #define _const_v__ast__u32_type_idx 12 #define _const_v__ast__u64_type_idx 13 #define _const_v__ast__usize_type_idx 14 #define _const_v__ast__f32_type_idx 15 #define _const_v__ast__f64_type_idx 16 #define _const_v__ast__char_type_idx 17 #define _const_v__ast__bool_type_idx 18 #define _const_v__ast__none_type_idx 19 #define _const_v__ast__string_type_idx 20 #define _const_v__ast__rune_type_idx 21 #define _const_v__ast__array_type_idx 22 #define _const_v__ast__map_type_idx 23 #define _const_v__ast__chan_type_idx 24 #define _const_v__ast__any_type_idx 25 #define _const_v__ast__float_literal_type_idx 26 #define _const_v__ast__int_literal_type_idx 27 #define _const_v__ast__thread_type_idx 28 #define _const_v__ast__error_type_idx 29 #define _const_v__ast__nil_type_idx 30 string _const_v__gen__c__si_s_code; // a string literal, inited later string _const_v__gen__c__result_name; // a string literal, inited later string _const_v__gen__c__option_name; // a string literal, inited later string _const_v__gen__c__c_commit_hash_default; // a string literal, inited later string _const_v__gen__c__c_current_commit_hash_default; // a string literal, inited later string _const_v__gen__c__c_concurrency_helpers; // a string literal, inited later string _const_v__gen__c__c_common_macros; // a string literal, inited later string _const_v__gen__c__c_unsigned_comparison_functions; // a string literal, inited later string _const_v__gen__c__c_helper_macros; // a string literal, inited later string _const_v__gen__c__c_headers; // str inited later string _const_v__gen__c__c_builtin_types; // a string literal, inited later string _const_v__gen__c__c_bare_headers; // str inited later string _const_v__gen__c__c_wyhash_headers; // a string literal, inited later string _const_v__gen__c__closure_ctx; // a string literal, inited later string _const_v__gen__c__posix_hotcode_definitions_1; // a string literal, inited later string _const_v__gen__c__windows_hotcode_definitions_1; // a string literal, inited later string _const_v__gen__c__cprefix; // a string literal, inited later #define _const_v__scanner__single_quote '\'' #define _const_v__scanner__double_quote '"' #define _const_v__scanner__b_lf 10 #define _const_v__scanner__b_cr 13 #define _const_v__scanner__backslash '\\' string _const_v__scanner__internally_generated_v_code; // a string literal, inited later #define _const_v__checker__expr_level_cutoff_limit 40 #define _const_v__checker__stmt_level_cutoff_limit 40 #define _const_v__checker__iface_level_cutoff_limit 100 #define _const_v__checker__generic_fn_cutoff_limit_per_fn 10000 #define _const_v__checker__generic_fn_postprocess_iterations_cutoff_limit 1000000 string _const_v__checker__vroot_is_deprecated_message; // a string literal, inited later string _const_v__checker__v_orm_prefix; // a string literal, inited later string _const_v__checker__fkey_attr_name; // a string literal, inited later string _const_v__checker__pkey_attr_name; // a string literal, inited later string _const_v__checker__connection_interface_name; // a string literal, inited later string _const_v__checker__unicode_lit_overflow_message; // a string literal, inited later #define _const_v__parser__max_expr_level 100 #define _const_v__parser__maximum_inline_sum_type_variants 3 string _const_v__parser__tmpl_str_end; // a string literal, inited later string _const_v__builder__c_std; // a string literal, inited later string _const_v__builder__c_std_gnu; // a string literal, inited later string _const_v__builder__cpp_std; // a string literal, inited later string _const_v__builder__cpp_std_gnu; // a string literal, inited later string _const_v__builder__c_verror_message_marker; // a string literal, inited later string _const_v__builder__c_error_info; // a string literal, inited later string _const_v__builder__no_compiler_error; // a string literal, inited later #define _const_v__builder__key_query_value 1 #define _const_v__builder__key_wow64_32key 512 #define _const_v__builder__key_enumerate_sub_keys 8 const u32 _const_math__bits__de_bruijn32 = 125613361; // precomputed2 Array_fixed_u8_32 _const_math__bits__de_bruijn32tab = {((u8)(0)), 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9}; // fixed array const const u64 _const_math__bits__de_bruijn64 = 285870213051353865U; // precomputed2 Array_fixed_u8_64 _const_math__bits__de_bruijn64tab = {((u8)(0)), 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4, 62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5, 63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11, 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6}; // fixed array const const u64 _const_math__bits__m0 = 6148914691236517205U; // precomputed2 const u64 _const_math__bits__m1 = 3689348814741910323U; // precomputed2 const u64 _const_math__bits__m2 = 1085102592571150095U; // precomputed2 const u64 _const_math__bits__m3 = 71777214294589695U; // precomputed2 const u64 _const_math__bits__m4 = 281470681808895U; // precomputed2 const u32 _const_math__bits__max_u32 = 4294967295; // precomputed2 const u64 _const_math__bits__max_u64 = 18446744073709551615U; // precomputed2 const u8 _const_math__bits__n8 = 8; // precomputed2 const u16 _const_math__bits__n16 = 16; // precomputed2 const u32 _const_math__bits__n32 = 32; // precomputed2 const u64 _const_math__bits__n64 = 64U; // precomputed2 const u64 _const_math__bits__two32 = 4294967296U; // precomputed2 const u64 _const_math__bits__mask32 = 4294967295U; // precomputed2 Array_fixed_u8_256 _const_math__bits__ntz_8_tab = {((u8)(0x08)), 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x06, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x07, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x06, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00}; // fixed array const Array_fixed_u8_256 _const_math__bits__pop_8_tab = {((u8)(0x00)), 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x03, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, 0x05, 0x06, 0x06, 0x07, 0x06, 0x07, 0x07, 0x08}; // fixed array const Array_fixed_u8_256 _const_math__bits__rev_8_tab = {((u8)(0x00)), 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff}; // fixed array const Array_fixed_u8_256 _const_math__bits__len_8_tab = {((u8)(0x00)), 0x01, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; // fixed array const const u32 _const_strconv__single_plus_zero = 0; // precomputed2 const u32 _const_strconv__single_minus_zero = 2147483648; // precomputed2 const u32 _const_strconv__single_plus_infinity = 2139095040; // precomputed2 const u32 _const_strconv__single_minus_infinity = 4286578688; // precomputed2 const u64 _const_strconv__double_plus_zero = 0U; // precomputed2 const u64 _const_strconv__double_minus_zero = 9223372036854775808U; // precomputed2 const u64 _const_strconv__double_plus_infinity = 9218868437227405312U; // precomputed2 const u64 _const_strconv__double_minus_infinity = 18442240474082181120U; // precomputed2 const rune _const_strconv__c_dpoint = '.'; // precomputed2 const rune _const_strconv__c_plus = '+'; // precomputed2 const rune _const_strconv__c_minus = '-'; // precomputed2 const rune _const_strconv__c_zero = '0'; // precomputed2 const rune _const_strconv__c_nine = '9'; // precomputed2 const u32 _const_strconv__c_ten = 10; // precomputed2 Array_fixed_u64_309 _const_strconv__pos_exp = {((u64)(0x3ff0000000000000U)), ((u64)(0x4024000000000000U)), ((u64)(0x4059000000000000U)), ((u64)(0x408f400000000000U)), ((u64)(0x40c3880000000000U)), ((u64)(0x40f86a0000000000U)), ((u64)(0x412e848000000000U)), ((u64)(0x416312d000000000U)), ((u64)(0x4197d78400000000U)), ((u64)(0x41cdcd6500000000U)), ((u64)(0x4202a05f20000000U)), ((u64)(0x42374876e8000000U)), ((u64)(0x426d1a94a2000000U)), ((u64)(0x42a2309ce5400000U)), ((u64)(0x42d6bcc41e900000U)), ((u64)(0x430c6bf526340000U)), ((u64)(0x4341c37937e08000U)), ((u64)(0x4376345785d8a000U)), ((u64)(0x43abc16d674ec800U)), ((u64)(0x43e158e460913d00U)), ((u64)(0x4415af1d78b58c40U)), ((u64)(0x444b1ae4d6e2ef50U)), ((u64)(0x4480f0cf064dd592U)), ((u64)(0x44b52d02c7e14af6U)), ((u64)(0x44ea784379d99db4U)), ((u64)(0x45208b2a2c280291U)), ((u64)(0x4554adf4b7320335U)), ((u64)(0x4589d971e4fe8402U)), ((u64)(0x45c027e72f1f1281U)), ((u64)(0x45f431e0fae6d721U)), ((u64)(0x46293e5939a08ceaU)), ((u64)(0x465f8def8808b024U)), ((u64)(0x4693b8b5b5056e17U)), ((u64)(0x46c8a6e32246c99cU)), ((u64)(0x46fed09bead87c03U)), ((u64)(0x4733426172c74d82U)), ((u64)(0x476812f9cf7920e3U)), ((u64)(0x479e17b84357691bU)), ((u64)(0x47d2ced32a16a1b1U)), ((u64)(0x48078287f49c4a1dU)), ((u64)(0x483d6329f1c35ca5U)), ((u64)(0x48725dfa371a19e7U)), ((u64)(0x48a6f578c4e0a061U)), ((u64)(0x48dcb2d6f618c879U)), ((u64)(0x4911efc659cf7d4cU)), ((u64)(0x49466bb7f0435c9eU)), ((u64)(0x497c06a5ec5433c6U)), ((u64)(0x49b18427b3b4a05cU)), ((u64)(0x49e5e531a0a1c873U)), ((u64)(0x4a1b5e7e08ca3a8fU)), ((u64)(0x4a511b0ec57e649aU)), ((u64)(0x4a8561d276ddfdc0U)), ((u64)(0x4ababa4714957d30U)), ((u64)(0x4af0b46c6cdd6e3eU)), ((u64)(0x4b24e1878814c9ceU)), ((u64)(0x4b5a19e96a19fc41U)), ((u64)(0x4b905031e2503da9U)), ((u64)(0x4bc4643e5ae44d13U)), ((u64)(0x4bf97d4df19d6057U)), ((u64)(0x4c2fdca16e04b86dU)), ((u64)(0x4c63e9e4e4c2f344U)), ((u64)(0x4c98e45e1df3b015U)), ((u64)(0x4ccf1d75a5709c1bU)), ((u64)(0x4d03726987666191U)), ((u64)(0x4d384f03e93ff9f5U)), ((u64)(0x4d6e62c4e38ff872U)), ((u64)(0x4da2fdbb0e39fb47U)), ((u64)(0x4dd7bd29d1c87a19U)), ((u64)(0x4e0dac74463a989fU)), ((u64)(0x4e428bc8abe49f64U)), ((u64)(0x4e772ebad6ddc73dU)), ((u64)(0x4eacfa698c95390cU)), ((u64)(0x4ee21c81f7dd43a7U)), ((u64)(0x4f16a3a275d49491U)), ((u64)(0x4f4c4c8b1349b9b5U)), ((u64)(0x4f81afd6ec0e1411U)), ((u64)(0x4fb61bcca7119916U)), ((u64)(0x4feba2bfd0d5ff5bU)), ((u64)(0x502145b7e285bf99U)), ((u64)(0x50559725db272f7fU)), ((u64)(0x508afcef51f0fb5fU)), ((u64)(0x50c0de1593369d1bU)), ((u64)(0x50f5159af8044462U)), ((u64)(0x512a5b01b605557bU)), ((u64)(0x516078e111c3556dU)), ((u64)(0x5194971956342ac8U)), ((u64)(0x51c9bcdfabc1357aU)), ((u64)(0x5200160bcb58c16cU)), ((u64)(0x52341b8ebe2ef1c7U)), ((u64)(0x526922726dbaae39U)), ((u64)(0x529f6b0f092959c7U)), ((u64)(0x52d3a2e965b9d81dU)), ((u64)(0x53088ba3bf284e24U)), ((u64)(0x533eae8caef261adU)), ((u64)(0x53732d17ed577d0cU)), ((u64)(0x53a7f85de8ad5c4fU)), ((u64)(0x53ddf67562d8b363U)), ((u64)(0x5412ba095dc7701eU)), ((u64)(0x5447688bb5394c25U)), ((u64)(0x547d42aea2879f2eU)), ((u64)(0x54b249ad2594c37dU)), ((u64)(0x54e6dc186ef9f45cU)), ((u64)(0x551c931e8ab87173U)), ((u64)(0x5551dbf316b346e8U)), ((u64)(0x558652efdc6018a2U)), ((u64)(0x55bbe7abd3781ecaU)), ((u64)(0x55f170cb642b133fU)), ((u64)(0x5625ccfe3d35d80eU)), ((u64)(0x565b403dcc834e12U)), ((u64)(0x569108269fd210cbU)), ((u64)(0x56c54a3047c694feU)), ((u64)(0x56fa9cbc59b83a3dU)), ((u64)(0x5730a1f5b8132466U)), ((u64)(0x5764ca732617ed80U)), ((u64)(0x5799fd0fef9de8e0U)), ((u64)(0x57d03e29f5c2b18cU)), ((u64)(0x58044db473335defU)), ((u64)(0x583961219000356bU)), ((u64)(0x586fb969f40042c5U)), ((u64)(0x58a3d3e2388029bbU)), ((u64)(0x58d8c8dac6a0342aU)), ((u64)(0x590efb1178484135U)), ((u64)(0x59435ceaeb2d28c1U)), ((u64)(0x59783425a5f872f1U)), ((u64)(0x59ae412f0f768fadU)), ((u64)(0x59e2e8bd69aa19ccU)), ((u64)(0x5a17a2ecc414a03fU)), ((u64)(0x5a4d8ba7f519c84fU)), ((u64)(0x5a827748f9301d32U)), ((u64)(0x5ab7151b377c247eU)), ((u64)(0x5aecda62055b2d9eU)), ((u64)(0x5b22087d4358fc82U)), ((u64)(0x5b568a9c942f3ba3U)), ((u64)(0x5b8c2d43b93b0a8cU)), ((u64)(0x5bc19c4a53c4e697U)), ((u64)(0x5bf6035ce8b6203dU)), ((u64)(0x5c2b843422e3a84dU)), ((u64)(0x5c6132a095ce4930U)), ((u64)(0x5c957f48bb41db7cU)), ((u64)(0x5ccadf1aea12525bU)), ((u64)(0x5d00cb70d24b7379U)), ((u64)(0x5d34fe4d06de5057U)), ((u64)(0x5d6a3de04895e46dU)), ((u64)(0x5da066ac2d5daec4U)), ((u64)(0x5dd4805738b51a75U)), ((u64)(0x5e09a06d06e26112U)), ((u64)(0x5e400444244d7cabU)), ((u64)(0x5e7405552d60dbd6U)), ((u64)(0x5ea906aa78b912ccU)), ((u64)(0x5edf485516e7577fU)), ((u64)(0x5f138d352e5096afU)), ((u64)(0x5f48708279e4bc5bU)), ((u64)(0x5f7e8ca3185deb72U)), ((u64)(0x5fb317e5ef3ab327U)), ((u64)(0x5fe7dddf6b095ff1U)), ((u64)(0x601dd55745cbb7edU)), ((u64)(0x6052a5568b9f52f4U)), ((u64)(0x60874eac2e8727b1U)), ((u64)(0x60bd22573a28f19dU)), ((u64)(0x60f2357684599702U)), ((u64)(0x6126c2d4256ffcc3U)), ((u64)(0x615c73892ecbfbf4U)), ((u64)(0x6191c835bd3f7d78U)), ((u64)(0x61c63a432c8f5cd6U)), ((u64)(0x61fbc8d3f7b3340cU)), ((u64)(0x62315d847ad00087U)), ((u64)(0x6265b4e5998400a9U)), ((u64)(0x629b221effe500d4U)), ((u64)(0x62d0f5535fef2084U)), ((u64)(0x630532a837eae8a5U)), ((u64)(0x633a7f5245e5a2cfU)), ((u64)(0x63708f936baf85c1U)), ((u64)(0x63a4b378469b6732U)), ((u64)(0x63d9e056584240feU)), ((u64)(0x64102c35f729689fU)), ((u64)(0x6444374374f3c2c6U)), ((u64)(0x647945145230b378U)), ((u64)(0x64af965966bce056U)), ((u64)(0x64e3bdf7e0360c36U)), ((u64)(0x6518ad75d8438f43U)), ((u64)(0x654ed8d34e547314U)), ((u64)(0x6583478410f4c7ecU)), ((u64)(0x65b819651531f9e8U)), ((u64)(0x65ee1fbe5a7e7861U)), ((u64)(0x6622d3d6f88f0b3dU)), ((u64)(0x665788ccb6b2ce0cU)), ((u64)(0x668d6affe45f818fU)), ((u64)(0x66c262dfeebbb0f9U)), ((u64)(0x66f6fb97ea6a9d38U)), ((u64)(0x672cba7de5054486U)), ((u64)(0x6761f48eaf234ad4U)), ((u64)(0x679671b25aec1d89U)), ((u64)(0x67cc0e1ef1a724ebU)), ((u64)(0x680188d357087713U)), ((u64)(0x6835eb082cca94d7U)), ((u64)(0x686b65ca37fd3a0dU)), ((u64)(0x68a11f9e62fe4448U)), ((u64)(0x68d56785fbbdd55aU)), ((u64)(0x690ac1677aad4ab1U)), ((u64)(0x6940b8e0acac4eafU)), ((u64)(0x6974e718d7d7625aU)), ((u64)(0x69aa20df0dcd3af1U)), ((u64)(0x69e0548b68a044d6U)), ((u64)(0x6a1469ae42c8560cU)), ((u64)(0x6a498419d37a6b8fU)), ((u64)(0x6a7fe52048590673U)), ((u64)(0x6ab3ef342d37a408U)), ((u64)(0x6ae8eb0138858d0aU)), ((u64)(0x6b1f25c186a6f04cU)), ((u64)(0x6b537798f4285630U)), ((u64)(0x6b88557f31326bbbU)), ((u64)(0x6bbe6adefd7f06aaU)), ((u64)(0x6bf302cb5e6f642aU)), ((u64)(0x6c27c37e360b3d35U)), ((u64)(0x6c5db45dc38e0c82U)), ((u64)(0x6c9290ba9a38c7d1U)), ((u64)(0x6cc734e940c6f9c6U)), ((u64)(0x6cfd022390f8b837U)), ((u64)(0x6d3221563a9b7323U)), ((u64)(0x6d66a9abc9424febU)), ((u64)(0x6d9c5416bb92e3e6U)), ((u64)(0x6dd1b48e353bce70U)), ((u64)(0x6e0621b1c28ac20cU)), ((u64)(0x6e3baa1e332d728fU)), ((u64)(0x6e714a52dffc6799U)), ((u64)(0x6ea59ce797fb817fU)), ((u64)(0x6edb04217dfa61dfU)), ((u64)(0x6f10e294eebc7d2cU)), ((u64)(0x6f451b3a2a6b9c76U)), ((u64)(0x6f7a6208b5068394U)), ((u64)(0x6fb07d457124123dU)), ((u64)(0x6fe49c96cd6d16ccU)), ((u64)(0x7019c3bc80c85c7fU)), ((u64)(0x70501a55d07d39cfU)), ((u64)(0x708420eb449c8843U)), ((u64)(0x70b9292615c3aa54U)), ((u64)(0x70ef736f9b3494e9U)), ((u64)(0x7123a825c100dd11U)), ((u64)(0x7158922f31411456U)), ((u64)(0x718eb6bafd91596bU)), ((u64)(0x71c33234de7ad7e3U)), ((u64)(0x71f7fec216198ddcU)), ((u64)(0x722dfe729b9ff153U)), ((u64)(0x7262bf07a143f6d4U)), ((u64)(0x72976ec98994f489U)), ((u64)(0x72cd4a7bebfa31abU)), ((u64)(0x73024e8d737c5f0bU)), ((u64)(0x7336e230d05b76cdU)), ((u64)(0x736c9abd04725481U)), ((u64)(0x73a1e0b622c774d0U)), ((u64)(0x73d658e3ab795204U)), ((u64)(0x740bef1c9657a686U)), ((u64)(0x74417571ddf6c814U)), ((u64)(0x7475d2ce55747a18U)), ((u64)(0x74ab4781ead1989eU)), ((u64)(0x74e10cb132c2ff63U)), ((u64)(0x75154fdd7f73bf3cU)), ((u64)(0x754aa3d4df50af0bU)), ((u64)(0x7580a6650b926d67U)), ((u64)(0x75b4cffe4e7708c0U)), ((u64)(0x75ea03fde214caf1U)), ((u64)(0x7620427ead4cfed6U)), ((u64)(0x7654531e58a03e8cU)), ((u64)(0x768967e5eec84e2fU)), ((u64)(0x76bfc1df6a7a61bbU)), ((u64)(0x76f3d92ba28c7d15U)), ((u64)(0x7728cf768b2f9c5aU)), ((u64)(0x775f03542dfb8370U)), ((u64)(0x779362149cbd3226U)), ((u64)(0x77c83a99c3ec7eb0U)), ((u64)(0x77fe494034e79e5cU)), ((u64)(0x7832edc82110c2f9U)), ((u64)(0x7867a93a2954f3b8U)), ((u64)(0x789d9388b3aa30a5U)), ((u64)(0x78d27c35704a5e67U)), ((u64)(0x79071b42cc5cf601U)), ((u64)(0x793ce2137f743382U)), ((u64)(0x79720d4c2fa8a031U)), ((u64)(0x79a6909f3b92c83dU)), ((u64)(0x79dc34c70a777a4dU)), ((u64)(0x7a11a0fc668aac70U)), ((u64)(0x7a46093b802d578cU)), ((u64)(0x7a7b8b8a6038ad6fU)), ((u64)(0x7ab137367c236c65U)), ((u64)(0x7ae585041b2c477fU)), ((u64)(0x7b1ae64521f7595eU)), ((u64)(0x7b50cfeb353a97dbU)), ((u64)(0x7b8503e602893dd2U)), ((u64)(0x7bba44df832b8d46U)), ((u64)(0x7bf06b0bb1fb384cU)), ((u64)(0x7c2485ce9e7a065fU)), ((u64)(0x7c59a742461887f6U)), ((u64)(0x7c9008896bcf54faU)), ((u64)(0x7cc40aabc6c32a38U)), ((u64)(0x7cf90d56b873f4c7U)), ((u64)(0x7d2f50ac6690f1f8U)), ((u64)(0x7d63926bc01a973bU)), ((u64)(0x7d987706b0213d0aU)), ((u64)(0x7dce94c85c298c4cU)), ((u64)(0x7e031cfd3999f7b0U)), ((u64)(0x7e37e43c8800759cU)), ((u64)(0x7e6ddd4baa009303U)), ((u64)(0x7ea2aa4f4a405be2U)), ((u64)(0x7ed754e31cd072daU)), ((u64)(0x7f0d2a1be4048f90U)), ((u64)(0x7f423a516e82d9baU)), ((u64)(0x7f76c8e5ca239029U)), ((u64)(0x7fac7b1f3cac7433U)), ((u64)(0x7fe1ccf385ebc8a0U))}; // fixed array const Array_fixed_u64_324 _const_strconv__neg_exp = {((u64)(0x3ff0000000000000U)), ((u64)(0x3fb999999999999aU)), ((u64)(0x3f847ae147ae147bU)), ((u64)(0x3f50624dd2f1a9fcU)), ((u64)(0x3f1a36e2eb1c432dU)), ((u64)(0x3ee4f8b588e368f1U)), ((u64)(0x3eb0c6f7a0b5ed8dU)), ((u64)(0x3e7ad7f29abcaf48U)), ((u64)(0x3e45798ee2308c3aU)), ((u64)(0x3e112e0be826d695U)), ((u64)(0x3ddb7cdfd9d7bdbbU)), ((u64)(0x3da5fd7fe1796495U)), ((u64)(0x3d719799812dea11U)), ((u64)(0x3d3c25c268497682U)), ((u64)(0x3d06849b86a12b9bU)), ((u64)(0x3cd203af9ee75616U)), ((u64)(0x3c9cd2b297d889bcU)), ((u64)(0x3c670ef54646d497U)), ((u64)(0x3c32725dd1d243acU)), ((u64)(0x3bfd83c94fb6d2acU)), ((u64)(0x3bc79ca10c924223U)), ((u64)(0x3b92e3b40a0e9b4fU)), ((u64)(0x3b5e392010175ee6U)), ((u64)(0x3b282db34012b251U)), ((u64)(0x3af357c299a88ea7U)), ((u64)(0x3abef2d0f5da7dd9U)), ((u64)(0x3a88c240c4aecb14U)), ((u64)(0x3a53ce9a36f23c10U)), ((u64)(0x3a1fb0f6be506019U)), ((u64)(0x39e95a5efea6b347U)), ((u64)(0x39b4484bfeebc2a0U)), ((u64)(0x398039d665896880U)), ((u64)(0x3949f623d5a8a733U)), ((u64)(0x3914c4e977ba1f5cU)), ((u64)(0x38e09d8792fb4c49U)), ((u64)(0x38aa95a5b7f87a0fU)), ((u64)(0x38754484932d2e72U)), ((u64)(0x3841039d428a8b8fU)), ((u64)(0x380b38fb9daa78e4U)), ((u64)(0x37d5c72fb1552d83U)), ((u64)(0x37a16c262777579cU)), ((u64)(0x376be03d0bf225c7U)), ((u64)(0x37364cfda3281e39U)), ((u64)(0x3701d7314f534b61U)), ((u64)(0x36cc8b8218854567U)), ((u64)(0x3696d601ad376ab9U)), ((u64)(0x366244ce242c5561U)), ((u64)(0x362d3ae36d13bbceU)), ((u64)(0x35f7624f8a762fd8U)), ((u64)(0x35c2b50c6ec4f313U)), ((u64)(0x358dee7a4ad4b81fU)), ((u64)(0x3557f1fb6f10934cU)), ((u64)(0x352327fc58da0f70U)), ((u64)(0x34eea6608e29b24dU)), ((u64)(0x34b8851a0b548ea4U)), ((u64)(0x34839dae6f76d883U)), ((u64)(0x344f62b0b257c0d2U)), ((u64)(0x34191bc08eac9a41U)), ((u64)(0x33e41633a556e1ceU)), ((u64)(0x33b011c2eaabe7d8U)), ((u64)(0x3379b604aaaca626U)), ((u64)(0x3344919d5556eb52U)), ((u64)(0x3310747ddddf22a8U)), ((u64)(0x32da53fc9631d10dU)), ((u64)(0x32a50ffd44f4a73dU)), ((u64)(0x3270d9976a5d5297U)), ((u64)(0x323af5bf109550f2U)), ((u64)(0x32059165a6ddda5bU)), ((u64)(0x31d1411e1f17e1e3U)), ((u64)(0x319b9b6364f30304U)), ((u64)(0x316615e91d8f359dU)), ((u64)(0x3131ab20e472914aU)), ((u64)(0x30fc45016d841baaU)), ((u64)(0x30c69d9abe034955U)), ((u64)(0x309217aefe690777U)), ((u64)(0x305cf2b1970e7258U)), ((u64)(0x3027288e1271f513U)), ((u64)(0x2ff286d80ec190dcU)), ((u64)(0x2fbda48ce468e7c7U)), ((u64)(0x2f87b6d71d20b96cU)), ((u64)(0x2f52f8ac174d6123U)), ((u64)(0x2f1e5aacf2156838U)), ((u64)(0x2ee8488a5b445360U)), ((u64)(0x2eb36d3b7c36a91aU)), ((u64)(0x2e7f152bf9f10e90U)), ((u64)(0x2e48ddbcc7f40ba6U)), ((u64)(0x2e13e497065cd61fU)), ((u64)(0x2ddfd424d6faf031U)), ((u64)(0x2da97683df2f268dU)), ((u64)(0x2d745ecfe5bf520bU)), ((u64)(0x2d404bd984990e6fU)), ((u64)(0x2d0a12f5a0f4e3e5U)), ((u64)(0x2cd4dbf7b3f71cb7U)), ((u64)(0x2ca0aff95cc5b092U)), ((u64)(0x2c6ab328946f80eaU)), ((u64)(0x2c355c2076bf9a55U)), ((u64)(0x2c0116805effaeaaU)), ((u64)(0x2bcb5733cb32b111U)), ((u64)(0x2b95df5ca28ef40dU)), ((u64)(0x2b617f7d4ed8c33eU)), ((u64)(0x2b2bff2ee48e0530U)), ((u64)(0x2af665bf1d3e6a8dU)), ((u64)(0x2ac1eaff4a98553dU)), ((u64)(0x2a8cab3210f3bb95U)), ((u64)(0x2a56ef5b40c2fc77U)), ((u64)(0x2a225915cd68c9f9U)), ((u64)(0x29ed5b561574765bU)), ((u64)(0x29b77c44ddf6c516U)), ((u64)(0x2982c9d0b1923745U)), ((u64)(0x294e0fb44f50586eU)), ((u64)(0x29180c903f7379f2U)), ((u64)(0x28e33d4032c2c7f5U)), ((u64)(0x28aec866b79e0cbaU)), ((u64)(0x2878a0522c7e7095U)), ((u64)(0x2843b374f06526deU)), ((u64)(0x280f8587e7083e30U)), ((u64)(0x27d9379fec069826U)), ((u64)(0x27a42c7ff0054685U)), ((u64)(0x277023998cd10537U)), ((u64)(0x2739d28f47b4d525U)), ((u64)(0x2704a8729fc3ddb7U)), ((u64)(0x26d086c219697e2cU)), ((u64)(0x269a71368f0f3047U)), ((u64)(0x2665275ed8d8f36cU)), ((u64)(0x2630ec4be0ad8f89U)), ((u64)(0x25fb13ac9aaf4c0fU)), ((u64)(0x25c5a956e225d672U)), ((u64)(0x2591544581b7dec2U)), ((u64)(0x255bba08cf8c979dU)), ((u64)(0x25262e6d72d6dfb0U)), ((u64)(0x24f1bebdf578b2f4U)), ((u64)(0x24bc6463225ab7ecU)), ((u64)(0x2486b6b5b5155ff0U)), ((u64)(0x24522bc490dde65aU)), ((u64)(0x241d12d41afca3c3U)), ((u64)(0x23e7424348ca1c9cU)), ((u64)(0x23b29b69070816e3U)), ((u64)(0x237dc574d80cf16bU)), ((u64)(0x2347d12a4670c123U)), ((u64)(0x23130dbb6b8d674fU)), ((u64)(0x22de7c5f127bd87eU)), ((u64)(0x22a8637f41fcad32U)), ((u64)(0x227382cc34ca2428U)), ((u64)(0x223f37ad21436d0cU)), ((u64)(0x2208f9574dcf8a70U)), ((u64)(0x21d3faac3e3fa1f3U)), ((u64)(0x219ff779fd329cb9U)), ((u64)(0x216992c7fdc216faU)), ((u64)(0x2134756ccb01abfbU)), ((u64)(0x21005df0a267bcc9U)), ((u64)(0x20ca2fe76a3f9475U)), ((u64)(0x2094f31f8832dd2aU)), ((u64)(0x2060c27fa028b0efU)), ((u64)(0x202ad0cc33744e4bU)), ((u64)(0x1ff573d68f903ea2U)), ((u64)(0x1fc1297872d9cbb5U)), ((u64)(0x1f8b758d848fac55U)), ((u64)(0x1f55f7a46a0c89ddU)), ((u64)(0x1f2192e9ee706e4bU)), ((u64)(0x1eec1e43171a4a11U)), ((u64)(0x1eb67e9c127b6e74U)), ((u64)(0x1e81fee341fc585dU)), ((u64)(0x1e4ccb0536608d61U)), ((u64)(0x1e1708d0f84d3de7U)), ((u64)(0x1de26d73f9d764b9U)), ((u64)(0x1dad7becc2f23ac2U)), ((u64)(0x1d779657025b6235U)), ((u64)(0x1d42deac01e2b4f7U)), ((u64)(0x1d0e3113363787f2U)), ((u64)(0x1cd8274291c6065bU)), ((u64)(0x1ca3529ba7d19eafU)), ((u64)(0x1c6eea92a61c3118U)), ((u64)(0x1c38bba884e35a7aU)), ((u64)(0x1c03c9539d82aec8U)), ((u64)(0x1bcfa885c8d117a6U)), ((u64)(0x1b99539e3a40dfb8U)), ((u64)(0x1b6442e4fb671960U)), ((u64)(0x1b303583fc527ab3U)), ((u64)(0x1af9ef3993b72ab8U)), ((u64)(0x1ac4bf6142f8eefaU)), ((u64)(0x1a90991a9bfa58c8U)), ((u64)(0x1a5a8e90f9908e0dU)), ((u64)(0x1a253eda614071a4U)), ((u64)(0x19f0ff151a99f483U)), ((u64)(0x19bb31bb5dc320d2U)), ((u64)(0x1985c162b168e70eU)), ((u64)(0x1951678227871f3eU)), ((u64)(0x191bd8d03f3e9864U)), ((u64)(0x18e6470cff6546b6U)), ((u64)(0x18b1d270cc51055fU)), ((u64)(0x187c83e7ad4e6efeU)), ((u64)(0x1846cfec8aa52598U)), ((u64)(0x18123ff06eea847aU)), ((u64)(0x17dd331a4b10d3f6U)), ((u64)(0x17a75c1508da432bU)), ((u64)(0x1772b010d3e1cf56U)), ((u64)(0x173de6815302e556U)), ((u64)(0x1707eb9aa8cf1ddeU)), ((u64)(0x16d322e220a5b17eU)), ((u64)(0x169e9e369aa2b597U)), ((u64)(0x16687e92154ef7acU)), ((u64)(0x16339874ddd8c623U)), ((u64)(0x15ff5a549627a36cU)), ((u64)(0x15c91510781fb5f0U)), ((u64)(0x159410d9f9b2f7f3U)), ((u64)(0x15600d7b2e28c65cU)), ((u64)(0x1529af2b7d0e0a2dU)), ((u64)(0x14f48c22ca71a1bdU)), ((u64)(0x14c0701bd527b498U)), ((u64)(0x148a4cf9550c5426U)), ((u64)(0x14550a6110d6a9b8U)), ((u64)(0x1420d51a73deee2dU)), ((u64)(0x13eaee90b964b047U)), ((u64)(0x13b58ba6fab6f36cU)), ((u64)(0x13813c85955f2923U)), ((u64)(0x134b9408eefea839U)), ((u64)(0x1316100725988694U)), ((u64)(0x12e1a66c1e139eddU)), ((u64)(0x12ac3d79c9b8fe2eU)), ((u64)(0x12769794a160cb58U)), ((u64)(0x124212dd4de70913U)), ((u64)(0x120ceafbafd80e85U)), ((u64)(0x11d72262f3133ed1U)), ((u64)(0x11a281e8c275cbdaU)), ((u64)(0x116d9ca79d89462aU)), ((u64)(0x1137b08617a104eeU)), ((u64)(0x1102f39e794d9d8bU)), ((u64)(0x10ce5297287c2f45U)), ((u64)(0x1098421286c9bf6bU)), ((u64)(0x1063680ed23aff89U)), ((u64)(0x102f0ce4839198dbU)), ((u64)(0x0ff8d71d360e13e2U)), ((u64)(0x0fc3df4a91a4dcb5U)), ((u64)(0x0f8fcbaa82a16121U)), ((u64)(0x0f596fbb9bb44db4U)), ((u64)(0x0f245962e2f6a490U)), ((u64)(0x0ef047824f2bb6daU)), ((u64)(0x0eba0c03b1df8af6U)), ((u64)(0x0e84d6695b193bf8U)), ((u64)(0x0e50ab877c142ffaU)), ((u64)(0x0e1aac0bf9b9e65cU)), ((u64)(0x0de5566ffafb1eb0U)), ((u64)(0x0db111f32f2f4bc0U)), ((u64)(0x0d7b4feb7eb212cdU)), ((u64)(0x0d45d98932280f0aU)), ((u64)(0x0d117ad428200c08U)), ((u64)(0x0cdbf7b9d9cce00dU)), ((u64)(0x0ca65fc7e170b33eU)), ((u64)(0x0c71e6398126f5cbU)), ((u64)(0x0c3ca38f350b22dfU)), ((u64)(0x0c06e93f5da2824cU)), ((u64)(0x0bd25432b14ecea3U)), ((u64)(0x0b9d53844ee47dd1U)), ((u64)(0x0b677603725064a8U)), ((u64)(0x0b32c4cf8ea6b6ecU)), ((u64)(0x0afe07b27dd78b14U)), ((u64)(0x0ac8062864ac6f43U)), ((u64)(0x0a9338205089f29cU)), ((u64)(0x0a5ec033b40fea93U)), ((u64)(0x0a2899c2f6732210U)), ((u64)(0x09f3ae3591f5b4d9U)), ((u64)(0x09bf7d228322baf5U)), ((u64)(0x098930e868e89591U)), ((u64)(0x0954272053ed4474U)), ((u64)(0x09201f4d0ff10390U)), ((u64)(0x08e9cbae7fe805b3U)), ((u64)(0x08b4a2f1ffecd15cU)), ((u64)(0x0880825b3323dab0U)), ((u64)(0x084a6a2b85062ab3U)), ((u64)(0x081521bc6a6b555cU)), ((u64)(0x07e0e7c9eebc444aU)), ((u64)(0x07ab0c764ac6d3a9U)), ((u64)(0x0775a391d56bdc87U)), ((u64)(0x07414fa7ddefe3a0U)), ((u64)(0x070bb2a62fe638ffU)), ((u64)(0x06d62884f31e93ffU)), ((u64)(0x06a1ba03f5b21000U)), ((u64)(0x066c5cd322b67fffU)), ((u64)(0x0636b0a8e891ffffU)), ((u64)(0x060226ed86db3333U)), ((u64)(0x05cd0b15a491eb84U)), ((u64)(0x05973c115074bc6aU)), ((u64)(0x05629674405d6388U)), ((u64)(0x052dbd86cd6238d9U)), ((u64)(0x04f7cad23de82d7bU)), ((u64)(0x04c308a831868ac9U)), ((u64)(0x048e74404f3daadbU)), ((u64)(0x04585d003f6488afU)), ((u64)(0x04237d99cc506d59U)), ((u64)(0x03ef2f5c7a1a488eU)), ((u64)(0x03b8f2b061aea072U)), ((u64)(0x0383f559e7bee6c1U)), ((u64)(0x034feef63f97d79cU)), ((u64)(0x03198bf832dfdfb0U)), ((u64)(0x02e46ff9c24cb2f3U)), ((u64)(0x02b059949b708f29U)), ((u64)(0x027a28edc580e50eU)), ((u64)(0x0244ed8b04671da5U)), ((u64)(0x0210be08d0527e1dU)), ((u64)(0x01dac9a7b3b7302fU)), ((u64)(0x01a56e1fc2f8f359U)), ((u64)(0x017124e63593f5e1U)), ((u64)(0x013b6e3d22865634U)), ((u64)(0x0105f1ca820511c3U)), ((u64)(0x00d18e3b9b374169U)), ((u64)(0x009c16c5c5253575U)), ((u64)(0x0066789e3750f791U)), ((u64)(0x0031fa182c40c60dU)), ((u64)(0x000730d67819e8d2U)), ((u64)(0x0000b8157268fdafU)), ((u64)(0x000012688b70e62bU)), ((u64)(0x000001d74124e3d1U)), ((u64)(0x0000002f201d49fbU)), ((u64)(0x00000004b6695433U)), ((u64)(0x0000000078a42205U)), ((u64)(0x000000000c1069cdU)), ((u64)(0x000000000134d761U)), ((u64)(0x00000000001ee257U)), ((u64)(0x00000000000316a2U)), ((u64)(0x0000000000004f10U)), ((u64)(0x00000000000007e8U)), ((u64)(0x00000000000000caU)), ((u64)(0x0000000000000014U)), ((u64)(0x0000000000000002U))}; // fixed array const const u64 _const_strconv__max_u64 = 18446744073709551615U; // precomputed2 Array_fixed_u32_12 _const_strconv__ten_pow_table_32 = {((u32)(1U)), ((u32)(10U)), ((u32)(100U)), ((u32)(1000U)), ((u32)(10000U)), ((u32)(100000U)), ((u32)(1000000U)), ((u32)(10000000U)), ((u32)(100000000U)), ((u32)(1000000000U)), ((u32)(10000000000U)), ((u32)(100000000000U))}; // fixed array const const u32 _const_strconv__mantbits32 = 23; // precomputed2 const u32 _const_strconv__expbits32 = 8; // precomputed2 Array_fixed_u64_20 _const_strconv__ten_pow_table_64 = {((u64)(1U)), ((u64)(10U)), ((u64)(100U)), ((u64)(1000U)), ((u64)(10000U)), ((u64)(100000U)), ((u64)(1000000U)), ((u64)(10000000U)), ((u64)(100000000U)), ((u64)(1000000000U)), ((u64)(10000000000U)), ((u64)(100000000000U)), ((u64)(1000000000000U)), ((u64)(10000000000000U)), ((u64)(100000000000000U)), ((u64)(1000000000000000U)), ((u64)(10000000000000000U)), ((u64)(100000000000000000U)), ((u64)(1000000000000000000U)), ((u64)(10000000000000000000U))}; // fixed array const const u32 _const_strconv__mantbits64 = 52; // precomputed2 const u32 _const_strconv__expbits64 = 11; // precomputed2 Array_fixed_f64_20 _const_strconv__dec_round = {((f64)(0.5)), 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005, 0.00000000005, 0.000000000005, 0.0000000000005, 0.00000000000005, 0.000000000000005, 0.0000000000000005, 0.00000000000000005, 0.000000000000000005, 0.0000000000000000005, 0.00000000000000000005}; // fixed array const Array_fixed_u64_18 _const_strconv__powers_of_10 = {((u64)(1e0)), ((u64)(1e1)), ((u64)(1e2)), ((u64)(1e3)), ((u64)(1e4)), ((u64)(1e5)), ((u64)(1e6)), ((u64)(1e7)), ((u64)(1e8)), ((u64)(1e9)), ((u64)(1e10)), ((u64)(1e11)), ((u64)(1e12)), ((u64)(1e13)), ((u64)(1e14)), ((u64)(1e15)), ((u64)(1e16)), ((u64)(1e17))}; // fixed array const Array_fixed_u64_47 _const_strconv__pow5_split_32 = {((u64)(1152921504606846976U)), ((u64)(1441151880758558720U)), ((u64)(1801439850948198400U)), ((u64)(2251799813685248000U)), ((u64)(1407374883553280000U)), ((u64)(1759218604441600000U)), ((u64)(2199023255552000000U)), ((u64)(1374389534720000000U)), ((u64)(1717986918400000000U)), ((u64)(2147483648000000000U)), ((u64)(1342177280000000000U)), ((u64)(1677721600000000000U)), ((u64)(2097152000000000000U)), ((u64)(1310720000000000000U)), ((u64)(1638400000000000000U)), ((u64)(2048000000000000000U)), ((u64)(1280000000000000000U)), ((u64)(1600000000000000000U)), ((u64)(2000000000000000000U)), ((u64)(1250000000000000000U)), ((u64)(1562500000000000000U)), ((u64)(1953125000000000000U)), ((u64)(1220703125000000000U)), ((u64)(1525878906250000000U)), ((u64)(1907348632812500000U)), ((u64)(1192092895507812500U)), ((u64)(1490116119384765625U)), ((u64)(1862645149230957031U)), ((u64)(1164153218269348144U)), ((u64)(1455191522836685180U)), ((u64)(1818989403545856475U)), ((u64)(2273736754432320594U)), ((u64)(1421085471520200371U)), ((u64)(1776356839400250464U)), ((u64)(2220446049250313080U)), ((u64)(1387778780781445675U)), ((u64)(1734723475976807094U)), ((u64)(2168404344971008868U)), ((u64)(1355252715606880542U)), ((u64)(1694065894508600678U)), ((u64)(2117582368135750847U)), ((u64)(1323488980084844279U)), ((u64)(1654361225106055349U)), ((u64)(2067951531382569187U)), ((u64)(1292469707114105741U)), ((u64)(1615587133892632177U)), ((u64)(2019483917365790221U))}; // fixed array const Array_fixed_u64_31 _const_strconv__pow5_inv_split_32 = {((u64)(576460752303423489U)), ((u64)(461168601842738791U)), ((u64)(368934881474191033U)), ((u64)(295147905179352826U)), ((u64)(472236648286964522U)), ((u64)(377789318629571618U)), ((u64)(302231454903657294U)), ((u64)(483570327845851670U)), ((u64)(386856262276681336U)), ((u64)(309485009821345069U)), ((u64)(495176015714152110U)), ((u64)(396140812571321688U)), ((u64)(316912650057057351U)), ((u64)(507060240091291761U)), ((u64)(405648192073033409U)), ((u64)(324518553658426727U)), ((u64)(519229685853482763U)), ((u64)(415383748682786211U)), ((u64)(332306998946228969U)), ((u64)(531691198313966350U)), ((u64)(425352958651173080U)), ((u64)(340282366920938464U)), ((u64)(544451787073501542U)), ((u64)(435561429658801234U)), ((u64)(348449143727040987U)), ((u64)(557518629963265579U)), ((u64)(446014903970612463U)), ((u64)(356811923176489971U)), ((u64)(570899077082383953U)), ((u64)(456719261665907162U)), ((u64)(365375409332725730U))}; // fixed array const Array_fixed_u64_652 _const_strconv__pow5_split_64_x = {((u64)(0x0000000000000000U)), ((u64)(0x0100000000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x0140000000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x0190000000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01f4000000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x0138800000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x0186a00000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01e8480000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01312d0000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x017d784000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01dcd65000000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x012a05f200000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x0174876e80000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01d1a94a20000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x012309ce54000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x016bcc41e9000000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01c6bf5263400000U)), ((u64)(0x0000000000000000U)), ((u64)(0x011c37937e080000U)), ((u64)(0x0000000000000000U)), ((u64)(0x016345785d8a0000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01bc16d674ec8000U)), ((u64)(0x0000000000000000U)), ((u64)(0x01158e460913d000U)), ((u64)(0x0000000000000000U)), ((u64)(0x015af1d78b58c400U)), ((u64)(0x0000000000000000U)), ((u64)(0x01b1ae4d6e2ef500U)), ((u64)(0x0000000000000000U)), ((u64)(0x010f0cf064dd5920U)), ((u64)(0x0000000000000000U)), ((u64)(0x0152d02c7e14af68U)), ((u64)(0x0000000000000000U)), ((u64)(0x01a784379d99db42U)), ((u64)(0x4000000000000000U)), ((u64)(0x0108b2a2c2802909U)), ((u64)(0x9000000000000000U)), ((u64)(0x014adf4b7320334bU)), ((u64)(0x7400000000000000U)), ((u64)(0x019d971e4fe8401eU)), ((u64)(0x0880000000000000U)), ((u64)(0x01027e72f1f12813U)), ((u64)(0xcaa0000000000000U)), ((u64)(0x01431e0fae6d7217U)), ((u64)(0xbd48000000000000U)), ((u64)(0x0193e5939a08ce9dU)), ((u64)(0x2c9a000000000000U)), ((u64)(0x01f8def8808b0245U)), ((u64)(0x3be0400000000000U)), ((u64)(0x013b8b5b5056e16bU)), ((u64)(0x0ad8500000000000U)), ((u64)(0x018a6e32246c99c6U)), ((u64)(0x8d8e640000000000U)), ((u64)(0x01ed09bead87c037U)), ((u64)(0xb878fe8000000000U)), ((u64)(0x013426172c74d822U)), ((u64)(0x66973e2000000000U)), ((u64)(0x01812f9cf7920e2bU)), ((u64)(0x403d0da800000000U)), ((u64)(0x01e17b84357691b6U)), ((u64)(0xe826288900000000U)), ((u64)(0x012ced32a16a1b11U)), ((u64)(0x622fb2ab40000000U)), ((u64)(0x0178287f49c4a1d6U)), ((u64)(0xfabb9f5610000000U)), ((u64)(0x01d6329f1c35ca4bU)), ((u64)(0x7cb54395ca000000U)), ((u64)(0x0125dfa371a19e6fU)), ((u64)(0x5be2947b3c800000U)), ((u64)(0x016f578c4e0a060bU)), ((u64)(0x32db399a0ba00000U)), ((u64)(0x01cb2d6f618c878eU)), ((u64)(0xdfc9040047440000U)), ((u64)(0x011efc659cf7d4b8U)), ((u64)(0x17bb450059150000U)), ((u64)(0x0166bb7f0435c9e7U)), ((u64)(0xddaa16406f5a4000U)), ((u64)(0x01c06a5ec5433c60U)), ((u64)(0x8a8a4de845986800U)), ((u64)(0x0118427b3b4a05bcU)), ((u64)(0xad2ce16256fe8200U)), ((u64)(0x015e531a0a1c872bU)), ((u64)(0x987819baecbe2280U)), ((u64)(0x01b5e7e08ca3a8f6U)), ((u64)(0x1f4b1014d3f6d590U)), ((u64)(0x0111b0ec57e6499aU)), ((u64)(0xa71dd41a08f48af4U)), ((u64)(0x01561d276ddfdc00U)), ((u64)(0xd0e549208b31adb1U)), ((u64)(0x01aba4714957d300U)), ((u64)(0x828f4db456ff0c8eU)), ((u64)(0x010b46c6cdd6e3e0U)), ((u64)(0xa33321216cbecfb2U)), ((u64)(0x014e1878814c9cd8U)), ((u64)(0xcbffe969c7ee839eU)), ((u64)(0x01a19e96a19fc40eU)), ((u64)(0x3f7ff1e21cf51243U)), ((u64)(0x0105031e2503da89U)), ((u64)(0x8f5fee5aa43256d4U)), ((u64)(0x014643e5ae44d12bU)), ((u64)(0x7337e9f14d3eec89U)), ((u64)(0x0197d4df19d60576U)), ((u64)(0x1005e46da08ea7abU)), ((u64)(0x01fdca16e04b86d4U)), ((u64)(0x8a03aec4845928cbU)), ((u64)(0x013e9e4e4c2f3444U)), ((u64)(0xac849a75a56f72fdU)), ((u64)(0x018e45e1df3b0155U)), ((u64)(0x17a5c1130ecb4fbdU)), ((u64)(0x01f1d75a5709c1abU)), ((u64)(0xeec798abe93f11d6U)), ((u64)(0x013726987666190aU)), ((u64)(0xaa797ed6e38ed64bU)), ((u64)(0x0184f03e93ff9f4dU)), ((u64)(0x1517de8c9c728bdeU)), ((u64)(0x01e62c4e38ff8721U)), ((u64)(0xad2eeb17e1c7976bU)), ((u64)(0x012fdbb0e39fb474U)), ((u64)(0xd87aa5ddda397d46U)), ((u64)(0x017bd29d1c87a191U)), ((u64)(0x4e994f5550c7dc97U)), ((u64)(0x01dac74463a989f6U)), ((u64)(0xf11fd195527ce9deU)), ((u64)(0x0128bc8abe49f639U)), ((u64)(0x6d67c5faa71c2456U)), ((u64)(0x0172ebad6ddc73c8U)), ((u64)(0x88c1b77950e32d6cU)), ((u64)(0x01cfa698c95390baU)), ((u64)(0x957912abd28dfc63U)), ((u64)(0x0121c81f7dd43a74U)), ((u64)(0xbad75756c7317b7cU)), ((u64)(0x016a3a275d494911U)), ((u64)(0x298d2d2c78fdda5bU)), ((u64)(0x01c4c8b1349b9b56U)), ((u64)(0xd9f83c3bcb9ea879U)), ((u64)(0x011afd6ec0e14115U)), ((u64)(0x50764b4abe865297U)), ((u64)(0x0161bcca7119915bU)), ((u64)(0x2493de1d6e27e73dU)), ((u64)(0x01ba2bfd0d5ff5b2U)), ((u64)(0x56dc6ad264d8f086U)), ((u64)(0x01145b7e285bf98fU)), ((u64)(0x2c938586fe0f2ca8U)), ((u64)(0x0159725db272f7f3U)), ((u64)(0xf7b866e8bd92f7d2U)), ((u64)(0x01afcef51f0fb5efU)), ((u64)(0xfad34051767bdae3U)), ((u64)(0x010de1593369d1b5U)), ((u64)(0x79881065d41ad19cU)), ((u64)(0x015159af80444623U)), ((u64)(0x57ea147f49218603U)), ((u64)(0x01a5b01b605557acU)), ((u64)(0xb6f24ccf8db4f3c1U)), ((u64)(0x01078e111c3556cbU)), ((u64)(0xa4aee003712230b2U)), ((u64)(0x014971956342ac7eU)), ((u64)(0x4dda98044d6abcdfU)), ((u64)(0x019bcdfabc13579eU)), ((u64)(0xf0a89f02b062b60bU)), ((u64)(0x010160bcb58c16c2U)), ((u64)(0xacd2c6c35c7b638eU)), ((u64)(0x0141b8ebe2ef1c73U)), ((u64)(0x98077874339a3c71U)), ((u64)(0x01922726dbaae390U)), ((u64)(0xbe0956914080cb8eU)), ((u64)(0x01f6b0f092959c74U)), ((u64)(0xf6c5d61ac8507f38U)), ((u64)(0x013a2e965b9d81c8U)), ((u64)(0x34774ba17a649f07U)), ((u64)(0x0188ba3bf284e23bU)), ((u64)(0x01951e89d8fdc6c8U)), ((u64)(0x01eae8caef261acaU)), ((u64)(0x40fd3316279e9c3dU)), ((u64)(0x0132d17ed577d0beU)), ((u64)(0xd13c7fdbb186434cU)), ((u64)(0x017f85de8ad5c4edU)), ((u64)(0x458b9fd29de7d420U)), ((u64)(0x01df67562d8b3629U)), ((u64)(0xcb7743e3a2b0e494U)), ((u64)(0x012ba095dc7701d9U)), ((u64)(0x3e5514dc8b5d1db9U)), ((u64)(0x017688bb5394c250U)), ((u64)(0x4dea5a13ae346527U)), ((u64)(0x01d42aea2879f2e4U)), ((u64)(0xb0b2784c4ce0bf38U)), ((u64)(0x01249ad2594c37ceU)), ((u64)(0x5cdf165f6018ef06U)), ((u64)(0x016dc186ef9f45c2U)), ((u64)(0xf416dbf7381f2ac8U)), ((u64)(0x01c931e8ab871732U)), ((u64)(0xd88e497a83137abdU)), ((u64)(0x011dbf316b346e7fU)), ((u64)(0xceb1dbd923d8596cU)), ((u64)(0x01652efdc6018a1fU)), ((u64)(0xc25e52cf6cce6fc7U)), ((u64)(0x01be7abd3781eca7U)), ((u64)(0xd97af3c1a40105dcU)), ((u64)(0x01170cb642b133e8U)), ((u64)(0x0fd9b0b20d014754U)), ((u64)(0x015ccfe3d35d80e3U)), ((u64)(0xd3d01cde90419929U)), ((u64)(0x01b403dcc834e11bU)), ((u64)(0x6462120b1a28ffb9U)), ((u64)(0x01108269fd210cb1U)), ((u64)(0xbd7a968de0b33fa8U)), ((u64)(0x0154a3047c694fddU)), ((u64)(0x2cd93c3158e00f92U)), ((u64)(0x01a9cbc59b83a3d5U)), ((u64)(0x3c07c59ed78c09bbU)), ((u64)(0x010a1f5b81324665U)), ((u64)(0x8b09b7068d6f0c2aU)), ((u64)(0x014ca732617ed7feU)), ((u64)(0x2dcc24c830cacf34U)), ((u64)(0x019fd0fef9de8dfeU)), ((u64)(0xdc9f96fd1e7ec180U)), ((u64)(0x0103e29f5c2b18beU)), ((u64)(0x93c77cbc661e71e1U)), ((u64)(0x0144db473335deeeU)), ((u64)(0x38b95beb7fa60e59U)), ((u64)(0x01961219000356aaU)), ((u64)(0xc6e7b2e65f8f91efU)), ((u64)(0x01fb969f40042c54U)), ((u64)(0xfc50cfcffbb9bb35U)), ((u64)(0x013d3e2388029bb4U)), ((u64)(0x3b6503c3faa82a03U)), ((u64)(0x018c8dac6a0342a2U)), ((u64)(0xca3e44b4f9523484U)), ((u64)(0x01efb1178484134aU)), ((u64)(0xbe66eaf11bd360d2U)), ((u64)(0x0135ceaeb2d28c0eU)), ((u64)(0x6e00a5ad62c83907U)), ((u64)(0x0183425a5f872f12U)), ((u64)(0x0980cf18bb7a4749U)), ((u64)(0x01e412f0f768fad7U)), ((u64)(0x65f0816f752c6c8dU)), ((u64)(0x012e8bd69aa19cc6U)), ((u64)(0xff6ca1cb527787b1U)), ((u64)(0x017a2ecc414a03f7U)), ((u64)(0xff47ca3e2715699dU)), ((u64)(0x01d8ba7f519c84f5U)), ((u64)(0xbf8cde66d86d6202U)), ((u64)(0x0127748f9301d319U)), ((u64)(0x2f7016008e88ba83U)), ((u64)(0x017151b377c247e0U)), ((u64)(0x3b4c1b80b22ae923U)), ((u64)(0x01cda62055b2d9d8U)), ((u64)(0x250f91306f5ad1b6U)), ((u64)(0x012087d4358fc827U)), ((u64)(0xee53757c8b318623U)), ((u64)(0x0168a9c942f3ba30U)), ((u64)(0x29e852dbadfde7acU)), ((u64)(0x01c2d43b93b0a8bdU)), ((u64)(0x3a3133c94cbeb0ccU)), ((u64)(0x0119c4a53c4e6976U)), ((u64)(0xc8bd80bb9fee5cffU)), ((u64)(0x016035ce8b6203d3U)), ((u64)(0xbaece0ea87e9f43eU)), ((u64)(0x01b843422e3a84c8U)), ((u64)(0x74d40c9294f238a7U)), ((u64)(0x01132a095ce492fdU)), ((u64)(0xd2090fb73a2ec6d1U)), ((u64)(0x0157f48bb41db7bcU)), ((u64)(0x068b53a508ba7885U)), ((u64)(0x01adf1aea12525acU)), ((u64)(0x8417144725748b53U)), ((u64)(0x010cb70d24b7378bU)), ((u64)(0x651cd958eed1ae28U)), ((u64)(0x014fe4d06de5056eU)), ((u64)(0xfe640faf2a8619b2U)), ((u64)(0x01a3de04895e46c9U)), ((u64)(0x3efe89cd7a93d00fU)), ((u64)(0x01066ac2d5daec3eU)), ((u64)(0xcebe2c40d938c413U)), ((u64)(0x014805738b51a74dU)), ((u64)(0x426db7510f86f518U)), ((u64)(0x019a06d06e261121U)), ((u64)(0xc9849292a9b4592fU)), ((u64)(0x0100444244d7cab4U)), ((u64)(0xfbe5b73754216f7aU)), ((u64)(0x01405552d60dbd61U)), ((u64)(0x7adf25052929cb59U)), ((u64)(0x01906aa78b912cbaU)), ((u64)(0x1996ee4673743e2fU)), ((u64)(0x01f485516e7577e9U)), ((u64)(0xaffe54ec0828a6ddU)), ((u64)(0x0138d352e5096af1U)), ((u64)(0x1bfdea270a32d095U)), ((u64)(0x018708279e4bc5aeU)), ((u64)(0xa2fd64b0ccbf84baU)), ((u64)(0x01e8ca3185deb719U)), ((u64)(0x05de5eee7ff7b2f4U)), ((u64)(0x01317e5ef3ab3270U)), ((u64)(0x0755f6aa1ff59fb1U)), ((u64)(0x017dddf6b095ff0cU)), ((u64)(0x092b7454a7f3079eU)), ((u64)(0x01dd55745cbb7ecfU)), ((u64)(0x65bb28b4e8f7e4c3U)), ((u64)(0x012a5568b9f52f41U)), ((u64)(0xbf29f2e22335ddf3U)), ((u64)(0x0174eac2e8727b11U)), ((u64)(0x2ef46f9aac035570U)), ((u64)(0x01d22573a28f19d6U)), ((u64)(0xdd58c5c0ab821566U)), ((u64)(0x0123576845997025U)), ((u64)(0x54aef730d6629ac0U)), ((u64)(0x016c2d4256ffcc2fU)), ((u64)(0x29dab4fd0bfb4170U)), ((u64)(0x01c73892ecbfbf3bU)), ((u64)(0xfa28b11e277d08e6U)), ((u64)(0x011c835bd3f7d784U)), ((u64)(0x38b2dd65b15c4b1fU)), ((u64)(0x0163a432c8f5cd66U)), ((u64)(0xc6df94bf1db35de7U)), ((u64)(0x01bc8d3f7b3340bfU)), ((u64)(0xdc4bbcf772901ab0U)), ((u64)(0x0115d847ad000877U)), ((u64)(0xd35eac354f34215cU)), ((u64)(0x015b4e5998400a95U)), ((u64)(0x48365742a30129b4U)), ((u64)(0x01b221effe500d3bU)), ((u64)(0x0d21f689a5e0ba10U)), ((u64)(0x010f5535fef20845U)), ((u64)(0x506a742c0f58e894U)), ((u64)(0x01532a837eae8a56U)), ((u64)(0xe4851137132f22b9U)), ((u64)(0x01a7f5245e5a2cebU)), ((u64)(0x6ed32ac26bfd75b4U)), ((u64)(0x0108f936baf85c13U)), ((u64)(0x4a87f57306fcd321U)), ((u64)(0x014b378469b67318U)), ((u64)(0x5d29f2cfc8bc07e9U)), ((u64)(0x019e056584240fdeU)), ((u64)(0xfa3a37c1dd7584f1U)), ((u64)(0x0102c35f729689eaU)), ((u64)(0xb8c8c5b254d2e62eU)), ((u64)(0x014374374f3c2c65U)), ((u64)(0x26faf71eea079fb9U)), ((u64)(0x01945145230b377fU)), ((u64)(0xf0b9b4e6a48987a8U)), ((u64)(0x01f965966bce055eU)), ((u64)(0x5674111026d5f4c9U)), ((u64)(0x013bdf7e0360c35bU)), ((u64)(0x2c111554308b71fbU)), ((u64)(0x018ad75d8438f432U)), ((u64)(0xb7155aa93cae4e7aU)), ((u64)(0x01ed8d34e547313eU)), ((u64)(0x326d58a9c5ecf10cU)), ((u64)(0x013478410f4c7ec7U)), ((u64)(0xff08aed437682d4fU)), ((u64)(0x01819651531f9e78U)), ((u64)(0x3ecada89454238a3U)), ((u64)(0x01e1fbe5a7e78617U)), ((u64)(0x873ec895cb496366U)), ((u64)(0x012d3d6f88f0b3ceU)), ((u64)(0x290e7abb3e1bbc3fU)), ((u64)(0x01788ccb6b2ce0c2U)), ((u64)(0xb352196a0da2ab4fU)), ((u64)(0x01d6affe45f818f2U)), ((u64)(0xb0134fe24885ab11U)), ((u64)(0x01262dfeebbb0f97U)), ((u64)(0x9c1823dadaa715d6U)), ((u64)(0x016fb97ea6a9d37dU)), ((u64)(0x031e2cd19150db4bU)), ((u64)(0x01cba7de5054485dU)), ((u64)(0x21f2dc02fad2890fU)), ((u64)(0x011f48eaf234ad3aU)), ((u64)(0xaa6f9303b9872b53U)), ((u64)(0x01671b25aec1d888U)), ((u64)(0xd50b77c4a7e8f628U)), ((u64)(0x01c0e1ef1a724eaaU)), ((u64)(0xc5272adae8f199d9U)), ((u64)(0x01188d357087712aU)), ((u64)(0x7670f591a32e004fU)), ((u64)(0x015eb082cca94d75U)), ((u64)(0xd40d32f60bf98063U)), ((u64)(0x01b65ca37fd3a0d2U)), ((u64)(0xc4883fd9c77bf03eU)), ((u64)(0x0111f9e62fe44483U)), ((u64)(0xb5aa4fd0395aec4dU)), ((u64)(0x0156785fbbdd55a4U)), ((u64)(0xe314e3c447b1a760U)), ((u64)(0x01ac1677aad4ab0dU)), ((u64)(0xaded0e5aaccf089cU)), ((u64)(0x010b8e0acac4eae8U)), ((u64)(0xd96851f15802cac3U)), ((u64)(0x014e718d7d7625a2U)), ((u64)(0x8fc2666dae037d74U)), ((u64)(0x01a20df0dcd3af0bU)), ((u64)(0x39d980048cc22e68U)), ((u64)(0x010548b68a044d67U)), ((u64)(0x084fe005aff2ba03U)), ((u64)(0x01469ae42c8560c1U)), ((u64)(0x4a63d8071bef6883U)), ((u64)(0x0198419d37a6b8f1U)), ((u64)(0x9cfcce08e2eb42a4U)), ((u64)(0x01fe52048590672dU)), ((u64)(0x821e00c58dd309a7U)), ((u64)(0x013ef342d37a407cU)), ((u64)(0xa2a580f6f147cc10U)), ((u64)(0x018eb0138858d09bU)), ((u64)(0x8b4ee134ad99bf15U)), ((u64)(0x01f25c186a6f04c2U)), ((u64)(0x97114cc0ec80176dU)), ((u64)(0x0137798f428562f9U)), ((u64)(0xfcd59ff127a01d48U)), ((u64)(0x018557f31326bbb7U)), ((u64)(0xfc0b07ed7188249aU)), ((u64)(0x01e6adefd7f06aa5U)), ((u64)(0xbd86e4f466f516e0U)), ((u64)(0x01302cb5e6f642a7U)), ((u64)(0xace89e3180b25c98U)), ((u64)(0x017c37e360b3d351U)), ((u64)(0x1822c5bde0def3beU)), ((u64)(0x01db45dc38e0c826U)), ((u64)(0xcf15bb96ac8b5857U)), ((u64)(0x01290ba9a38c7d17U)), ((u64)(0xc2db2a7c57ae2e6dU)), ((u64)(0x01734e940c6f9c5dU)), ((u64)(0x3391f51b6d99ba08U)), ((u64)(0x01d022390f8b8375U)), ((u64)(0x403b393124801445U)), ((u64)(0x01221563a9b73229U)), ((u64)(0x904a077d6da01956U)), ((u64)(0x016a9abc9424feb3U)), ((u64)(0x745c895cc9081facU)), ((u64)(0x01c5416bb92e3e60U)), ((u64)(0x48b9d5d9fda513cbU)), ((u64)(0x011b48e353bce6fcU)), ((u64)(0x5ae84b507d0e58beU)), ((u64)(0x01621b1c28ac20bbU)), ((u64)(0x31a25e249c51eeeeU)), ((u64)(0x01baa1e332d728eaU)), ((u64)(0x5f057ad6e1b33554U)), ((u64)(0x0114a52dffc67992U)), ((u64)(0xf6c6d98c9a2002aaU)), ((u64)(0x0159ce797fb817f6U)), ((u64)(0xb4788fefc0a80354U)), ((u64)(0x01b04217dfa61df4U)), ((u64)(0xf0cb59f5d8690214U)), ((u64)(0x010e294eebc7d2b8U)), ((u64)(0x2cfe30734e83429aU)), ((u64)(0x0151b3a2a6b9c767U)), ((u64)(0xf83dbc9022241340U)), ((u64)(0x01a6208b50683940U)), ((u64)(0x9b2695da15568c08U)), ((u64)(0x0107d457124123c8U)), ((u64)(0xc1f03b509aac2f0aU)), ((u64)(0x0149c96cd6d16cbaU)), ((u64)(0x726c4a24c1573acdU)), ((u64)(0x019c3bc80c85c7e9U)), ((u64)(0xe783ae56f8d684c0U)), ((u64)(0x0101a55d07d39cf1U)), ((u64)(0x616499ecb70c25f0U)), ((u64)(0x01420eb449c8842eU)), ((u64)(0xf9bdc067e4cf2f6cU)), ((u64)(0x019292615c3aa539U)), ((u64)(0x782d3081de02fb47U)), ((u64)(0x01f736f9b3494e88U)), ((u64)(0x4b1c3e512ac1dd0cU)), ((u64)(0x013a825c100dd115U)), ((u64)(0x9de34de57572544fU)), ((u64)(0x018922f31411455aU)), ((u64)(0x455c215ed2cee963U)), ((u64)(0x01eb6bafd91596b1U)), ((u64)(0xcb5994db43c151deU)), ((u64)(0x0133234de7ad7e2eU)), ((u64)(0x7e2ffa1214b1a655U)), ((u64)(0x017fec216198ddbaU)), ((u64)(0x1dbbf89699de0febU)), ((u64)(0x01dfe729b9ff1529U)), ((u64)(0xb2957b5e202ac9f3U)), ((u64)(0x012bf07a143f6d39U)), ((u64)(0x1f3ada35a8357c6fU)), ((u64)(0x0176ec98994f4888U)), ((u64)(0x270990c31242db8bU)), ((u64)(0x01d4a7bebfa31aaaU)), ((u64)(0x5865fa79eb69c937U)), ((u64)(0x0124e8d737c5f0aaU)), ((u64)(0xee7f791866443b85U)), ((u64)(0x016e230d05b76cd4U)), ((u64)(0x2a1f575e7fd54a66U)), ((u64)(0x01c9abd04725480aU)), ((u64)(0x5a53969b0fe54e80U)), ((u64)(0x011e0b622c774d06U)), ((u64)(0xf0e87c41d3dea220U)), ((u64)(0x01658e3ab7952047U)), ((u64)(0xed229b5248d64aa8U)), ((u64)(0x01bef1c9657a6859U)), ((u64)(0x3435a1136d85eea9U)), ((u64)(0x0117571ddf6c8138U)), ((u64)(0x4143095848e76a53U)), ((u64)(0x015d2ce55747a186U)), ((u64)(0xd193cbae5b2144e8U)), ((u64)(0x01b4781ead1989e7U)), ((u64)(0xe2fc5f4cf8f4cb11U)), ((u64)(0x0110cb132c2ff630U)), ((u64)(0x1bbb77203731fdd5U)), ((u64)(0x0154fdd7f73bf3bdU)), ((u64)(0x62aa54e844fe7d4aU)), ((u64)(0x01aa3d4df50af0acU)), ((u64)(0xbdaa75112b1f0e4eU)), ((u64)(0x010a6650b926d66bU)), ((u64)(0xad15125575e6d1e2U)), ((u64)(0x014cffe4e7708c06U)), ((u64)(0x585a56ead360865bU)), ((u64)(0x01a03fde214caf08U)), ((u64)(0x37387652c41c53f8U)), ((u64)(0x010427ead4cfed65U)), ((u64)(0x850693e7752368f7U)), ((u64)(0x014531e58a03e8beU)), ((u64)(0x264838e1526c4334U)), ((u64)(0x01967e5eec84e2eeU)), ((u64)(0xafda4719a7075402U)), ((u64)(0x01fc1df6a7a61ba9U)), ((u64)(0x0de86c7008649481U)), ((u64)(0x013d92ba28c7d14aU)), ((u64)(0x9162878c0a7db9a1U)), ((u64)(0x018cf768b2f9c59cU)), ((u64)(0xb5bb296f0d1d280aU)), ((u64)(0x01f03542dfb83703U)), ((u64)(0x5194f9e568323906U)), ((u64)(0x01362149cbd32262U)), ((u64)(0xe5fa385ec23ec747U)), ((u64)(0x0183a99c3ec7eafaU)), ((u64)(0x9f78c67672ce7919U)), ((u64)(0x01e494034e79e5b9U)), ((u64)(0x03ab7c0a07c10bb0U)), ((u64)(0x012edc82110c2f94U)), ((u64)(0x04965b0c89b14e9cU)), ((u64)(0x017a93a2954f3b79U)), ((u64)(0x45bbf1cfac1da243U)), ((u64)(0x01d9388b3aa30a57U)), ((u64)(0x8b957721cb92856aU)), ((u64)(0x0127c35704a5e676U)), ((u64)(0x2e7ad4ea3e7726c4U)), ((u64)(0x0171b42cc5cf6014U)), ((u64)(0x3a198a24ce14f075U)), ((u64)(0x01ce2137f7433819U)), ((u64)(0xc44ff65700cd1649U)), ((u64)(0x0120d4c2fa8a030fU)), ((u64)(0xb563f3ecc1005bdbU)), ((u64)(0x016909f3b92c83d3U)), ((u64)(0xa2bcf0e7f14072d2U)), ((u64)(0x01c34c70a777a4c8U)), ((u64)(0x65b61690f6c847c3U)), ((u64)(0x011a0fc668aac6fdU)), ((u64)(0xbf239c35347a59b4U)), ((u64)(0x016093b802d578bcU)), ((u64)(0xeeec83428198f021U)), ((u64)(0x01b8b8a6038ad6ebU)), ((u64)(0x7553d20990ff9615U)), ((u64)(0x01137367c236c653U)), ((u64)(0x52a8c68bf53f7b9aU)), ((u64)(0x01585041b2c477e8U)), ((u64)(0x6752f82ef28f5a81U)), ((u64)(0x01ae64521f7595e2U)), ((u64)(0x8093db1d57999890U)), ((u64)(0x010cfeb353a97dadU)), ((u64)(0xe0b8d1e4ad7ffeb4U)), ((u64)(0x01503e602893dd18U)), ((u64)(0x18e7065dd8dffe62U)), ((u64)(0x01a44df832b8d45fU)), ((u64)(0x6f9063faa78bfefdU)), ((u64)(0x0106b0bb1fb384bbU)), ((u64)(0x4b747cf9516efebcU)), ((u64)(0x01485ce9e7a065eaU)), ((u64)(0xde519c37a5cabe6bU)), ((u64)(0x019a742461887f64U)), ((u64)(0x0af301a2c79eb703U)), ((u64)(0x01008896bcf54f9fU)), ((u64)(0xcdafc20b798664c4U)), ((u64)(0x0140aabc6c32a386U)), ((u64)(0x811bb28e57e7fdf5U)), ((u64)(0x0190d56b873f4c68U)), ((u64)(0xa1629f31ede1fd72U)), ((u64)(0x01f50ac6690f1f82U)), ((u64)(0xa4dda37f34ad3e67U)), ((u64)(0x013926bc01a973b1U)), ((u64)(0x0e150c5f01d88e01U)), ((u64)(0x0187706b0213d09eU)), ((u64)(0x919a4f76c24eb181U)), ((u64)(0x01e94c85c298c4c5U)), ((u64)(0x7b0071aa39712ef1U)), ((u64)(0x0131cfd3999f7afbU)), ((u64)(0x59c08e14c7cd7aadU)), ((u64)(0x017e43c8800759baU)), ((u64)(0xf030b199f9c0d958U)), ((u64)(0x01ddd4baa0093028U)), ((u64)(0x961e6f003c1887d7U)), ((u64)(0x012aa4f4a405be19U)), ((u64)(0xfba60ac04b1ea9cdU)), ((u64)(0x01754e31cd072d9fU)), ((u64)(0xfa8f8d705de65440U)), ((u64)(0x01d2a1be4048f907U)), ((u64)(0xfc99b8663aaff4a8U)), ((u64)(0x0123a516e82d9ba4U)), ((u64)(0x3bc0267fc95bf1d2U)), ((u64)(0x016c8e5ca239028eU)), ((u64)(0xcab0301fbbb2ee47U)), ((u64)(0x01c7b1f3cac74331U)), ((u64)(0x1eae1e13d54fd4ecU)), ((u64)(0x011ccf385ebc89ffU)), ((u64)(0xe659a598caa3ca27U)), ((u64)(0x01640306766bac7eU)), ((u64)(0x9ff00efefd4cbcb1U)), ((u64)(0x01bd03c81406979eU)), ((u64)(0x23f6095f5e4ff5efU)), ((u64)(0x0116225d0c841ec3U)), ((u64)(0xecf38bb735e3f36aU)), ((u64)(0x015baaf44fa52673U)), ((u64)(0xe8306ea5035cf045U)), ((u64)(0x01b295b1638e7010U)), ((u64)(0x911e4527221a162bU)), ((u64)(0x010f9d8ede39060aU)), ((u64)(0x3565d670eaa09bb6U)), ((u64)(0x015384f295c7478dU)), ((u64)(0x82bf4c0d2548c2a3U)), ((u64)(0x01a8662f3b391970U)), ((u64)(0x51b78f88374d79a6U)), ((u64)(0x01093fdd8503afe6U)), ((u64)(0xe625736a4520d810U)), ((u64)(0x014b8fd4e6449bdfU)), ((u64)(0xdfaed044d6690e14U)), ((u64)(0x019e73ca1fd5c2d7U)), ((u64)(0xebcd422b0601a8ccU)), ((u64)(0x0103085e53e599c6U)), ((u64)(0xa6c092b5c78212ffU)), ((u64)(0x0143ca75e8df0038U)), ((u64)(0xd070b763396297bfU)), ((u64)(0x0194bd136316c046U)), ((u64)(0x848ce53c07bb3dafU)), ((u64)(0x01f9ec583bdc7058U)), ((u64)(0x52d80f4584d5068dU)), ((u64)(0x013c33b72569c637U)), ((u64)(0x278e1316e60a4831U)), ((u64)(0x018b40a4eec437c5U))}; // fixed array const Array_fixed_u64_584 _const_strconv__pow5_inv_split_64_x = {((u64)(0x0000000000000001U)), ((u64)(0x0400000000000000U)), ((u64)(0x3333333333333334U)), ((u64)(0x0333333333333333U)), ((u64)(0x28f5c28f5c28f5c3U)), ((u64)(0x028f5c28f5c28f5cU)), ((u64)(0xed916872b020c49cU)), ((u64)(0x020c49ba5e353f7cU)), ((u64)(0xaf4f0d844d013a93U)), ((u64)(0x0346dc5d63886594U)), ((u64)(0x8c3f3e0370cdc876U)), ((u64)(0x029f16b11c6d1e10U)), ((u64)(0xd698fe69270b06c5U)), ((u64)(0x0218def416bdb1a6U)), ((u64)(0xf0f4ca41d811a46eU)), ((u64)(0x035afe535795e90aU)), ((u64)(0xf3f70834acdae9f1U)), ((u64)(0x02af31dc4611873bU)), ((u64)(0x5cc5a02a23e254c1U)), ((u64)(0x0225c17d04dad296U)), ((u64)(0xfad5cd10396a2135U)), ((u64)(0x036f9bfb3af7b756U)), ((u64)(0xfbde3da69454e75eU)), ((u64)(0x02bfaffc2f2c92abU)), ((u64)(0x2fe4fe1edd10b918U)), ((u64)(0x0232f33025bd4223U)), ((u64)(0x4ca19697c81ac1bfU)), ((u64)(0x0384b84d092ed038U)), ((u64)(0x3d4e1213067bce33U)), ((u64)(0x02d09370d4257360U)), ((u64)(0x643e74dc052fd829U)), ((u64)(0x024075f3dceac2b3U)), ((u64)(0x6d30baf9a1e626a7U)), ((u64)(0x039a5652fb113785U)), ((u64)(0x2426fbfae7eb5220U)), ((u64)(0x02e1dea8c8da92d1U)), ((u64)(0x1cebfcc8b9890e80U)), ((u64)(0x024e4bba3a487574U)), ((u64)(0x94acc7a78f41b0ccU)), ((u64)(0x03b07929f6da5586U)), ((u64)(0xaa23d2ec729af3d7U)), ((u64)(0x02f394219248446bU)), ((u64)(0xbb4fdbf05baf2979U)), ((u64)(0x025c768141d369efU)), ((u64)(0xc54c931a2c4b758dU)), ((u64)(0x03c7240202ebdcb2U)), ((u64)(0x9dd6dc14f03c5e0bU)), ((u64)(0x0305b66802564a28U)), ((u64)(0x4b1249aa59c9e4d6U)), ((u64)(0x026af8533511d4edU)), ((u64)(0x44ea0f76f60fd489U)), ((u64)(0x03de5a1ebb4fbb15U)), ((u64)(0x6a54d92bf80caa07U)), ((u64)(0x0318481895d96277U)), ((u64)(0x21dd7a89933d54d2U)), ((u64)(0x0279d346de4781f9U)), ((u64)(0x362f2a75b8622150U)), ((u64)(0x03f61ed7ca0c0328U)), ((u64)(0xf825bb91604e810dU)), ((u64)(0x032b4bdfd4d668ecU)), ((u64)(0xc684960de6a5340bU)), ((u64)(0x0289097fdd7853f0U)), ((u64)(0xd203ab3e521dc33cU)), ((u64)(0x02073accb12d0ff3U)), ((u64)(0xe99f7863b696052cU)), ((u64)(0x033ec47ab514e652U)), ((u64)(0x87b2c6b62bab3757U)), ((u64)(0x02989d2ef743eb75U)), ((u64)(0xd2f56bc4efbc2c45U)), ((u64)(0x0213b0f25f69892aU)), ((u64)(0x1e55793b192d13a2U)), ((u64)(0x0352b4b6ff0f41deU)), ((u64)(0x4b77942f475742e8U)), ((u64)(0x02a8909265a5ce4bU)), ((u64)(0xd5f9435905df68baU)), ((u64)(0x022073a8515171d5U)), ((u64)(0x565b9ef4d6324129U)), ((u64)(0x03671f73b54f1c89U)), ((u64)(0xdeafb25d78283421U)), ((u64)(0x02b8e5f62aa5b06dU)), ((u64)(0x188c8eb12cecf681U)), ((u64)(0x022d84c4eeeaf38bU)), ((u64)(0x8dadb11b7b14bd9bU)), ((u64)(0x037c07a17e44b8deU)), ((u64)(0x7157c0e2c8dd647cU)), ((u64)(0x02c99fb46503c718U)), ((u64)(0x8ddfcd823a4ab6caU)), ((u64)(0x023ae629ea696c13U)), ((u64)(0x1632e269f6ddf142U)), ((u64)(0x0391704310a8acecU)), ((u64)(0x44f581ee5f17f435U)), ((u64)(0x02dac035a6ed5723U)), ((u64)(0x372ace584c1329c4U)), ((u64)(0x024899c4858aac1cU)), ((u64)(0xbeaae3c079b842d3U)), ((u64)(0x03a75c6da27779c6U)), ((u64)(0x6555830061603576U)), ((u64)(0x02ec49f14ec5fb05U)), ((u64)(0xb7779c004de6912bU)), ((u64)(0x0256a18dd89e626aU)), ((u64)(0xf258f99a163db512U)), ((u64)(0x03bdcf495a9703ddU)), ((u64)(0x5b7a614811caf741U)), ((u64)(0x02fe3f6de212697eU)), ((u64)(0xaf951aa00e3bf901U)), ((u64)(0x0264ff8b1b41edfeU)), ((u64)(0x7f54f7667d2cc19bU)), ((u64)(0x03d4cc11c5364997U)), ((u64)(0x32aa5f8530f09ae3U)), ((u64)(0x0310a3416a91d479U)), ((u64)(0xf55519375a5a1582U)), ((u64)(0x0273b5cdeedb1060U)), ((u64)(0xbbbb5b8bc3c3559dU)), ((u64)(0x03ec56164af81a34U)), ((u64)(0x2fc916096969114aU)), ((u64)(0x03237811d593482aU)), ((u64)(0x596dab3ababa743cU)), ((u64)(0x0282c674aadc39bbU)), ((u64)(0x478aef622efb9030U)), ((u64)(0x0202385d557cfafcU)), ((u64)(0xd8de4bd04b2c19e6U)), ((u64)(0x0336c0955594c4c6U)), ((u64)(0xad7ea30d08f014b8U)), ((u64)(0x029233aaaadd6a38U)), ((u64)(0x24654f3da0c01093U)), ((u64)(0x020e8fbbbbe454faU)), ((u64)(0x3a3bb1fc346680ebU)), ((u64)(0x034a7f92c63a2190U)), ((u64)(0x94fc8e635d1ecd89U)), ((u64)(0x02a1ffa89e94e7a6U)), ((u64)(0xaa63a51c4a7f0ad4U)), ((u64)(0x021b32ed4baa52ebU)), ((u64)(0xdd6c3b607731aaedU)), ((u64)(0x035eb7e212aa1e45U)), ((u64)(0x1789c919f8f488bdU)), ((u64)(0x02b22cb4dbbb4b6bU)), ((u64)(0xac6e3a7b2d906d64U)), ((u64)(0x022823c3e2fc3c55U)), ((u64)(0x13e390c515b3e23aU)), ((u64)(0x03736c6c9e606089U)), ((u64)(0xdcb60d6a77c31b62U)), ((u64)(0x02c2bd23b1e6b3a0U)), ((u64)(0x7d5e7121f968e2b5U)), ((u64)(0x0235641c8e52294dU)), ((u64)(0xc8971b698f0e3787U)), ((u64)(0x0388a02db0837548U)), ((u64)(0xa078e2bad8d82c6cU)), ((u64)(0x02d3b357c0692aa0U)), ((u64)(0xe6c71bc8ad79bd24U)), ((u64)(0x0242f5dfcd20eee6U)), ((u64)(0x0ad82c7448c2c839U)), ((u64)(0x039e5632e1ce4b0bU)), ((u64)(0x3be023903a356cfaU)), ((u64)(0x02e511c24e3ea26fU)), ((u64)(0x2fe682d9c82abd95U)), ((u64)(0x0250db01d8321b8cU)), ((u64)(0x4ca4048fa6aac8eeU)), ((u64)(0x03b4919c8d1cf8e0U)), ((u64)(0x3d5003a61eef0725U)), ((u64)(0x02f6dae3a4172d80U)), ((u64)(0x9773361e7f259f51U)), ((u64)(0x025f1582e9ac2466U)), ((u64)(0x8beb89ca6508fee8U)), ((u64)(0x03cb559e42ad070aU)), ((u64)(0x6fefa16eb73a6586U)), ((u64)(0x0309114b688a6c08U)), ((u64)(0xf3261abef8fb846bU)), ((u64)(0x026da76f86d52339U)), ((u64)(0x51d691318e5f3a45U)), ((u64)(0x03e2a57f3e21d1f6U)), ((u64)(0x0e4540f471e5c837U)), ((u64)(0x031bb798fe8174c5U)), ((u64)(0xd8376729f4b7d360U)), ((u64)(0x027c92e0cb9ac3d0U)), ((u64)(0xf38bd84321261effU)), ((u64)(0x03fa849adf5e061aU)), ((u64)(0x293cad0280eb4bffU)), ((u64)(0x032ed07be5e4d1afU)), ((u64)(0xedca240200bc3cccU)), ((u64)(0x028bd9fcb7ea4158U)), ((u64)(0xbe3b50019a3030a4U)), ((u64)(0x02097b309321cde0U)), ((u64)(0xc9f88002904d1a9fU)), ((u64)(0x03425eb41e9c7c9aU)), ((u64)(0x3b2d3335403daee6U)), ((u64)(0x029b7ef67ee396e2U)), ((u64)(0x95bdc291003158b8U)), ((u64)(0x0215ff2b98b6124eU)), ((u64)(0x892f9db4cd1bc126U)), ((u64)(0x035665128df01d4aU)), ((u64)(0x07594af70a7c9a85U)), ((u64)(0x02ab840ed7f34aa2U)), ((u64)(0x6c476f2c0863aed1U)), ((u64)(0x0222d00bdff5d54eU)), ((u64)(0x13a57eacda3917b4U)), ((u64)(0x036ae67966562217U)), ((u64)(0x0fb7988a482dac90U)), ((u64)(0x02bbeb9451de81acU)), ((u64)(0xd95fad3b6cf156daU)), ((u64)(0x022fefa9db1867bcU)), ((u64)(0xf565e1f8ae4ef15cU)), ((u64)(0x037fe5dc91c0a5faU)), ((u64)(0x911e4e608b725ab0U)), ((u64)(0x02ccb7e3a7cd5195U)), ((u64)(0xda7ea51a0928488dU)), ((u64)(0x023d5fe9530aa7aaU)), ((u64)(0xf7310829a8407415U)), ((u64)(0x039566421e7772aaU)), ((u64)(0x2c2739baed005cdeU)), ((u64)(0x02ddeb68185f8eefU)), ((u64)(0xbcec2e2f24004a4bU)), ((u64)(0x024b22b9ad193f25U)), ((u64)(0x94ad16b1d333aa11U)), ((u64)(0x03ab6ac2ae8ecb6fU)), ((u64)(0xaa241227dc2954dbU)), ((u64)(0x02ef889bbed8a2bfU)), ((u64)(0x54e9a81fe35443e2U)), ((u64)(0x02593a163246e899U)), ((u64)(0x2175d9cc9eed396aU)), ((u64)(0x03c1f689ea0b0dc2U)), ((u64)(0xe7917b0a18bdc788U)), ((u64)(0x03019207ee6f3e34U)), ((u64)(0xb9412f3b46fe393aU)), ((u64)(0x0267a8065858fe90U)), ((u64)(0xf535185ed7fd285cU)), ((u64)(0x03d90cd6f3c1974dU)), ((u64)(0xc42a79e57997537dU)), ((u64)(0x03140a458fce12a4U)), ((u64)(0x03552e512e12a931U)), ((u64)(0x02766e9e0ca4dbb7U)), ((u64)(0x9eeeb081e3510eb4U)), ((u64)(0x03f0b0fce107c5f1U)), ((u64)(0x4bf226ce4f740bc3U)), ((u64)(0x0326f3fd80d304c1U)), ((u64)(0xa3281f0b72c33c9cU)), ((u64)(0x02858ffe00a8d09aU)), ((u64)(0x1c2018d5f568fd4aU)), ((u64)(0x020473319a20a6e2U)), ((u64)(0xf9ccf48988a7fba9U)), ((u64)(0x033a51e8f69aa49cU)), ((u64)(0xfb0a5d3ad3b99621U)), ((u64)(0x02950e53f87bb6e3U)), ((u64)(0x2f3b7dc8a96144e7U)), ((u64)(0x0210d8432d2fc583U)), ((u64)(0xe52bfc7442353b0cU)), ((u64)(0x034e26d1e1e608d1U)), ((u64)(0xb756639034f76270U)), ((u64)(0x02a4ebdb1b1e6d74U)), ((u64)(0x2c451c735d92b526U)), ((u64)(0x021d897c15b1f12aU)), ((u64)(0x13a1c71efc1deea3U)), ((u64)(0x0362759355e981ddU)), ((u64)(0x761b05b2634b2550U)), ((u64)(0x02b52adc44bace4aU)), ((u64)(0x91af37c1e908eaa6U)), ((u64)(0x022a88b036fbd83bU)), ((u64)(0x82b1f2cfdb417770U)), ((u64)(0x03774119f192f392U)), ((u64)(0xcef4c23fe29ac5f3U)), ((u64)(0x02c5cdae5adbf60eU)), ((u64)(0x3f2a34ffe87bd190U)), ((u64)(0x0237d7beaf165e72U)), ((u64)(0x984387ffda5fb5b2U)), ((u64)(0x038c8c644b56fd83U)), ((u64)(0xe0360666484c915bU)), ((u64)(0x02d6d6b6a2abfe02U)), ((u64)(0x802b3851d3707449U)), ((u64)(0x024578921bbccb35U)), ((u64)(0x99dec082ebe72075U)), ((u64)(0x03a25a835f947855U)), ((u64)(0xae4bcd358985b391U)), ((u64)(0x02e8486919439377U)), ((u64)(0xbea30a913ad15c74U)), ((u64)(0x02536d20e102dc5fU)), ((u64)(0xfdd1aa81f7b560b9U)), ((u64)(0x03b8ae9b019e2d65U)), ((u64)(0x97daeece5fc44d61U)), ((u64)(0x02fa2548ce182451U)), ((u64)(0xdfe258a51969d781U)), ((u64)(0x0261b76d71ace9daU)), ((u64)(0x996a276e8f0fbf34U)), ((u64)(0x03cf8be24f7b0fc4U)), ((u64)(0xe121b9253f3fcc2aU)), ((u64)(0x030c6fe83f95a636U)), ((u64)(0xb41afa8432997022U)), ((u64)(0x02705986994484f8U)), ((u64)(0xecf7f739ea8f19cfU)), ((u64)(0x03e6f5a4286da18dU)), ((u64)(0x23f99294bba5ae40U)), ((u64)(0x031f2ae9b9f14e0bU)), ((u64)(0x4ffadbaa2fb7be99U)), ((u64)(0x027f5587c7f43e6fU)), ((u64)(0x7ff7c5dd1925fdc2U)), ((u64)(0x03feef3fa6539718U)), ((u64)(0xccc637e4141e649bU)), ((u64)(0x033258ffb842df46U)), ((u64)(0xd704f983434b83afU)), ((u64)(0x028ead9960357f6bU)), ((u64)(0x126a6135cf6f9c8cU)), ((u64)(0x020bbe144cf79923U)), ((u64)(0x83dd685618b29414U)), ((u64)(0x0345fced47f28e9eU)), ((u64)(0x9cb12044e08edcddU)), ((u64)(0x029e63f1065ba54bU)), ((u64)(0x16f419d0b3a57d7dU)), ((u64)(0x02184ff405161dd6U)), ((u64)(0x8b20294dec3bfbfbU)), ((u64)(0x035a19866e89c956U)), ((u64)(0x3c19baa4bcfcc996U)), ((u64)(0x02ae7ad1f207d445U)), ((u64)(0xc9ae2eea30ca3adfU)), ((u64)(0x02252f0e5b39769dU)), ((u64)(0x0f7d17dd1add2afdU)), ((u64)(0x036eb1b091f58a96U)), ((u64)(0x3f97464a7be42264U)), ((u64)(0x02bef48d41913babU)), ((u64)(0xcc790508631ce850U)), ((u64)(0x02325d3dce0dc955U)), ((u64)(0xe0c1a1a704fb0d4dU)), ((u64)(0x0383c862e3494222U)), ((u64)(0x4d67b4859d95a43eU)), ((u64)(0x02cfd3824f6dce82U)), ((u64)(0x711fc39e17aae9cbU)), ((u64)(0x023fdc683f8b0b9bU)), ((u64)(0xe832d2968c44a945U)), ((u64)(0x039960a6cc11ac2bU)), ((u64)(0xecf575453d03ba9eU)), ((u64)(0x02e11a1f09a7bcefU)), ((u64)(0x572ac4376402fbb1U)), ((u64)(0x024dae7f3aec9726U)), ((u64)(0x58446d256cd192b5U)), ((u64)(0x03af7d985e47583dU)), ((u64)(0x79d0575123dadbc4U)), ((u64)(0x02f2cae04b6c4697U)), ((u64)(0x94a6ac40e97be303U)), ((u64)(0x025bd5803c569edfU)), ((u64)(0x8771139b0f2c9e6cU)), ((u64)(0x03c62266c6f0fe32U)), ((u64)(0x9f8da948d8f07ebdU)), ((u64)(0x0304e85238c0cb5bU)), ((u64)(0xe60aedd3e0c06564U)), ((u64)(0x026a5374fa33d5e2U)), ((u64)(0xa344afb9679a3bd2U)), ((u64)(0x03dd5254c3862304U)), ((u64)(0xe903bfc78614fca8U)), ((u64)(0x031775109c6b4f36U)), ((u64)(0xba6966393810ca20U)), ((u64)(0x02792a73b055d8f8U)), ((u64)(0x2a423d2859b4769aU)), ((u64)(0x03f510b91a22f4c1U)), ((u64)(0xee9b642047c39215U)), ((u64)(0x032a73c7481bf700U)), ((u64)(0xbee2b680396941aaU)), ((u64)(0x02885c9f6ce32c00U)), ((u64)(0xff1bc53361210155U)), ((u64)(0x0206b07f8a4f5666U)), ((u64)(0x31c6085235019bbbU)), ((u64)(0x033de73276e5570bU)), ((u64)(0x27d1a041c4014963U)), ((u64)(0x0297ec285f1ddf3cU)), ((u64)(0xeca7b367d0010782U)), ((u64)(0x021323537f4b18fcU)), ((u64)(0xadd91f0c8001a59dU)), ((u64)(0x0351d21f3211c194U)), ((u64)(0xf17a7f3d3334847eU)), ((u64)(0x02a7db4c280e3476U)), ((u64)(0x279532975c2a0398U)), ((u64)(0x021fe2a3533e905fU)), ((u64)(0xd8eeb75893766c26U)), ((u64)(0x0366376bb8641a31U)), ((u64)(0x7a5892ad42c52352U)), ((u64)(0x02b82c562d1ce1c1U)), ((u64)(0xfb7a0ef102374f75U)), ((u64)(0x022cf044f0e3e7cdU)), ((u64)(0xc59017e8038bb254U)), ((u64)(0x037b1a07e7d30c7cU)), ((u64)(0x37a67986693c8eaaU)), ((u64)(0x02c8e19feca8d6caU)), ((u64)(0xf951fad1edca0bbbU)), ((u64)(0x023a4e198a20abd4U)), ((u64)(0x28832ae97c76792bU)), ((u64)(0x03907cf5a9cddfbbU)), ((u64)(0x2068ef21305ec756U)), ((u64)(0x02d9fd9154a4b2fcU)), ((u64)(0x19ed8c1a8d189f78U)), ((u64)(0x0247fe0ddd508f30U)), ((u64)(0x5caf4690e1c0ff26U)), ((u64)(0x03a66349621a7eb3U)), ((u64)(0x4a25d20d81673285U)), ((u64)(0x02eb82a11b48655cU)), ((u64)(0x3b5174d79ab8f537U)), ((u64)(0x0256021a7c39eab0U)), ((u64)(0x921bee25c45b21f1U)), ((u64)(0x03bcd02a605caab3U)), ((u64)(0xdb498b5169e2818eU)), ((u64)(0x02fd735519e3bbc2U)), ((u64)(0x15d46f7454b53472U)), ((u64)(0x02645c4414b62fcfU)), ((u64)(0xefba4bed545520b6U)), ((u64)(0x03d3c6d35456b2e4U)), ((u64)(0xf2fb6ff110441a2bU)), ((u64)(0x030fd242a9def583U)), ((u64)(0x8f2f8cc0d9d014efU)), ((u64)(0x02730e9bbb18c469U)), ((u64)(0xb1e5ae015c80217fU)), ((u64)(0x03eb4a92c4f46d75U)), ((u64)(0xc1848b344a001accU)), ((u64)(0x0322a20f03f6bdf7U)), ((u64)(0xce03a2903b3348a3U)), ((u64)(0x02821b3f365efe5fU)), ((u64)(0xd802e873628f6d4fU)), ((u64)(0x0201af65c518cb7fU)), ((u64)(0x599e40b89db2487fU)), ((u64)(0x0335e56fa1c14599U)), ((u64)(0xe14b66fa17c1d399U)), ((u64)(0x029184594e3437adU)), ((u64)(0x81091f2e7967dc7aU)), ((u64)(0x020e037aa4f692f1U)), ((u64)(0x9b41cb7d8f0c93f6U)), ((u64)(0x03499f2aa18a84b5U)), ((u64)(0xaf67d5fe0c0a0ff8U)), ((u64)(0x02a14c221ad536f7U)), ((u64)(0xf2b977fe70080cc7U)), ((u64)(0x021aa34e7bddc592U)), ((u64)(0x1df58cca4cd9ae0bU)), ((u64)(0x035dd2172c9608ebU)), ((u64)(0xe4c470a1d7148b3cU)), ((u64)(0x02b174df56de6d88U)), ((u64)(0x83d05a1b1276d5caU)), ((u64)(0x022790b2abe5246dU)), ((u64)(0x9fb3c35e83f1560fU)), ((u64)(0x0372811ddfd50715U)), ((u64)(0xb2f635e5365aab3fU)), ((u64)(0x02c200e4b310d277U)), ((u64)(0xf591c4b75eaeef66U)), ((u64)(0x0234cd83c273db92U)), ((u64)(0xef4fa125644b18a3U)), ((u64)(0x0387af39371fc5b7U)), ((u64)(0x8c3fb41de9d5ad4fU)), ((u64)(0x02d2f2942c196af9U)), ((u64)(0x3cffc34b2177bdd9U)), ((u64)(0x02425ba9bce12261U)), ((u64)(0x94cc6bab68bf9628U)), ((u64)(0x039d5f75fb01d09bU)), ((u64)(0x10a38955ed6611b9U)), ((u64)(0x02e44c5e6267da16U)), ((u64)(0xda1c6dde5784dafbU)), ((u64)(0x02503d184eb97b44U)), ((u64)(0xf693e2fd58d49191U)), ((u64)(0x03b394f3b128c53aU)), ((u64)(0xc5431bfde0aa0e0eU)), ((u64)(0x02f610c2f4209dc8U)), ((u64)(0x6a9c1664b3bb3e72U)), ((u64)(0x025e73cf29b3b16dU)), ((u64)(0x10f9bd6dec5eca4fU)), ((u64)(0x03ca52e50f85e8afU)), ((u64)(0xda616457f04bd50cU)), ((u64)(0x03084250d937ed58U)), ((u64)(0xe1e783798d09773dU)), ((u64)(0x026d01da475ff113U)), ((u64)(0x030c058f480f252eU)), ((u64)(0x03e19c9072331b53U)), ((u64)(0x68d66ad906728425U)), ((u64)(0x031ae3a6c1c27c42U)), ((u64)(0x8711ef14052869b7U)), ((u64)(0x027be952349b969bU)), ((u64)(0x0b4fe4ecd50d75f2U)), ((u64)(0x03f97550542c242cU)), ((u64)(0xa2a650bd773df7f5U)), ((u64)(0x032df7737689b689U)), ((u64)(0xb551da312c31932aU)), ((u64)(0x028b2c5c5ed49207U)), ((u64)(0x5ddb14f4235adc22U)), ((u64)(0x0208f049e576db39U)), ((u64)(0x2fc4ee536bc49369U)), ((u64)(0x034180763bf15ec2U)), ((u64)(0xbfd0bea92303a921U)), ((u64)(0x029acd2b63277f01U)), ((u64)(0x9973cbba8269541aU)), ((u64)(0x021570ef8285ff34U)), ((u64)(0x5bec792a6a42202aU)), ((u64)(0x0355817f373ccb87U)), ((u64)(0xe3239421ee9b4cefU)), ((u64)(0x02aacdff5f63d605U)), ((u64)(0xb5b6101b25490a59U)), ((u64)(0x02223e65e5e97804U)), ((u64)(0x22bce691d541aa27U)), ((u64)(0x0369fd6fd64259a1U)), ((u64)(0xb563eba7ddce21b9U)), ((u64)(0x02bb31264501e14dU)), ((u64)(0xf78322ecb171b494U)), ((u64)(0x022f5a850401810aU)), ((u64)(0x259e9e47824f8753U)), ((u64)(0x037ef73b399c01abU)), ((u64)(0x1e187e9f9b72d2a9U)), ((u64)(0x02cbf8fc2e1667bcU)), ((u64)(0x4b46cbb2e2c24221U)), ((u64)(0x023cc73024deb963U)), ((u64)(0x120adf849e039d01U)), ((u64)(0x039471e6a1645bd2U)), ((u64)(0xdb3be603b19c7d9aU)), ((u64)(0x02dd27ebb4504974U)), ((u64)(0x7c2feb3627b0647cU)), ((u64)(0x024a865629d9d45dU)), ((u64)(0x2d197856a5e7072cU)), ((u64)(0x03aa7089dc8fba2fU)), ((u64)(0x8a7ac6abb7ec05bdU)), ((u64)(0x02eec06e4a0c94f2U)), ((u64)(0xd52f05562cbcd164U)), ((u64)(0x025899f1d4d6dd8eU)), ((u64)(0x21e4d556adfae8a0U)), ((u64)(0x03c0f64fbaf1627eU)), ((u64)(0xe7ea444557fbed4dU)), ((u64)(0x0300c50c958de864U)), ((u64)(0xecbb69d1132ff10aU)), ((u64)(0x0267040a113e5383U)), ((u64)(0xadf8a94e851981aaU)), ((u64)(0x03d8067681fd526cU)), ((u64)(0x8b2d543ed0e13488U)), ((u64)(0x0313385ece6441f0U)), ((u64)(0xd5bddcff0d80f6d3U)), ((u64)(0x0275c6b23eb69b26U)), ((u64)(0x892fc7fe7c018aebU)), ((u64)(0x03efa45064575ea4U)), ((u64)(0x3a8c9ffec99ad589U)), ((u64)(0x03261d0d1d12b21dU)), ((u64)(0xc8707fff07af113bU)), ((u64)(0x0284e40a7da88e7dU)), ((u64)(0x39f39998d2f2742fU)), ((u64)(0x0203e9a1fe2071feU)), ((u64)(0x8fec28f484b7204bU)), ((u64)(0x033975cffd00b663U)), ((u64)(0xd989ba5d36f8e6a2U)), ((u64)(0x02945e3ffd9a2b82U)), ((u64)(0x47a161e42bfa521cU)), ((u64)(0x02104b66647b5602U)), ((u64)(0x0c35696d132a1cf9U)), ((u64)(0x034d4570a0c5566aU)), ((u64)(0x09c454574288172dU)), ((u64)(0x02a4378d4d6aab88U)), ((u64)(0xa169dd129ba0128bU)), ((u64)(0x021cf93dd7888939U)), ((u64)(0x0242fb50f9001dabU)), ((u64)(0x03618ec958da7529U)), ((u64)(0x9b68c90d940017bcU)), ((u64)(0x02b4723aad7b90edU)), ((u64)(0x4920a0d7a999ac96U)), ((u64)(0x0229f4fbbdfc73f1U)), ((u64)(0x750101590f5c4757U)), ((u64)(0x037654c5fcc71fe8U)), ((u64)(0x2a6734473f7d05dfU)), ((u64)(0x02c5109e63d27fedU)), ((u64)(0xeeb8f69f65fd9e4cU)), ((u64)(0x0237407eb641fff0U)), ((u64)(0xe45b24323cc8fd46U)), ((u64)(0x038b9a6456cfffe7U)), ((u64)(0xb6af502830a0ca9fU)), ((u64)(0x02d6151d123fffecU)), ((u64)(0xf88c402026e7087fU)), ((u64)(0x0244ddb0db666656U)), ((u64)(0x2746cd003e3e73feU)), ((u64)(0x03a162b4923d708bU)), ((u64)(0x1f6bd73364fec332U)), ((u64)(0x02e7822a0e978d3cU)), ((u64)(0xe5efdf5c50cbcf5bU)), ((u64)(0x0252ce880bac70fcU)), ((u64)(0x3cb2fefa1adfb22bU)), ((u64)(0x03b7b0d9ac471b2eU)), ((u64)(0x308f3261af195b56U)), ((u64)(0x02f95a47bd05af58U)), ((u64)(0x5a0c284e25ade2abU)), ((u64)(0x0261150630d15913U)), ((u64)(0x29ad0d49d5e30445U)), ((u64)(0x03ce8809e7b55b52U)), ((u64)(0x548a7107de4f369dU)), ((u64)(0x030ba007ec9115dbU)), ((u64)(0xdd3b8d9fe50c2bb1U)), ((u64)(0x026fb3398a0dab15U)), ((u64)(0x952c15cca1ad12b5U)), ((u64)(0x03e5eb8f434911bcU)), ((u64)(0x775677d6e7bda891U)), ((u64)(0x031e560c35d40e30U)), ((u64)(0xc5dec645863153a7U)), ((u64)(0x027eab3cf7dcd826U))}; // fixed array const i64 total_m = ((i64)(0)); // global4 int g_main_argc = ((int)(0)); // global4 voidptr g_main_argv = ((void*)0); // global4 Array_VCastTypeIndexName as_cast_type_indexes; // global4 const f64 _const_max_load_factor = 0.8; // precomputed2 const u32 _const_hash_mask = 16777215; // precomputed2 const u32 _const_probe_inc = 16777216; // precomputed2 IError _const_none__; // inited later VMemoryBlock* g_memory_block; // global4 Array_string _const_v__token__orm_custom_operators; // inited later Array_v__token__Kind _const_v__token__assign_tokens; // inited later Array_string _const_v__token__valid_at_tokens; // inited later Array_string _const_v__token__token_str; // inited later Array_v__token__Precedence _const_v__token__precedences; // inited later Array_string _const_time__tokens_2; // inited later Array_string _const_time__tokens_3; // inited later Array_string _const_time__tokens_4; // inited later Array_string _const_time__long_days; // inited later Array_int _const_time__month_days; // inited later Array_string _const_time__long_months; // inited later i64 _const_time__absolute_zero_year; // inited later Array_int _const_time__days_before; // inited later time__Duration _const_time__nanosecond; // inited later time__Duration _const_time__infinite; // inited later const u64 _const_hash__wyp0 = 11562461410679940143U; // precomputed2 const u64 _const_hash__wyp1 = 16646288086500911323U; // precomputed2 const u64 _const_hash__wyp2 = 10285213230658275043U; // precomputed2 const u64 _const_hash__wyp3 = 6384245875588680899U; // precomputed2 const u64 _const_hash__wyp4 = 2129725606500045391U; // precomputed2 const u64 _const_rand__constants__lower_mask = 4294967295U; // precomputed2 const u32 _const_rand__constants__max_u32 = 4294967295; // precomputed2 const u64 _const_rand__constants__max_u64 = 18446744073709551615U; // precomputed2 const u32 _const_rand__constants__u31_mask = 2147483647; // precomputed2 const u64 _const_rand__constants__u63_mask = 9223372036854775807U; // precomputed2 u32 _const_rand__constants__ieee754_mantissa_f32_mask; // inited later const u64 _const_rand__constants__ieee754_mantissa_f64_mask = 4503599627370495U; // precomputed2 f64 _const_rand__constants__reciprocal_2_23rd; // inited later f64 _const_rand__constants__reciprocal_2_52nd; // inited later const u64 _const_hash__fnv1a__fnv64_prime = 1099511628211U; // precomputed2 const u64 _const_hash__fnv1a__fnv64_offset_basis = 14695981039346656037U; // precomputed2 const u32 _const_hash__fnv1a__fnv32_offset_basis = 2166136261; // precomputed2 const u32 _const_hash__fnv1a__fnv32_prime = 16777619; // precomputed2 int _const_os__o_rdonly; // inited later int _const_os__o_wronly; // inited later int _const_os__o_rdwr; // inited later int _const_os__o_create; // inited later int _const_os__o_excl; // inited later int _const_os__o_noctty; // inited later int _const_os__o_trunc; // inited later int _const_os__o_append; // inited later int _const_os__o_nonblock; // inited later int _const_os__o_sync; // inited later const rune _const_os__fslash = '/'; // precomputed2 const rune _const_os__dot = '.'; // precomputed2 const rune _const_os__qmark = '?'; // precomputed2 Array_string _const_os__args; // inited later string _const_os__wd_at_startup; // inited later Array_string _const_os__executable_suffixes; // inited later Array_string _const_v__vmod__mod_file_stop_paths; // inited later v__vmod__ModFileCacher* _const_v__vmod__private_file_cacher; // inited later const u64 _const_rand__wyrand__wyp0 = 11562461410679940143U; // precomputed2 const u64 _const_rand__wyrand__wyp1 = 16646288086500911323U; // precomputed2 Array_string _const_v__pkgconfig__default_paths; // inited later const f64 _const_rand__sqrt2 = 1.4142135623730951; // precomputed2 Array_rune _const_rand__clock_seq_hi_and_reserved_valid_values; // inited later rand__PRNG* default_rng; // global4 Array_string _const_v__pref__list_of_flags_with_param; // inited later Array_string _const_v__pref__supported_test_runners; // inited later v__util__EManager* _const_v__util__emanager; // inited later string _const_v__util__normalised_workdir; // inited later bool _const_v__util__verror_paths_absolute; // inited later v__util__LinesCache* lines_cache; // global4 Array_u8 _const_v__util__invalid_escapes; // inited later v__util__Timers* g_timers; // global4 Array_string _const_v__util__builtin_module_parts; // inited later Array_string _const_v__util__bundle_modules; // inited later Map_string_Array_string _const_v__util__external_module_dependencies_for_tool; // inited later Array_string _const_v__util__const_tabs; // inited later int _const_v__util__nr_jobs; // inited later voidptr _const_sync__pool__no_result; // inited later v__ast__Expr _const_v__ast__empty_expr; // inited later v__ast__Stmt _const_v__ast__empty_stmt; // inited later v__ast__Node _const_v__ast__empty_node; // inited later Map_int_Array_string _const_v__ast__x86_no_number_register_list; // inited later Map_int_Map_string_int _const_v__ast__x86_with_number_register_list; // inited later Array_string _const_v__ast__arm_no_number_register_list; // inited later Map_string_int _const_v__ast__arm_with_number_register_list; // inited later Array_string _const_v__ast__riscv_no_number_register_list; // inited later Map_string_int _const_v__ast__riscv_with_number_register_list; // inited later Array_string _const_v__ast__valid_comptime_if_os; // inited later Array_string _const_v__ast__valid_comptime_if_compilers; // inited later Array_string _const_v__ast__valid_comptime_if_platforms; // inited later Array_string _const_v__ast__valid_comptime_if_cpu_features; // inited later Array_string _const_v__ast__valid_comptime_if_other; // inited later Array_string _const_v__ast__valid_comptime_compression_types; // inited later Array_string _const_v__ast__native_builtins; // inited later v__ast__Table* global_table; // global4 Array_string _const_v__ast__builtin_type_names; // inited later v__ast__Type _const_v__ast__ovoid_type; // inited later v__ast__Type _const_v__ast__rvoid_type; // inited later IError _const_v__gen__c__unsupported_ctemp_assert_transform; // inited later Array_string _const_v__gen__c__c_reserved; // inited later Array_string _const_v__gen__c__cmp_str; // inited later Array_string _const_v__gen__c__cmp_rev; // inited later Array_string _const_v__gen__c__skip_struct_init; // inited later const rune _const_v__scanner__num_sep = '_'; // precomputed2 int _const_v__checker__int_min; // inited later const int _const_v__checker__int_max = 2147483647; // precomputed2 Array_string _const_v__checker__array_builtin_methods; // inited later Array_string _const_v__checker__reserved_type_names; // inited later Map_rune_v__checker__LoHiLimit _const_v__checker__iencoding_map; // inited later Array_string _const_v__parser__supported_comptime_calls; // inited later Array_string _const_v__parser__comptime_types; // inited later Array_v__ast__File_ptr codegen_files; // global4 string _const_v__parser__normalised_working_folder; // inited later Array_v__token__Kind _const_v__parser__valid_tokens_inside_types; // inited later v__builder__RegKey _const_v__builder__hkey_local_machine; // inited later string _const_v__builder__cbuilder__cc_compiler; // inited later string _const_v__builder__cbuilder__cc_ldflags; // inited later string _const_v__builder__cbuilder__cc_cflags; // inited later Array_string _const_main__external_tools; // inited later Array_string _const_main__list_of_flags_that_allow_duplicates; // inited later u32 _const_children_bytes; // inited later Map_string_v__token__Kind _const_v__token__keywords; // inited later time__Duration _const_time__microsecond; // inited later Array_int _const_semver__versions; // inited later string _const_v__pref__default_module_path; // inited later Array_string _const_v__ast__valid_comptime_not_user_defined; // inited later v__ast__TypeSymbol* _const_v__ast__invalid_type_symbol; // inited later v__token__KeywordsMatcherTrie _const_v__ast__builtin_type_names_matcher; // inited later Array_int _const_v__ast__integer_type_idxs; // inited later Array_int _const_v__ast__signed_integer_type_idxs; // inited later Array_int _const_v__ast__unsigned_integer_type_idxs; // inited later Array_int _const_v__ast__int_promoted_type_idxs; // inited later Array_int _const_v__ast__float_type_idxs; // inited later Array_int _const_v__ast__number_type_idxs; // inited later Array_int _const_v__ast__pointer_type_idxs; // inited later v__ast__Type _const_v__ast__void_type; // inited later v__ast__Type _const_v__ast__voidptr_type; // inited later v__ast__Type _const_v__ast__byteptr_type; // inited later v__ast__Type _const_v__ast__charptr_type; // inited later v__ast__Type _const_v__ast__i8_type; // inited later v__ast__Type _const_v__ast__int_type; // inited later v__ast__Type _const_v__ast__i16_type; // inited later v__ast__Type _const_v__ast__i64_type; // inited later v__ast__Type _const_v__ast__isize_type; // inited later v__ast__Type _const_v__ast__u8_type; // inited later v__ast__Type _const_v__ast__u16_type; // inited later v__ast__Type _const_v__ast__u32_type; // inited later v__ast__Type _const_v__ast__u64_type; // inited later v__ast__Type _const_v__ast__usize_type; // inited later v__ast__Type _const_v__ast__f32_type; // inited later v__ast__Type _const_v__ast__f64_type; // inited later v__ast__Type _const_v__ast__char_type; // inited later v__ast__Type _const_v__ast__bool_type; // inited later v__ast__Type _const_v__ast__none_type; // inited later v__ast__Type _const_v__ast__string_type; // inited later v__ast__Type _const_v__ast__rune_type; // inited later v__ast__Type _const_v__ast__array_type; // inited later v__ast__Type _const_v__ast__map_type; // inited later v__ast__Type _const_v__ast__chan_type; // inited later v__ast__Type _const_v__ast__any_type; // inited later v__ast__Type _const_v__ast__float_literal_type; // inited later v__ast__Type _const_v__ast__int_literal_type; // inited later v__ast__Type _const_v__ast__thread_type; // inited later v__ast__Type _const_v__ast__error_type; // inited later v__ast__Type _const_v__ast__nil_type; // inited later v__token__KeywordsMatcherTrie _const_v__gen__c__c_reserved_chk; // inited later Array_string _const_v__gen__c__builtins; // inited later v__token__KeywordsMatcherTrie _const_v__checker__array_builtin_methods_chk; // inited later v__token__KeywordsMatcherTrie _const_v__checker__reserved_type_names_chk; // inited later v__token__KeywordsMatcherTrie _const_v__token__scanner_matcher; // inited later time__Duration _const_time__millisecond; // inited later Array_v__ast__Type _const_v__ast__charptr_types; // inited later Array_v__ast__Type _const_v__ast__byteptr_types; // inited later Array_v__ast__Type _const_v__ast__voidptr_types; // inited later time__Duration _const_time__second; // inited later Array_v__ast__Type _const_v__ast__cptr_types; // inited later time__Duration _const_time__minute; // inited later time__Duration _const_time__hour; // inited later // V interface table: static IError I_None___to_Interface_IError(None__* x); const int _IError_None___index = 0; static IError I_voidptr_to_Interface_IError(voidptr* x); const int _IError_voidptr_index = 1; static IError I_Error_to_Interface_IError(Error* x); const int _IError_Error_index = 2; static IError I_MessageError_to_Interface_IError(MessageError* x); const int _IError_MessageError_index = 3; static IError I_time__TimeParseError_to_Interface_IError(time__TimeParseError* x); const int _IError_time__TimeParseError_index = 4; static IError I_flag__UnknownFlagError_to_Interface_IError(flag__UnknownFlagError* x); const int _IError_flag__UnknownFlagError_index = 5; static IError I_flag__ArgsCountError_to_Interface_IError(flag__ArgsCountError* x); const int _IError_flag__ArgsCountError_index = 6; static IError I_semver__InvalidComparatorFormatError_to_Interface_IError(semver__InvalidComparatorFormatError* x); const int _IError_semver__InvalidComparatorFormatError_index = 7; static IError I_semver__EmptyInputError_to_Interface_IError(semver__EmptyInputError* x); const int _IError_semver__EmptyInputError_index = 8; static IError I_semver__InvalidVersionFormatError_to_Interface_IError(semver__InvalidVersionFormatError* x); const int _IError_semver__InvalidVersionFormatError_index = 9; static IError I_os__Eof_to_Interface_IError(os__Eof* x); const int _IError_os__Eof_index = 10; static IError I_os__NotExpected_to_Interface_IError(os__NotExpected* x); const int _IError_os__NotExpected_index = 11; static IError I_os__FileNotOpenedError_to_Interface_IError(os__FileNotOpenedError* x); const int _IError_os__FileNotOpenedError_index = 12; static IError I_os__SizeOfTypeIs0Error_to_Interface_IError(os__SizeOfTypeIs0Error* x); const int _IError_os__SizeOfTypeIs0Error_index = 13; static IError I_os__ExecutableNotFoundError_to_Interface_IError(os__ExecutableNotFoundError* x); const int _IError_os__ExecutableNotFoundError_index = 14; static IError I_v__gen__c__UnsupportedAssertCtempTransform_to_Interface_IError(v__gen__c__UnsupportedAssertCtempTransform* x); const int _IError_v__gen__c__UnsupportedAssertCtempTransform_index = 15; // ^^^ number of types for interface IError: 16 // Methods wrapper for interface "IError" static inline string None___msg_Interface_IError_method_wrapper(None__* err) { return Error_msg(err->Error); } static inline int None___code_Interface_IError_method_wrapper(None__* err) { return Error_code(err->Error); } static inline string Error_msg_Interface_IError_method_wrapper(Error* err) { return Error_msg(*err); } static inline int Error_code_Interface_IError_method_wrapper(Error* err) { return Error_code(*err); } static inline string MessageError_msg_Interface_IError_method_wrapper(MessageError* err) { return MessageError_msg(*err); } static inline int MessageError_code_Interface_IError_method_wrapper(MessageError* err) { return MessageError_code(*err); } static inline string time__TimeParseError_msg_Interface_IError_method_wrapper(time__TimeParseError* err) { return time__TimeParseError_msg(*err); } static inline int time__TimeParseError_code_Interface_IError_method_wrapper(time__TimeParseError* err) { return Error_code(err->Error); } static inline string flag__UnknownFlagError_msg_Interface_IError_method_wrapper(flag__UnknownFlagError* err) { return flag__UnknownFlagError_msg(*err); } static inline int flag__UnknownFlagError_code_Interface_IError_method_wrapper(flag__UnknownFlagError* err) { return Error_code(err->Error); } static inline string flag__ArgsCountError_msg_Interface_IError_method_wrapper(flag__ArgsCountError* err) { return flag__ArgsCountError_msg(*err); } static inline int flag__ArgsCountError_code_Interface_IError_method_wrapper(flag__ArgsCountError* err) { return Error_code(err->Error); } static inline string semver__InvalidComparatorFormatError_msg_Interface_IError_method_wrapper(semver__InvalidComparatorFormatError* err) { return MessageError_msg(err->MessageError); } static inline int semver__InvalidComparatorFormatError_code_Interface_IError_method_wrapper(semver__InvalidComparatorFormatError* err) { return MessageError_code(err->MessageError); } static inline string semver__EmptyInputError_msg_Interface_IError_method_wrapper(semver__EmptyInputError* err) { return semver__EmptyInputError_msg(*err); } static inline int semver__EmptyInputError_code_Interface_IError_method_wrapper(semver__EmptyInputError* err) { return Error_code(err->Error); } static inline string semver__InvalidVersionFormatError_msg_Interface_IError_method_wrapper(semver__InvalidVersionFormatError* err) { return semver__InvalidVersionFormatError_msg(*err); } static inline int semver__InvalidVersionFormatError_code_Interface_IError_method_wrapper(semver__InvalidVersionFormatError* err) { return Error_code(err->Error); } static inline string os__Eof_msg_Interface_IError_method_wrapper(os__Eof* err) { return Error_msg(err->Error); } static inline int os__Eof_code_Interface_IError_method_wrapper(os__Eof* err) { return Error_code(err->Error); } static inline string os__NotExpected_msg_Interface_IError_method_wrapper(os__NotExpected* err) { return os__NotExpected_msg(*err); } static inline int os__NotExpected_code_Interface_IError_method_wrapper(os__NotExpected* err) { return os__NotExpected_code(*err); } static inline string os__FileNotOpenedError_msg_Interface_IError_method_wrapper(os__FileNotOpenedError* err) { return os__FileNotOpenedError_msg(*err); } static inline int os__FileNotOpenedError_code_Interface_IError_method_wrapper(os__FileNotOpenedError* err) { return Error_code(err->Error); } static inline string os__SizeOfTypeIs0Error_msg_Interface_IError_method_wrapper(os__SizeOfTypeIs0Error* err) { return os__SizeOfTypeIs0Error_msg(*err); } static inline int os__SizeOfTypeIs0Error_code_Interface_IError_method_wrapper(os__SizeOfTypeIs0Error* err) { return Error_code(err->Error); } static inline string os__ExecutableNotFoundError_msg_Interface_IError_method_wrapper(os__ExecutableNotFoundError* err) { return os__ExecutableNotFoundError_msg(*err); } static inline int os__ExecutableNotFoundError_code_Interface_IError_method_wrapper(os__ExecutableNotFoundError* err) { return Error_code(err->Error); } static inline string v__gen__c__UnsupportedAssertCtempTransform_msg_Interface_IError_method_wrapper(v__gen__c__UnsupportedAssertCtempTransform* err) { return Error_msg(err->Error); } static inline int v__gen__c__UnsupportedAssertCtempTransform_code_Interface_IError_method_wrapper(v__gen__c__UnsupportedAssertCtempTransform* err) { return Error_code(err->Error); } struct _IError_interface_methods { string (*_method_msg)(void* _); int (*_method_code)(void* _); }; struct _IError_interface_methods IError_name_table[16] = { { ._method_msg = (void*) None___msg_Interface_IError_method_wrapper, ._method_code = (void*) None___code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) 0, ._method_code = (void*) 0, }, { ._method_msg = (void*) Error_msg_Interface_IError_method_wrapper, ._method_code = (void*) Error_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) MessageError_msg_Interface_IError_method_wrapper, ._method_code = (void*) MessageError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) time__TimeParseError_msg_Interface_IError_method_wrapper, ._method_code = (void*) time__TimeParseError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) flag__UnknownFlagError_msg_Interface_IError_method_wrapper, ._method_code = (void*) flag__UnknownFlagError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) flag__ArgsCountError_msg_Interface_IError_method_wrapper, ._method_code = (void*) flag__ArgsCountError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) semver__InvalidComparatorFormatError_msg_Interface_IError_method_wrapper, ._method_code = (void*) semver__InvalidComparatorFormatError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) semver__EmptyInputError_msg_Interface_IError_method_wrapper, ._method_code = (void*) semver__EmptyInputError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) semver__InvalidVersionFormatError_msg_Interface_IError_method_wrapper, ._method_code = (void*) semver__InvalidVersionFormatError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) os__Eof_msg_Interface_IError_method_wrapper, ._method_code = (void*) os__Eof_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) os__NotExpected_msg_Interface_IError_method_wrapper, ._method_code = (void*) os__NotExpected_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) os__FileNotOpenedError_msg_Interface_IError_method_wrapper, ._method_code = (void*) os__FileNotOpenedError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) os__SizeOfTypeIs0Error_msg_Interface_IError_method_wrapper, ._method_code = (void*) os__SizeOfTypeIs0Error_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) os__ExecutableNotFoundError_msg_Interface_IError_method_wrapper, ._method_code = (void*) os__ExecutableNotFoundError_code_Interface_IError_method_wrapper, }, { ._method_msg = (void*) v__gen__c__UnsupportedAssertCtempTransform_msg_Interface_IError_method_wrapper, ._method_code = (void*) v__gen__c__UnsupportedAssertCtempTransform_code_Interface_IError_method_wrapper, }, }; // Casting functions for converting "None__" to interface "IError" static inline IError I_None___to_Interface_IError(None__* x) { return (IError) { ._None__ = x, ._typ = _IError_None___index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "voidptr" to interface "IError" static inline IError I_voidptr_to_Interface_IError(voidptr* x) { return (IError) { ._voidptr = x, ._typ = _IError_voidptr_index, .msg = (string*)((char*)x/*.... ast.voidptr_type */), .code = (int*)((char*)x/*.... ast.voidptr_type */), }; } // Casting functions for converting "Error" to interface "IError" static inline IError I_Error_to_Interface_IError(Error* x) { return (IError) { ._Error = x, ._typ = _IError_Error_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "MessageError" to interface "IError" static inline IError I_MessageError_to_Interface_IError(MessageError* x) { return (IError) { ._MessageError = x, ._typ = _IError_MessageError_index, .msg = (string*)((char*)x + __offsetof_ptr(x, MessageError, msg)), .code = (int*)((char*)x + __offsetof_ptr(x, MessageError, code)), }; } // Casting functions for converting "time__TimeParseError" to interface "IError" static inline IError I_time__TimeParseError_to_Interface_IError(time__TimeParseError* x) { return (IError) { ._time__TimeParseError = x, ._typ = _IError_time__TimeParseError_index, .msg = (string*)((char*)x), .code = (int*)((char*)x + __offsetof_ptr(x, time__TimeParseError, code)), }; } // Casting functions for converting "flag__UnknownFlagError" to interface "IError" static inline IError I_flag__UnknownFlagError_to_Interface_IError(flag__UnknownFlagError* x) { return (IError) { ._flag__UnknownFlagError = x, ._typ = _IError_flag__UnknownFlagError_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "flag__ArgsCountError" to interface "IError" static inline IError I_flag__ArgsCountError_to_Interface_IError(flag__ArgsCountError* x) { return (IError) { ._flag__ArgsCountError = x, ._typ = _IError_flag__ArgsCountError_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "semver__InvalidComparatorFormatError" to interface "IError" static inline IError I_semver__InvalidComparatorFormatError_to_Interface_IError(semver__InvalidComparatorFormatError* x) { return (IError) { ._semver__InvalidComparatorFormatError = x, ._typ = _IError_semver__InvalidComparatorFormatError_index, .msg = (string*)((char*)x + __offsetof_ptr(x, semver__InvalidComparatorFormatError, MessageError) + __offsetof_ptr(x, MessageError, msg)), .code = (int*)((char*)x + __offsetof_ptr(x, semver__InvalidComparatorFormatError, MessageError) + __offsetof_ptr(x, MessageError, code)), }; } // Casting functions for converting "semver__EmptyInputError" to interface "IError" static inline IError I_semver__EmptyInputError_to_Interface_IError(semver__EmptyInputError* x) { return (IError) { ._semver__EmptyInputError = x, ._typ = _IError_semver__EmptyInputError_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "semver__InvalidVersionFormatError" to interface "IError" static inline IError I_semver__InvalidVersionFormatError_to_Interface_IError(semver__InvalidVersionFormatError* x) { return (IError) { ._semver__InvalidVersionFormatError = x, ._typ = _IError_semver__InvalidVersionFormatError_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "os__Eof" to interface "IError" static inline IError I_os__Eof_to_Interface_IError(os__Eof* x) { return (IError) { ._os__Eof = x, ._typ = _IError_os__Eof_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "os__NotExpected" to interface "IError" static inline IError I_os__NotExpected_to_Interface_IError(os__NotExpected* x) { return (IError) { ._os__NotExpected = x, ._typ = _IError_os__NotExpected_index, .msg = (string*)((char*)x), .code = (int*)((char*)x + __offsetof_ptr(x, os__NotExpected, code)), }; } // Casting functions for converting "os__FileNotOpenedError" to interface "IError" static inline IError I_os__FileNotOpenedError_to_Interface_IError(os__FileNotOpenedError* x) { return (IError) { ._os__FileNotOpenedError = x, ._typ = _IError_os__FileNotOpenedError_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "os__SizeOfTypeIs0Error" to interface "IError" static inline IError I_os__SizeOfTypeIs0Error_to_Interface_IError(os__SizeOfTypeIs0Error* x) { return (IError) { ._os__SizeOfTypeIs0Error = x, ._typ = _IError_os__SizeOfTypeIs0Error_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "os__ExecutableNotFoundError" to interface "IError" static inline IError I_os__ExecutableNotFoundError_to_Interface_IError(os__ExecutableNotFoundError* x) { return (IError) { ._os__ExecutableNotFoundError = x, ._typ = _IError_os__ExecutableNotFoundError_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } // Casting functions for converting "v__gen__c__UnsupportedAssertCtempTransform" to interface "IError" static inline IError I_v__gen__c__UnsupportedAssertCtempTransform_to_Interface_IError(v__gen__c__UnsupportedAssertCtempTransform* x) { return (IError) { ._v__gen__c__UnsupportedAssertCtempTransform = x, ._typ = _IError_v__gen__c__UnsupportedAssertCtempTransform_index, .msg = (string*)((char*)x), .code = (int*)((char*)x), }; } static rand__PRNG I_rand__wyrand__WyRandRNG_to_Interface_rand__PRNG(rand__wyrand__WyRandRNG* x); const int _rand__PRNG_rand__wyrand__WyRandRNG_index = 0; static rand__PRNG I_voidptr_to_Interface_rand__PRNG(voidptr* x); const int _rand__PRNG_voidptr_index = 1; // ^^^ number of types for interface rand__PRNG: 2 // Methods wrapper for interface "rand__PRNG" struct _rand__PRNG_interface_methods { void (*_method_seed)(void* _, Array_u32 seed_data); u8 (*_method_u8)(void* _); u16 (*_method_u16)(void* _); u32 (*_method_u32)(void* _); u64 (*_method_u64)(void* _); int (*_method_block_size)(void* _); void (*_method__v_free)(void* _); }; struct _rand__PRNG_interface_methods rand__PRNG_name_table[2] = { { ._method_seed = (void*) rand__wyrand__WyRandRNG_seed, ._method_u8 = (void*) rand__wyrand__WyRandRNG_u8, ._method_u16 = (void*) rand__wyrand__WyRandRNG_u16, ._method_u32 = (void*) rand__wyrand__WyRandRNG_u32, ._method_u64 = (void*) rand__wyrand__WyRandRNG_u64, ._method_block_size = (void*) rand__wyrand__WyRandRNG_block_size, ._method__v_free = (void*) rand__wyrand__WyRandRNG_free, }, { ._method_seed = (void*) 0, ._method_u8 = (void*) 0, ._method_u16 = (void*) 0, ._method_u32 = (void*) 0, ._method_u64 = (void*) 0, ._method_block_size = (void*) 0, ._method__v_free = (void*) 0, }, }; // Casting functions for converting "rand__wyrand__WyRandRNG" to interface "rand__PRNG" static inline rand__PRNG I_rand__wyrand__WyRandRNG_to_Interface_rand__PRNG(rand__wyrand__WyRandRNG* x) { return (rand__PRNG) { ._rand__wyrand__WyRandRNG = x, ._typ = _rand__PRNG_rand__wyrand__WyRandRNG_index, }; } // Casting functions for converting "voidptr" to interface "rand__PRNG" static inline rand__PRNG I_voidptr_to_Interface_rand__PRNG(voidptr* x) { return (rand__PRNG) { ._voidptr = x, ._typ = _rand__PRNG_voidptr_index, }; } // ^^^ number of types for interface hash__Hasher: 0 // Methods wrapper for interface "hash__Hasher" struct _hash__Hasher_interface_methods { Array_u8 (*_method_sum)(void* _, Array_u8 b); int (*_method_size)(void* _); int (*_method_block_size)(void* _); }; struct _hash__Hasher_interface_methods hash__Hasher_name_table[1]; // ^^^ number of types for interface hash__Hash32er: 0 // Methods wrapper for interface "hash__Hash32er" struct _hash__Hash32er_interface_methods { u32 (*_method_sum32)(void* _); }; struct _hash__Hash32er_interface_methods hash__Hash32er_name_table[1]; // ^^^ number of types for interface hash__Hash64er: 0 // Methods wrapper for interface "hash__Hash64er" struct _hash__Hash64er_interface_methods { u64 (*_method_sum64)(void* _); }; struct _hash__Hash64er_interface_methods hash__Hash64er_name_table[1]; static v__ast__walker__Visitor I_v__ast__walker__Inspector_to_Interface_v__ast__walker__Visitor(v__ast__walker__Inspector* x); const int _v__ast__walker__Visitor_v__ast__walker__Inspector_index = 0; static v__ast__walker__Visitor I_voidptr_to_Interface_v__ast__walker__Visitor(voidptr* x); const int _v__ast__walker__Visitor_voidptr_index = 1; static v__ast__walker__Visitor I_v__callgraph__Mapper_to_Interface_v__ast__walker__Visitor(v__callgraph__Mapper* x); const int _v__ast__walker__Visitor_v__callgraph__Mapper_index = 2; // ^^^ number of types for interface v__ast__walker__Visitor: 3 // Methods wrapper for interface "v__ast__walker__Visitor" struct _v__ast__walker__Visitor_interface_methods { _result_void (*_method_visit)(void* _, v__ast__Node* node); }; struct _v__ast__walker__Visitor_interface_methods v__ast__walker__Visitor_name_table[3] = { { ._method_visit = (void*) v__ast__walker__Inspector_visit, }, { ._method_visit = (void*) 0, }, { ._method_visit = (void*) v__callgraph__Mapper_visit, }, }; // Casting functions for converting "v__ast__walker__Inspector" to interface "v__ast__walker__Visitor" static inline v__ast__walker__Visitor I_v__ast__walker__Inspector_to_Interface_v__ast__walker__Visitor(v__ast__walker__Inspector* x) { return (v__ast__walker__Visitor) { ._v__ast__walker__Inspector = x, ._typ = _v__ast__walker__Visitor_v__ast__walker__Inspector_index, }; } // Casting functions for converting "voidptr" to interface "v__ast__walker__Visitor" static inline v__ast__walker__Visitor I_voidptr_to_Interface_v__ast__walker__Visitor(voidptr* x) { return (v__ast__walker__Visitor) { ._voidptr = x, ._typ = _v__ast__walker__Visitor_voidptr_index, }; } // Casting functions for converting "v__callgraph__Mapper" to interface "v__ast__walker__Visitor" static inline v__ast__walker__Visitor I_v__callgraph__Mapper_to_Interface_v__ast__walker__Visitor(v__callgraph__Mapper* x) { return (v__ast__walker__Visitor) { ._v__callgraph__Mapper = x, ._typ = _v__ast__walker__Visitor_v__callgraph__Mapper_index, }; } // V gowrappers: void* sync__pool__process_in_thread_thread_wrapper(thread_arg_sync__pool__process_in_thread *arg) { arg->fn(arg->arg1, arg->arg2); _v_free(arg); return 0; } // V shared type functions: static inline voidptr __dup__shared__Array_string(voidptr src, int sz) { __shared__Array_string* dest = memdup(src, sz); sync__RwMutex_init(&dest->mtx); return dest; } static inline voidptr __dup__shared__Map_string_bool(voidptr src, int sz) { __shared__Map_string_bool* dest = memdup(src, sz); sync__RwMutex_init(&dest->mtx); return dest; } typedef struct __shared_map __shared_map; struct __shared_map { sync__RwMutex mtx; map val; }; static inline voidptr __dup_shared_map(voidptr src, int sz) { __shared_map* dest = memdup(src, sz); sync__RwMutex_init(&dest->mtx); return dest; } typedef struct __shared_array __shared_array; struct __shared_array { sync__RwMutex mtx; array val; }; static inline voidptr __dup_shared_array(voidptr src, int sz) { __shared_array* dest = memdup(src, sz); sync__RwMutex_init(&dest->mtx); return dest; } static inline void __sort_ptr(uintptr_t a[], bool b[], int l) { for (int i=1; i0 && a[j-1] > ins) { a[j] = a[j-1]; b[j] = b[j-1]; j--; } a[j] = ins; b[j] = insb; } } // V auto str functions: static string time__FormatTime_str(time__FormatTime it) { /* gen_str_for_enum */ switch(it) { case time__FormatTime__hhmm12: return _SLIT("hhmm12"); case time__FormatTime__hhmm24: return _SLIT("hhmm24"); case time__FormatTime__hhmmss12: return _SLIT("hhmmss12"); case time__FormatTime__hhmmss24: return _SLIT("hhmmss24"); case time__FormatTime__hhmmss24_milli: return _SLIT("hhmmss24_milli"); case time__FormatTime__hhmmss24_micro: return _SLIT("hhmmss24_micro"); case time__FormatTime__hhmmss24_nano: return _SLIT("hhmmss24_nano"); case time__FormatTime__no_time: return _SLIT("no_time"); default: return _SLIT("unknown enum value"); } } static string time__FormatDate_str(time__FormatDate it) { /* gen_str_for_enum */ switch(it) { case time__FormatDate__ddmmyy: return _SLIT("ddmmyy"); case time__FormatDate__ddmmyyyy: return _SLIT("ddmmyyyy"); case time__FormatDate__mmddyy: return _SLIT("mmddyy"); case time__FormatDate__mmddyyyy: return _SLIT("mmddyyyy"); case time__FormatDate__mmmd: return _SLIT("mmmd"); case time__FormatDate__mmmdd: return _SLIT("mmmdd"); case time__FormatDate__mmmddyy: return _SLIT("mmmddyy"); case time__FormatDate__mmmddyyyy: return _SLIT("mmmddyyyy"); case time__FormatDate__no_date: return _SLIT("no_date"); case time__FormatDate__yyyymmdd: return _SLIT("yyyymmdd"); case time__FormatDate__yymmdd: return _SLIT("yymmdd"); default: return _SLIT("unknown enum value"); } } static string v__pref__Backend_str(v__pref__Backend it) { /* gen_str_for_enum */ switch(it) { case v__pref__Backend__c: return _SLIT("c"); case v__pref__Backend__golang: return _SLIT("golang"); case v__pref__Backend__interpret: return _SLIT("interpret"); case v__pref__Backend__js_node: return _SLIT("js_node"); case v__pref__Backend__js_browser: return _SLIT("js_browser"); case v__pref__Backend__js_freestanding: return _SLIT("js_freestanding"); case v__pref__Backend__native: return _SLIT("native"); case v__pref__Backend__wasm: return _SLIT("wasm"); default: return _SLIT("unknown enum value"); } } static string v__ast__AttrKind_str(v__ast__AttrKind it) { /* gen_str_for_enum */ switch(it) { case v__ast__AttrKind__plain: return _SLIT("plain"); case v__ast__AttrKind__string: return _SLIT("string"); case v__ast__AttrKind__number: return _SLIT("number"); case v__ast__AttrKind__bool: return _SLIT("bool"); case v__ast__AttrKind__comptime_define: return _SLIT("comptime_define"); default: return _SLIT("unknown enum value"); } } static string Array_v__ast__Expr_str(Array_v__ast__Expr a) { return indent_Array_v__ast__Expr_str(a, 0);} static string indent_Array_v__ast__Expr_str(Array_v__ast__Expr a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__Expr it = *(v__ast__Expr*)array_get(a, i); strings__Builder_write_string(&sb, _SLIT("")); string x = v__ast__Expr_str(it); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__CallExpr_str(v__ast__CallExpr it) { return indent_v__ast__CallExpr_str(it, 0);} static string v__ast__TypeInfo_str(v__ast__TypeInfo x) { return indent_v__ast__TypeInfo_str(x, 0); } static string v__ast__Fn_str(v__ast__Fn it) { return indent_v__ast__Fn_str(it, 0);} static string v__ast__Language_str(v__ast__Language it) { /* gen_str_for_enum */ switch(it) { case v__ast__Language__v: return _SLIT("v"); case v__ast__Language__c: return _SLIT("c"); case v__ast__Language__js: return _SLIT("js"); case v__ast__Language__wasm: return _SLIT("wasm"); case v__ast__Language__amd64: return _SLIT("amd64"); case v__ast__Language__i386: return _SLIT("i386"); case v__ast__Language__arm64: return _SLIT("arm64"); case v__ast__Language__arm32: return _SLIT("arm32"); case v__ast__Language__rv64: return _SLIT("rv64"); case v__ast__Language__rv32: return _SLIT("rv32"); case v__ast__Language__wasm32: return _SLIT("wasm32"); default: return _SLIT("unknown enum value"); } } static string v__gen__c__StrType_str(v__gen__c__StrType it) { return indent_v__gen__c__StrType_str(it, 0);} static string Array_v__ast__Type_str(Array_v__ast__Type a) { return indent_Array_v__ast__Type_str(a, 0);} static string indent_Array_v__ast__Type_str(Array_v__ast__Type a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { int it = *(int*)array_get(a, i); strings__Builder_write_string(&sb, _SLIT("")); string x = int_str(it); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__Enum_str(v__ast__Enum it) { return indent_v__ast__Enum_str(it, 0);} static string v__token__Pos_str(v__token__Pos it) { return indent_v__token__Pos_str(it, 0);} static string v__ast__ComptTimeConstValue_str(v__ast__ComptTimeConstValue x) { return indent_v__ast__ComptTimeConstValue_str(x, 0); } static string Array_Array_v__ast__Type_str(Array_Array_v__ast__Type a) { return indent_Array_Array_v__ast__Type_str(a, 0);} static string indent_Array_Array_v__ast__Type_str(Array_Array_v__ast__Type a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { Array_v__ast__Type it = *(Array_v__ast__Type*)array_get(a, i); string x = indent_Array_v__ast__Type_str(it, indent_count); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string Array_rune_str(Array_rune a) { return indent_Array_rune_str(a, 0);} static string indent_Array_rune_str(Array_rune a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { rune it = *(rune*)array_get(a, i); string x = str_intp(2, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = rune_str(it) }}, {_SLIT("`"), 0, {.d_c = 0 }}})); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__IdentKind_str(v__ast__IdentKind it) { /* gen_str_for_enum */ switch(it) { case v__ast__IdentKind__unresolved: return _SLIT("unresolved"); case v__ast__IdentKind__blank_ident: return _SLIT("blank_ident"); case v__ast__IdentKind__variable: return _SLIT("variable"); case v__ast__IdentKind__constant: return _SLIT("constant"); case v__ast__IdentKind__global: return _SLIT("global"); case v__ast__IdentKind__function: return _SLIT("function"); default: return _SLIT("unknown enum value"); } } static string Array_v__ast__Attr_str(Array_v__ast__Attr a) { return indent_Array_v__ast__Attr_str(a, 0);} static string indent_Array_v__ast__Attr_str(Array_v__ast__Attr a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__Attr it = *(v__ast__Attr*)array_get(a, i); strings__Builder_write_string(&sb, _SLIT("")); string x = v__ast__Attr_str(&it); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__Ident_str(v__ast__Ident it) { return indent_v__ast__Ident_str(it, 0);} static string v__scanner__CommentsMode_str(v__scanner__CommentsMode it) { /* gen_str_for_enum */ switch(it) { case v__scanner__CommentsMode__skip_comments: return _SLIT("skip_comments"); case v__scanner__CommentsMode__parse_comments: return _SLIT("parse_comments"); case v__scanner__CommentsMode__toplevel_comments: return _SLIT("toplevel_comments"); default: return _SLIT("unknown enum value"); } } static string v__parser__State_str(v__parser__State it) { /* gen_str_for_enum */ switch(it) { case v__parser__State__simple: return _SLIT("simple"); case v__parser__State__html: return _SLIT("html"); case v__parser__State__css: return _SLIT("css"); case v__parser__State__js: return _SLIT("js"); default: return _SLIT("unknown enum value"); } } static string v__errors__Reporter_str(v__errors__Reporter it) { /* gen_str_for_enum */ switch(it) { case v__errors__Reporter__scanner: return _SLIT("scanner"); case v__errors__Reporter__parser: return _SLIT("parser"); case v__errors__Reporter__checker: return _SLIT("checker"); case v__errors__Reporter__builder: return _SLIT("builder"); case v__errors__Reporter__gen: return _SLIT("gen"); default: return _SLIT("unknown enum value"); } } static string v__builder__CcompilerOptions_str(v__builder__CcompilerOptions it) { return indent_v__builder__CcompilerOptions_str(it, 0);} static string Array_v__cflag__CFlag_str(Array_v__cflag__CFlag a) { return indent_Array_v__cflag__CFlag_str(a, 0);} static string indent_Array_v__cflag__CFlag_str(Array_v__cflag__CFlag a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__cflag__CFlag it = *(v__cflag__CFlag*)array_get(a, i); strings__Builder_write_string(&sb, _SLIT("")); string x = v__cflag__CFlag_str(&it); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string Map_string_int_str(Map_string_int m) { return indent_Map_string_int_str(m, 0);} static string indent_Map_string_int_str(Map_string_int m, int indent_count) { /* gen_str_for_map */ strings__Builder sb = strings__new_builder(m.key_values.len*10); strings__Builder_write_string(&sb, _SLIT("{")); bool is_first = true; for (int i = 0; i < m.key_values.len; ++i) { if (!DenseArray_has_index(&m.key_values, i)) { continue; } else if (!is_first) { strings__Builder_write_string(&sb, _SLIT(", ")); } string key = *(string*)DenseArray_key(&m.key_values, i); strings__Builder_write_string(&sb, str_intp(2, _MOV((StrIntpData[]){{_SLIT("'"), 0xfe10, {.d_s = key}},{_SLIT("'"), 0, {.d_c = 0 }}}))); strings__Builder_write_string(&sb, _SLIT(": ")); strings__Builder_write_string(&sb, int_str(*(int*)DenseArray_value(&m.key_values, i))); is_first = false; } strings__Builder_write_string(&sb, _SLIT("}")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__OrExpr_str(v__ast__OrExpr it) { return indent_v__ast__OrExpr_str(it, 0);} static string Array_v__ast__CallArg_str(Array_v__ast__CallArg a) { return indent_Array_v__ast__CallArg_str(a, 0);} static string indent_Array_v__ast__CallArg_str(Array_v__ast__CallArg a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__CallArg it = *(v__ast__CallArg*)array_get(a, i); strings__Builder_write_string(&sb, _SLIT("")); string x = v__ast__CallArg_str(it); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string Array_v__ast__Comment_str(Array_v__ast__Comment a) { return indent_Array_v__ast__Comment_str(a, 0);} static string indent_Array_v__ast__Comment_str(Array_v__ast__Comment a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__Comment it = *(v__ast__Comment*)array_get(a, i); string x = indent_v__ast__Comment_str(it, indent_count); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__Aggregate_str(v__ast__Aggregate it) { return indent_v__ast__Aggregate_str(it, 0);} static string v__ast__Alias_str(v__ast__Alias it) { return indent_v__ast__Alias_str(it, 0);} static string v__ast__Array_str(v__ast__Array it) { return indent_v__ast__Array_str(it, 0);} static string v__ast__ArrayFixed_str(v__ast__ArrayFixed it) { return indent_v__ast__ArrayFixed_str(it, 0);} static string v__ast__Chan_str(v__ast__Chan it) { return indent_v__ast__Chan_str(it, 0);} static string v__ast__FnType_str(v__ast__FnType it) { return indent_v__ast__FnType_str(it, 0);} static string v__ast__GenericInst_str(v__ast__GenericInst it) { return indent_v__ast__GenericInst_str(it, 0);} static string v__ast__Interface_str(v__ast__Interface it) { return indent_v__ast__Interface_str(it, 0);} static string v__ast__Map_str(v__ast__Map it) { return indent_v__ast__Map_str(it, 0);} static string v__ast__MultiReturn_str(v__ast__MultiReturn it) { return indent_v__ast__MultiReturn_str(it, 0);} static string v__ast__Struct_str(v__ast__Struct it) { return indent_v__ast__Struct_str(it, 0);} static string v__ast__SumType_str(v__ast__SumType it) { return indent_v__ast__SumType_str(it, 0);} static string v__ast__Thread_str(v__ast__Thread it) { return indent_v__ast__Thread_str(it, 0);} static string Array_v__ast__Param_str(Array_v__ast__Param a) { return indent_Array_v__ast__Param_str(a, 0);} static string indent_Array_v__ast__Param_str(Array_v__ast__Param a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__Param it = *(v__ast__Param*)array_get(a, i); string x = indent_v__ast__Param_str(it, indent_count); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string Map_string_Array_v__ast__Attr_str(Map_string_Array_v__ast__Attr m) { return indent_Map_string_Array_v__ast__Attr_str(m, 0);} static string indent_Map_string_Array_v__ast__Attr_str(Map_string_Array_v__ast__Attr m, int indent_count) { /* gen_str_for_map */ strings__Builder sb = strings__new_builder(m.key_values.len*10); strings__Builder_write_string(&sb, _SLIT("{")); bool is_first = true; for (int i = 0; i < m.key_values.len; ++i) { if (!DenseArray_has_index(&m.key_values, i)) { continue; } else if (!is_first) { strings__Builder_write_string(&sb, _SLIT(", ")); } string key = *(string*)DenseArray_key(&m.key_values, i); strings__Builder_write_string(&sb, str_intp(2, _MOV((StrIntpData[]){{_SLIT("'"), 0xfe10, {.d_s = key}},{_SLIT("'"), 0, {.d_c = 0 }}}))); strings__Builder_write_string(&sb, _SLIT(": ")); strings__Builder_write_string(&sb, indent_Array_v__ast__Attr_str(*(Array_v__ast__Attr*)DenseArray_value(&m.key_values, i), indent_count)); is_first = false; } strings__Builder_write_string(&sb, _SLIT("}")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__EmptyExpr_str(v__ast__EmptyExpr it) { return indent_v__ast__EmptyExpr_str(it, 0); } static string indent_v__ast__EmptyExpr_str(v__ast__EmptyExpr it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string tmp_ds = u8_str(it); string res = str_intp(3, _MOV((StrIntpData[]){ {_SLIT0, 0xfe10, {.d_s = indents }}, {_SLIT("v.ast.EmptyExpr("), 0xfe10, {.d_s = tmp_ds }}, {_SLIT(")"), 0, {.d_c = 0 }} })); string_free(&indents); string_free(&tmp_ds); return res; } static string v__ast__ScopeObject_str(v__ast__ScopeObject x) { return indent_v__ast__ScopeObject_str(x, 0); } static string v__ast__IdentInfo_str(v__ast__IdentInfo x) { return indent_v__ast__IdentInfo_str(x, 0); } static string v__ast__OrKind_str(v__ast__OrKind it) { /* gen_str_for_enum */ switch(it) { case v__ast__OrKind__absent: return _SLIT("absent"); case v__ast__OrKind__block: return _SLIT("block"); case v__ast__OrKind__propagate_option: return _SLIT("propagate_option"); case v__ast__OrKind__propagate_result: return _SLIT("propagate_result"); default: return _SLIT("unknown enum value"); } } static string Array_v__ast__Stmt_str(Array_v__ast__Stmt a) { return indent_Array_v__ast__Stmt_str(a, 0);} static string indent_Array_v__ast__Stmt_str(Array_v__ast__Stmt a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__Stmt it = *(v__ast__Stmt*)array_get(a, i); strings__Builder_write_string(&sb, _SLIT("")); string x = v__ast__Stmt_str(it); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__Comment_str(v__ast__Comment it) { return indent_v__ast__Comment_str(it, 0);} static string Array_v__ast__StructField_str(Array_v__ast__StructField a) { return indent_Array_v__ast__StructField_str(a, 0);} static string indent_Array_v__ast__StructField_str(Array_v__ast__StructField a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__StructField it = *(v__ast__StructField*)array_get(a, i); string x = indent_v__ast__StructField_str(it, indent_count); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string Map_int_Array_v__ast__Type_str(Map_int_Array_v__ast__Type m) { return indent_Map_int_Array_v__ast__Type_str(m, 0);} static string indent_Map_int_Array_v__ast__Type_str(Map_int_Array_v__ast__Type m, int indent_count) { /* gen_str_for_map */ strings__Builder sb = strings__new_builder(m.key_values.len*10); strings__Builder_write_string(&sb, _SLIT("{")); bool is_first = true; for (int i = 0; i < m.key_values.len; ++i) { if (!DenseArray_has_index(&m.key_values, i)) { continue; } else if (!is_first) { strings__Builder_write_string(&sb, _SLIT(", ")); } int key = *(int*)DenseArray_key(&m.key_values, i); strings__Builder_write_string(&sb, int_str(key)); strings__Builder_write_string(&sb, _SLIT(": ")); strings__Builder_write_string(&sb, indent_Array_v__ast__Type_str(*(Array_v__ast__Type*)DenseArray_value(&m.key_values, i), indent_count)); is_first = false; } strings__Builder_write_string(&sb, _SLIT("}")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string Array_v__ast__Fn_str(Array_v__ast__Fn a) { return indent_Array_v__ast__Fn_str(a, 0);} static string indent_Array_v__ast__Fn_str(Array_v__ast__Fn a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__Fn it = *(v__ast__Fn*)array_get(a, i); string x = indent_v__ast__Fn_str(it, indent_count); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__Param_str(v__ast__Param it) { return indent_v__ast__Param_str(it, 0);} static string v__ast__AsmRegister_str(v__ast__AsmRegister it) { return indent_v__ast__AsmRegister_str(it, 0);} static string v__ast__ConstField_str(v__ast__ConstField it) { return indent_v__ast__ConstField_str(it, 0);} static string v__ast__GlobalField_str(v__ast__GlobalField it) { return indent_v__ast__GlobalField_str(it, 0);} static string v__ast__Var_str(v__ast__Var it) { return indent_v__ast__Var_str(it, 0);} static string v__ast__IdentFn_str(v__ast__IdentFn it) { return indent_v__ast__IdentFn_str(it, 0);} static string v__ast__IdentVar_str(v__ast__IdentVar it) { return indent_v__ast__IdentVar_str(it, 0);} static string v__ast__StructField_str(v__ast__StructField it) { return indent_v__ast__StructField_str(it, 0);} static string v__ast__ComptimeVarKind_str(v__ast__ComptimeVarKind it) { /* gen_str_for_enum */ switch(it) { case v__ast__ComptimeVarKind__no_comptime: return _SLIT("no_comptime"); case v__ast__ComptimeVarKind__key_var: return _SLIT("key_var"); case v__ast__ComptimeVarKind__value_var: return _SLIT("value_var"); case v__ast__ComptimeVarKind__field_var: return _SLIT("field_var"); case v__ast__ComptimeVarKind__generic_param: return _SLIT("generic_param"); default: return _SLIT("unknown enum value"); } } static string v__ast__StructDecl_str(v__ast__StructDecl it) { return indent_v__ast__StructDecl_str(it, 0);} static string Array_v__ast__Embed_str(Array_v__ast__Embed a) { return indent_Array_v__ast__Embed_str(a, 0);} static string indent_Array_v__ast__Embed_str(Array_v__ast__Embed a, int indent_count) { strings__Builder sb = strings__new_builder(a.len * 10); strings__Builder_write_string(&sb, _SLIT("[")); for (int i = 0; i < a.len; ++i) { v__ast__Embed it = *(v__ast__Embed*)array_get(a, i); string x = indent_v__ast__Embed_str(it, indent_count); strings__Builder_write_string(&sb, x); if (i < a.len-1) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_string(&sb, _SLIT("]")); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } static string v__ast__Embed_str(v__ast__Embed it) { return indent_v__ast__Embed_str(it, 0);} // V dump functions: string _v_dump_expr_string(string fpath, int line, string sexpr, string dump_arg) { string sline = int_str(line); string value = string_str(dump_arg); strings__Builder sb = strings__new_builder(256); strings__Builder_write_rune(&sb, '['); strings__Builder_write_string(&sb, fpath); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_string(&sb, sline); strings__Builder_write_rune(&sb, ']'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, sexpr); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, value); strings__Builder_write_rune(&sb, '\n'); string res; res = strings__Builder_str(&sb); eprint(res); string_free(&res); strings__Builder_free(&sb); string_free(&value); string_free(&sline); return dump_arg; } v__ast__Type _v_dump_expr_v__ast__Type(string fpath, int line, string sexpr, v__ast__Type dump_arg) { string sline = int_str(line); string value = v__ast__Type_str(dump_arg); strings__Builder sb = strings__new_builder(256); strings__Builder_write_rune(&sb, '['); strings__Builder_write_string(&sb, fpath); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_string(&sb, sline); strings__Builder_write_rune(&sb, ']'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, sexpr); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, value); strings__Builder_write_rune(&sb, '\n'); string res; res = strings__Builder_str(&sb); eprint(res); string_free(&res); strings__Builder_free(&sb); string_free(&value); string_free(&sline); return dump_arg; } v__ast__Kind _v_dump_expr_v__ast__Kind(string fpath, int line, string sexpr, v__ast__Kind dump_arg) { string sline = int_str(line); string value = v__ast__Kind_str(dump_arg); strings__Builder sb = strings__new_builder(256); strings__Builder_write_rune(&sb, '['); strings__Builder_write_string(&sb, fpath); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_string(&sb, sline); strings__Builder_write_rune(&sb, ']'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, sexpr); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, value); strings__Builder_write_rune(&sb, '\n'); string res; res = strings__Builder_str(&sb); eprint(res); string_free(&res); strings__Builder_free(&sb); string_free(&value); string_free(&sline); return dump_arg; } v__token__Pos _v_dump_expr_v__token__Pos(string fpath, int line, string sexpr, v__token__Pos dump_arg) { string sline = int_str(line); string value = v__token__Pos_str(dump_arg); strings__Builder sb = strings__new_builder(256); strings__Builder_write_rune(&sb, '['); strings__Builder_write_string(&sb, fpath); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_string(&sb, sline); strings__Builder_write_rune(&sb, ']'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, sexpr); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, value); strings__Builder_write_rune(&sb, '\n'); string res; res = strings__Builder_str(&sb); eprint(res); string_free(&res); strings__Builder_free(&sb); string_free(&value); string_free(&sline); return dump_arg; } int _v_dump_expr_int(string fpath, int line, string sexpr, int dump_arg) { string sline = int_str(line); string value = int_str(dump_arg); strings__Builder sb = strings__new_builder(256); strings__Builder_write_rune(&sb, '['); strings__Builder_write_string(&sb, fpath); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_string(&sb, sline); strings__Builder_write_rune(&sb, ']'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, sexpr); strings__Builder_write_rune(&sb, ':'); strings__Builder_write_rune(&sb, ' '); strings__Builder_write_string(&sb, value); strings__Builder_write_rune(&sb, '\n'); string res; res = strings__Builder_str(&sb); eprint(res); string_free(&res); strings__Builder_free(&sb); string_free(&value); string_free(&sline); return dump_arg; } // V auto functions: static string indent_v__ast__CallExpr_str(v__ast__CallExpr it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t1 = indent_v__ast__OrExpr_str(it.or_block, indent_count + 1); string _t2 = indent_Array_v__ast__CallArg_str(it.args, indent_count + 1); string _t3 = indent_Array_v__ast__Type_str(it.expected_arg_types, indent_count + 1); string _t4 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); string _t5 = indent_Array_v__ast__Type_str(it.raw_concrete_types, indent_count + 1); string _t6 = indent_Array_v__ast__Type_str(it.from_embed_types, indent_count + 1); string _t7 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); string _t8 = v__ast__Expr_str(it.left); string _t9 = isnil(it.scope) ? _SLIT("nil") : (indent_count > 25)? _SLIT("") : v__ast__Scope_str(*it.scope); string _t10 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t11 = indent_v__token__Pos_str(it.name_pos, indent_count + 1); string _t12 = indent_v__token__Pos_str(it.concrete_list_pos, indent_count + 1); string _t13 = v__ast__Type_str(it.left_type); string _t14 = v__ast__Type_str(it.receiver_type); string _t15 = v__ast__Type_str(it.return_type); string _t16 = v__ast__Type_str(it.fn_var_type); string _t17 = v__ast__Language_str((it.language)); string res = str_intp( 127, _MOV((StrIntpData[]){ {_SLIT("ast.CallExpr{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" or_block: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t1}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" args: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t2}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" expected_arg_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t3}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t4}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" raw_concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t5}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" from_embed_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t6}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t7}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" mod: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.mod}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" left: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t8}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" const_name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.const_name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" scope: &"), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t9}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t10}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t11}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_list_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t12}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" left_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t13}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" receiver_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t14}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" return_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t15}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fn_var_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t16}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t17}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_method: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_method ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_field: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_field ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_fn_var: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_fn_var ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_fn_a_const: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_fn_a_const ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_keep_alive: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_keep_alive ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_noreturn: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_noreturn ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_ctor_new: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_ctor_new ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_file_translated: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_file_translated ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comptime_ret_val: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.comptime_ret_val ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" should_be_skipped: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.should_be_skipped ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" free_receiver: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.free_receiver ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t17); string_free(&_t16); string_free(&_t15); string_free(&_t14); string_free(&_t13); string_free(&_t12); string_free(&_t11); string_free(&_t10); string_free(&_t9); string_free(&_t8); string_free(&_t7); string_free(&_t6); string_free(&_t5); string_free(&_t4); string_free(&_t3); string_free(&_t2); string_free(&_t1); string_free(&indents); return res; } static string indent_v__ast__TypeInfo_str(v__ast__TypeInfo x, int indent_count) { switch(x._typ) { case 453: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Aggregate_str(*(v__ast__Aggregate*)x._v__ast__Aggregate, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 455: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Alias_str(*(v__ast__Alias*)x._v__ast__Alias, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 433: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Array_str(*(v__ast__Array*)x._v__ast__Array, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 464: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__ArrayFixed_str(*(v__ast__ArrayFixed*)x._v__ast__ArrayFixed, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 465: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Chan_str(*(v__ast__Chan*)x._v__ast__Chan, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 470: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Enum_str(*(v__ast__Enum*)x._v__ast__Enum, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 468: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__FnType_str(*(v__ast__FnType*)x._v__ast__FnType, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 469: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__GenericInst_str(*(v__ast__GenericInst*)x._v__ast__GenericInst, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 458: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Interface_str(*(v__ast__Interface*)x._v__ast__Interface, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 434: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Map_str(*(v__ast__Map*)x._v__ast__Map, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 467: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__MultiReturn_str(*(v__ast__MultiReturn*)x._v__ast__MultiReturn, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 437: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Struct_str(*(v__ast__Struct*)x._v__ast__Struct, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 460: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__SumType_str(*(v__ast__SumType*)x._v__ast__SumType, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 466: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.TypeInfo("), 0xfe10, {.d_s = indent_v__ast__Thread_str(*(v__ast__Thread*)x._v__ast__Thread, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); default: return _SLIT("unknown sum type value"); } } static string indent_v__ast__Fn_str(v__ast__Fn it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t18 = indent_Array_v__ast__Param_str(it.params, indent_count + 1); string _t19 = Array_string_str(it.generic_names); string _t20 = Array_string_str(it.dep_names); string _t21 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); string _t22 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t23 = indent_v__token__Pos_str(it.return_type_pos, indent_count + 1); string _t24 = v__ast__Type_str(it.return_type); string _t25 = v__ast__Type_str(it.receiver_type); string _t26 = v__ast__Language_str((it.language)); string _t27 = v__ast__Language_str((it.file_mode)); string res = str_intp( 127, _MOV((StrIntpData[]){ {_SLIT("ast.Fn{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" params: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t18}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_names: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t19}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" dep_names: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t20}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t21}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" mod: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.mod}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" file: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.file}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" source_fn: "), 0, {.d_c=0}}, {_SLIT(""), 17, {.d_p=(voidptr) it.source_fn}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t22}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" return_type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t23}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" return_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t24}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" receiver_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t25}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" usages: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.usages}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" ctdefine_idx: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.ctdefine_idx}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t26}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" file_mode: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t27}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_variadic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_variadic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_pub: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_pub ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_ctor_new: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_ctor_new ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_deprecated: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_deprecated ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_noreturn: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_noreturn ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_unsafe: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_unsafe ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_placeholder: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_placeholder ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_main: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_main ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_test: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_test ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_keep_alive: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_keep_alive ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_method: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_method ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_static_type_method: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_static_type_method ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" no_body: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.no_body ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_file_translated: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_file_translated ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_conditional: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_conditional ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t27); string_free(&_t26); string_free(&_t25); string_free(&_t24); string_free(&_t23); string_free(&_t22); string_free(&_t21); string_free(&_t20); string_free(&_t19); string_free(&_t18); string_free(&indents); return res; } static string indent_v__gen__c__StrType_str(v__gen__c__StrType it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t28 = v__ast__Type_str(it.typ); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("c.StrType{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" styp: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.styp}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t28}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t28); string_free(&indents); return res; } static string indent_v__ast__Enum_str(v__ast__Enum it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t29 = Array_string_str(it.vals); string _t30 = v__ast__Type_str(it.typ); string _t31 = indent_Map_string_Array_v__ast__Attr_str(it.attrs, indent_count + 1); string res = str_intp( 27, _MOV((StrIntpData[]){ {_SLIT("ast.Enum{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" vals: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t29}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_flag: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_flag ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_multi_allowed: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_multi_allowed ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" uses_exprs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.uses_exprs ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t30}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t31}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t31); string_free(&_t30); string_free(&_t29); string_free(&indents); return res; } static string indent_v__token__Pos_str(v__token__Pos it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string res = str_intp( 23, _MOV((StrIntpData[]){ {_SLIT("token.Pos{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" len: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.len}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" line_nr: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.line_nr}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.pos}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" col: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.col}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" last_line: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.last_line}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&indents); return res; } static string indent_v__ast__ComptTimeConstValue_str(v__ast__ComptTimeConstValue x, int indent_count) { switch(x._typ) { case 279: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = indent_v__ast__EmptyExpr_str(*(v__ast__EmptyExpr*)x._v__ast__EmptyExpr, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 15: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = f32_str(*(f32*)x._f32)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 16: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = f64_str(*(f64*)x._f64)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 6: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = i16_str(*(i16*)x._i16)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 8: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = i64_str(*(i64*)x._i64)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 5: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = i8_str(*(i8*)x._i8)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 7: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = int_str(*(int*)x._int)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 21: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = rune_str(*(rune*)x._rune)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 20: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue('"), 0xfe10, {.d_s = string_str(*(string*)x._string)}}, {_SLIT("')"), 0, {.d_c = 0 }} })); case 11: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = u16_str(*(u16*)x._u16)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 12: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = u32_str(*(u32*)x._u32)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 13: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = u64_str(*(u64*)x._u64)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 10: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = u8_str(*(u8*)x._u8)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 2: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ComptTimeConstValue("), 0xfe10, {.d_s = voidptr_str(*(voidptr*)x._voidptr)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); default: return _SLIT("unknown sum type value"); } } static string indent_v__ast__Ident_str(v__ast__Ident it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t32 = indent_v__ast__OrExpr_str(it.or_expr, indent_count + 1); string _t33 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); string _t34 = indent_v__ast__ScopeObject_str(it.obj, indent_count + 1); string _t35 = indent_v__ast__IdentInfo_str(it.info, indent_count + 1); string _t36 = isnil(it.scope) ? _SLIT("nil") : (indent_count > 25)? _SLIT("") : v__ast__Scope_str(*it.scope); string _t37 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t38 = indent_v__token__Pos_str(it.mut_pos, indent_count + 1); string _t39 = v__token__Kind_str((it.tok_kind)); string _t40 = v__ast__Language_str((it.language)); string _t41 = v__ast__IdentKind_str((it.kind)); string res = str_intp( 59, _MOV((StrIntpData[]){ {_SLIT("ast.Ident{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" or_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t32}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t33}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" obj: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t34}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" mod: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.mod}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" info: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t35}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" scope: &"), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t36}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t37}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" mut_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t38}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" tok_kind: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t39}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t40}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" kind: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t41}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comptime: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.comptime ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t41); string_free(&_t40); string_free(&_t39); string_free(&_t38); string_free(&_t37); string_free(&_t36); string_free(&_t35); string_free(&_t34); string_free(&_t33); string_free(&_t32); string_free(&indents); return res; } static string indent_v__builder__CcompilerOptions_str(v__builder__CcompilerOptions it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t42 = Array_string_str(it.args); string _t43 = Array_string_str(it.wargs); string _t44 = Array_string_str(it.pre_args); string _t45 = Array_string_str(it.o_args); string _t46 = Array_string_str(it.source_args); string _t47 = Array_string_str(it.post_args); string _t48 = Array_string_str(it.linker_flags); string _t49 = Array_string_str(it.ldflags); string res = str_intp( 75, _MOV((StrIntpData[]){ {_SLIT("builder.CcompilerOptions{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" guessed_compiler: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.guessed_compiler}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" shared_postfix: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.shared_postfix}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" debug_mode: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.debug_mode ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_cc_tcc: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_cc_tcc ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_cc_gcc: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_cc_gcc ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_cc_icc: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_cc_icc ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_cc_msvc: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_cc_msvc ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_cc_clang: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_cc_clang ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" env_cflags: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.env_cflags}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" env_ldflags: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.env_ldflags}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" args: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t42}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" wargs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t43}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pre_args: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t44}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" o_args: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t45}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" source_args: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t46}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" post_args: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t47}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" linker_flags: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t48}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" ldflags: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t49}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t49); string_free(&_t48); string_free(&_t47); string_free(&_t46); string_free(&_t45); string_free(&_t44); string_free(&_t43); string_free(&_t42); string_free(&indents); return res; } static string indent_v__ast__OrExpr_str(v__ast__OrExpr it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t50 = v__ast__OrKind_str((it.kind)); string _t51 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t52 = indent_Array_v__ast__Stmt_str(it.stmts, indent_count + 1); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("ast.OrExpr{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" kind: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t50}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t51}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" stmts: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t52}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t52); string_free(&_t51); string_free(&_t50); string_free(&indents); return res; } static string indent_v__ast__Aggregate_str(v__ast__Aggregate it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t53 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); string _t54 = v__ast__Type_str(it.sum_type); string _t55 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("ast.Aggregate{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t53}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" sum_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t54}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t55}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t55); string_free(&_t54); string_free(&_t53); string_free(&indents); return res; } static string indent_v__ast__Alias_str(v__ast__Alias it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t56 = v__ast__Type_str(it.parent_type); string _t57 = v__ast__Language_str((it.language)); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("ast.Alias{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t56}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t57}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_import: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_import ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t57); string_free(&_t56); string_free(&indents); return res; } static string indent_v__ast__Array_str(v__ast__Array it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t58 = v__ast__Type_str(it.elem_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("ast.Array{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" nr_dims: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.nr_dims}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t58}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t58); string_free(&indents); return res; } static string indent_v__ast__ArrayFixed_str(v__ast__ArrayFixed it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t59 = v__ast__Expr_str(it.size_expr); string _t60 = v__ast__Type_str(it.elem_type); string res = str_intp( 19, _MOV((StrIntpData[]){ {_SLIT("ast.ArrayFixed{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" size_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t59}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" size: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.size}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t60}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_fn_ret: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_fn_ret ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t60); string_free(&_t59); string_free(&indents); return res; } static string indent_v__ast__Chan_str(v__ast__Chan it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t61 = v__ast__Type_str(it.elem_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("ast.Chan{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t61}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t61); string_free(&indents); return res; } static string indent_v__ast__FnType_str(v__ast__FnType it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t62 = indent_v__ast__Fn_str(it.func, indent_count + 1); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("ast.FnType{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_decl: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_decl ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" func: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t62}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t62); string_free(&indents); return res; } static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t63 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("ast.GenericInst{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_idx: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.parent_idx}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t63}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t63); string_free(&indents); return res; } static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t64 = indent_Map_int_Array_v__ast__Type_str(it.conversions, indent_count + 1); string _t65 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); string _t66 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); string _t67 = indent_Array_v__ast__Fn_str(it.methods, indent_count + 1); string _t68 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); string _t69 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); string _t70 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); string _t71 = v__ast__Type_str(it.parent_type); string res = str_intp( 39, _MOV((StrIntpData[]){ {_SLIT("ast.Interface{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" conversions: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t64}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t65}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t66}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" methods: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t67}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t68}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t69}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t70}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t71}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t71); string_free(&_t70); string_free(&_t69); string_free(&_t68); string_free(&_t67); string_free(&_t66); string_free(&_t65); string_free(&_t64); string_free(&indents); return res; } static string indent_v__ast__Map_str(v__ast__Map it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t72 = v__ast__Type_str(it.key_type); string _t73 = v__ast__Type_str(it.value_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("ast.Map{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" key_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t72}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" value_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t73}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t73); string_free(&_t72); string_free(&indents); return res; } static string indent_v__ast__MultiReturn_str(v__ast__MultiReturn it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t74 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); string res = str_intp( 7, _MOV((StrIntpData[]){ {_SLIT("ast.MultiReturn{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t74}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t74); string_free(&indents); return res; } static string indent_v__ast__Struct_str(v__ast__Struct it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t75 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); string _t76 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); string _t77 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); string _t78 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); string _t79 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); string _t80 = v__ast__Type_str(it.parent_type); string res = str_intp( 51, _MOV((StrIntpData[]){ {_SLIT("ast.Struct{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t75}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t76}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t77}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t78}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t79}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t80}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_typedef: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_typedef ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_union: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_union ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_heap: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_heap ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_minify: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_minify ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t80); string_free(&_t79); string_free(&_t78); string_free(&_t77); string_free(&_t76); string_free(&_t75); string_free(&indents); return res; } static string indent_v__ast__SumType_str(v__ast__SumType it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t81 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); string _t82 = indent_Array_v__ast__Type_str(it.variants, indent_count + 1); string _t83 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); string _t84 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); string _t85 = v__ast__Type_str(it.parent_type); string res = str_intp( 35, _MOV((StrIntpData[]){ {_SLIT("ast.SumType{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t81}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" variants: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t82}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t83}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t84}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t85}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" found_fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.found_fields ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t85); string_free(&_t84); string_free(&_t83); string_free(&_t82); string_free(&_t81); string_free(&indents); return res; } static string indent_v__ast__Thread_str(v__ast__Thread it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t86 = v__ast__Type_str(it.return_type); string res = str_intp( 7, _MOV((StrIntpData[]){ {_SLIT("ast.Thread{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" return_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t86}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t86); string_free(&indents); return res; } static string indent_v__ast__ScopeObject_str(v__ast__ScopeObject x, int indent_count) { switch(x._typ) { case 342: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ScopeObject("), 0xfe10, {.d_s = indent_v__ast__AsmRegister_str(*(v__ast__AsmRegister*)x._v__ast__AsmRegister, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 343: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ScopeObject("), 0xfe10, {.d_s = indent_v__ast__ConstField_str(*(v__ast__ConstField*)x._v__ast__ConstField, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 344: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ScopeObject("), 0xfe10, {.d_s = indent_v__ast__GlobalField_str(*(v__ast__GlobalField*)x._v__ast__GlobalField, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 345: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.ScopeObject("), 0xfe10, {.d_s = indent_v__ast__Var_str(*(v__ast__Var*)x._v__ast__Var, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); default: return _SLIT("unknown sum type value"); } } static string indent_v__ast__IdentInfo_str(v__ast__IdentInfo x, int indent_count) { switch(x._typ) { case 397: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.IdentInfo("), 0xfe10, {.d_s = indent_v__ast__IdentFn_str(*(v__ast__IdentFn*)x._v__ast__IdentFn, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); case 398: return str_intp(2, _MOV((StrIntpData[]){ {_SLIT("ast.IdentInfo("), 0xfe10, {.d_s = indent_v__ast__IdentVar_str(*(v__ast__IdentVar*)x._v__ast__IdentVar, indent_count)}}, {_SLIT(")"), 0, {.d_c = 0 }} })); default: return _SLIT("unknown sum type value"); } } static string indent_v__ast__Comment_str(v__ast__Comment it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t87 = indent_v__token__Pos_str(it.pos, indent_count + 1); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("ast.Comment{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" text: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.text}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_multi: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_multi ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t87}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t87); string_free(&indents); return res; } static string indent_v__ast__Param_str(v__ast__Param it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t88 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); string _t89 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t90 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); string _t91 = v__ast__Type_str(it.typ); string res = str_intp( 43, _MOV((StrIntpData[]){ {_SLIT("ast.Param{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t88}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t89}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t90}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t91}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_shared: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_shared ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_atomic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_atomic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_auto_rec: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_auto_rec ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_hidden: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_hidden ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t91); string_free(&_t90); string_free(&_t89); string_free(&_t88); string_free(&indents); return res; } static string indent_v__ast__AsmRegister_str(v__ast__AsmRegister it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t92 = v__ast__Type_str(it.typ); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("ast.AsmRegister{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t92}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" size: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.size}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t92); string_free(&indents); return res; } static string indent_v__ast__ConstField_str(v__ast__ConstField it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t93 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t94 = v__ast__Expr_str(it.expr); string _t95 = v__ast__Type_str(it.typ); string _t96 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); string _t97 = indent_Array_v__ast__Comment_str(it.end_comments, indent_count + 1); string _t98 = indent_v__ast__ComptTimeConstValue_str(it.comptime_expr_value, indent_count + 1); string res = str_intp( 43, _MOV((StrIntpData[]){ {_SLIT("ast.ConstField{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" mod: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.mod}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_pub: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_pub ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_markused: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_markused ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t93}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t94}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t95}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t96}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" end_comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t97}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comptime_expr_value: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t98}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t98); string_free(&_t97); string_free(&_t96); string_free(&_t95); string_free(&_t94); string_free(&_t93); string_free(&indents); return res; } static string indent_v__ast__GlobalField_str(v__ast__GlobalField it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t99 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); string _t100 = v__ast__Expr_str(it.expr); string _t101 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t102 = indent_v__token__Pos_str(it.typ_pos, indent_count + 1); string _t103 = v__ast__Type_str(it.typ); string res = str_intp( 39, _MOV((StrIntpData[]){ {_SLIT("ast.GlobalField{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t99}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t100}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t101}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t102}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t103}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_expr ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_markused: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_markused ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_volatile: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_volatile ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t103); string_free(&_t102); string_free(&_t101); string_free(&_t100); string_free(&_t99); string_free(&indents); return res; } static string indent_v__ast__Var_str(v__ast__Var it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t104 = indent_Array_v__ast__Type_str(it.smartcasts, indent_count + 1); string _t105 = v__ast__Expr_str(it.expr); string _t106 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t107 = v__ast__Type_str(it.typ); string _t108 = v__ast__Type_str(it.orig_type); string _t109 = v__ast__ComptimeVarKind_str((it.ct_type_var)); string _t110 = v__ast__ShareType_str((it.share)); string res = str_intp( 83, _MOV((StrIntpData[]){ {_SLIT("ast.Var{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" smartcasts: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t104}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t105}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t106}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t107}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" orig_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t108}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" ct_type_var: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t109}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" share: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t110}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_autofree_tmp: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_autofree_tmp ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_inherited: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_inherited ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_inherited: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_inherited ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_arg: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_arg ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_auto_deref: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_auto_deref ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_used: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_used ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_changed: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_changed ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_or: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_or ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_tmp: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_tmp ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_auto_heap: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_auto_heap ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_stack_obj: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_stack_obj ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t110); string_free(&_t109); string_free(&_t108); string_free(&_t107); string_free(&_t106); string_free(&_t105); string_free(&_t104); string_free(&indents); return res; } static string indent_v__ast__IdentFn_str(v__ast__IdentFn it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t111 = v__ast__Type_str(it.typ); string res = str_intp( 7, _MOV((StrIntpData[]){ {_SLIT("ast.IdentFn{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t111}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t111); string_free(&indents); return res; } static string indent_v__ast__IdentVar_str(v__ast__IdentVar it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t112 = v__ast__Type_str(it.typ); string _t113 = v__ast__ShareType_str((it.share)); string res = str_intp( 27, _MOV((StrIntpData[]){ {_SLIT("ast.IdentVar{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t112}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" share: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t113}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_static: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_static ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_volatile: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_volatile ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_option: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_option ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t113); string_free(&_t112); string_free(&indents); return res; } static string indent_v__ast__StructField_str(v__ast__StructField it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t114 = indent_v__ast__StructDecl_str(it.anon_struct_decl, indent_count + 1); string _t115 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); string _t116 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); string _t117 = v__ast__Expr_str(it.default_expr); string _t118 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t119 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); string _t120 = indent_v__token__Pos_str(it.option_pos, indent_count + 1); string _t121 = v__ast__Type_str(it.default_expr_typ); string _t122 = v__ast__Type_str(it.typ); string _t123 = v__ast__Type_str(it.unaliased_typ); string res = str_intp( 83, _MOV((StrIntpData[]){ {_SLIT("ast.StructField{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" anon_struct_decl: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t114}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t115}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t116}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_val: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.default_val}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t117}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t118}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t119}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" option_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t120}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" i: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.i}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr_typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t121}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t122}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" unaliased_typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t123}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_default_expr ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_pub: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_pub ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_global: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_global ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_volatile: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_volatile ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_deprecated: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_deprecated ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_recursive: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_recursive ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t123); string_free(&_t122); string_free(&_t121); string_free(&_t120); string_free(&_t119); string_free(&_t118); string_free(&_t117); string_free(&_t116); string_free(&_t115); string_free(&_t114); string_free(&indents); return res; } static string indent_v__ast__StructDecl_str(v__ast__StructDecl it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t124 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); string _t125 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); string _t126 = indent_Array_v__ast__Comment_str(it.pre_comments, indent_count + 1); string _t127 = indent_Array_v__ast__Comment_str(it.end_comments, indent_count + 1); string _t128 = indent_Array_v__ast__Embed_str(it.embeds, indent_count + 1); string _t129 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); string _t130 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t131 = v__ast__Language_str((it.language)); string res = str_intp( 67, _MOV((StrIntpData[]){ {_SLIT("ast.StructDecl{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t124}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t125}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pre_comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t126}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" end_comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t127}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t128}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t129}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t130}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" mut_pos: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.mut_pos}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pub_pos: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.pub_pos}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pub_mut_pos: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.pub_mut_pos}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" global_pos: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.global_pos}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" module_pos: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.module_pos}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t131}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_pub: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_pub ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_union: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_union ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t131); string_free(&_t130); string_free(&_t129); string_free(&_t128); string_free(&_t127); string_free(&_t126); string_free(&_t125); string_free(&_t124); string_free(&indents); return res; } static string indent_v__ast__Embed_str(v__ast__Embed it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t132 = v__ast__Type_str(it.typ); string _t133 = indent_v__token__Pos_str(it.pos, indent_count + 1); string _t134 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("ast.Embed{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t132}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t133}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t134}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t134); string_free(&_t133); string_free(&_t132); string_free(&indents); return res; } static inline v__ast__Expr v__ast__EmptyExpr_to_sumtype_v__ast__Expr(v__ast__EmptyExpr* x) { v__ast__EmptyExpr* ptr = memdup(x, sizeof(v__ast__EmptyExpr)); return (v__ast__Expr){ ._v__ast__EmptyExpr = ptr, ._typ = 279}; } static inline v__ast__Stmt v__ast__EmptyStmt_to_sumtype_v__ast__Stmt(v__ast__EmptyStmt* x) { v__ast__EmptyStmt* ptr = memdup(x, sizeof(v__ast__EmptyStmt)); return (v__ast__Stmt){ ._v__ast__EmptyStmt = ptr, ._typ = 324, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__EmptyStmt, pos))}; } static inline v__ast__Node v__ast__EmptyNode_to_sumtype_v__ast__Node(v__ast__EmptyNode* x) { v__ast__EmptyNode* ptr = memdup(x, sizeof(v__ast__EmptyNode)); return (v__ast__Node){ ._v__ast__EmptyNode = ptr, ._typ = 348}; } static inline v__ast__Node v__ast__Expr_to_sumtype_v__ast__Node(v__ast__Expr* x) { v__ast__Expr* ptr = memdup(x, sizeof(v__ast__Expr)); return (v__ast__Node){ ._v__ast__Expr = ptr, ._typ = 315}; } static inline v__ast__Expr v__ast__Ident_to_sumtype_v__ast__Expr(v__ast__Ident* x) { v__ast__Ident* ptr = memdup(x, sizeof(v__ast__Ident)); return (v__ast__Expr){ ._v__ast__Ident = ptr, ._typ = 283}; } static inline v__ast__Node v__ast__Stmt_to_sumtype_v__ast__Node(v__ast__Stmt* x) { v__ast__Stmt* ptr = memdup(x, sizeof(v__ast__Stmt)); return (v__ast__Node){ ._v__ast__Stmt = ptr, ._typ = 341}; } static inline v__ast__Node v__ast__StructInitField_to_sumtype_v__ast__Node(v__ast__StructInitField* x) { v__ast__StructInitField* ptr = memdup(x, sizeof(v__ast__StructInitField)); return (v__ast__Node){ ._v__ast__StructInitField = ptr, ._typ = 355}; } static inline v__ast__Stmt v__ast__FnDecl_to_sumtype_v__ast__Stmt(v__ast__FnDecl* x) { v__ast__FnDecl* ptr = memdup(x, sizeof(v__ast__FnDecl)); return (v__ast__Stmt){ ._v__ast__FnDecl = ptr, ._typ = 194, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__FnDecl, pos))}; } static inline v__ast__Node v__ast__CallArg_to_sumtype_v__ast__Node(v__ast__CallArg* x) { v__ast__CallArg* ptr = memdup(x, sizeof(v__ast__CallArg)); return (v__ast__Node){ ._v__ast__CallArg = ptr, ._typ = 347}; } static inline v__ast__Expr v__ast__OrExpr_to_sumtype_v__ast__Expr(v__ast__OrExpr* x) { v__ast__OrExpr* ptr = memdup(x, sizeof(v__ast__OrExpr)); return (v__ast__Expr){ ._v__ast__OrExpr = ptr, ._typ = 299}; } static inline v__ast__Node v__ast__IfBranch_to_sumtype_v__ast__Node(v__ast__IfBranch* x) { v__ast__IfBranch* ptr = memdup(x, sizeof(v__ast__IfBranch)); return (v__ast__Node){ ._v__ast__IfBranch = ptr, ._typ = 350}; } static inline v__ast__Node v__ast__MatchBranch_to_sumtype_v__ast__Node(v__ast__MatchBranch* x) { v__ast__MatchBranch* ptr = memdup(x, sizeof(v__ast__MatchBranch)); return (v__ast__Node){ ._v__ast__MatchBranch = ptr, ._typ = 351}; } static inline v__ast__Node v__ast__SelectBranch_to_sumtype_v__ast__Node(v__ast__SelectBranch* x) { v__ast__SelectBranch* ptr = memdup(x, sizeof(v__ast__SelectBranch)); return (v__ast__Node){ ._v__ast__SelectBranch = ptr, ._typ = 353}; } static inline v__ast__Node v__ast__StructField_to_sumtype_v__ast__Node(v__ast__StructField* x) { v__ast__StructField* ptr = memdup(x, sizeof(v__ast__StructField)); return (v__ast__Node){ ._v__ast__StructField = ptr, ._typ = 354}; } static inline v__ast__Node v__ast__GlobalField_to_sumtype_v__ast__Node(v__ast__GlobalField* x) { v__ast__GlobalField* ptr = memdup(x, sizeof(v__ast__GlobalField)); return (v__ast__Node){ ._v__ast__GlobalField = ptr, ._typ = 344}; } static inline v__ast__Node v__ast__ConstField_to_sumtype_v__ast__Node(v__ast__ConstField* x) { v__ast__ConstField* ptr = memdup(x, sizeof(v__ast__ConstField)); return (v__ast__Node){ ._v__ast__ConstField = ptr, ._typ = 343}; } static inline v__ast__Node v__ast__EnumField_to_sumtype_v__ast__Node(v__ast__EnumField* x) { v__ast__EnumField* ptr = memdup(x, sizeof(v__ast__EnumField)); return (v__ast__Node){ ._v__ast__EnumField = ptr, ._typ = 349}; } static inline v__ast__Node v__ast__Param_to_sumtype_v__ast__Node(v__ast__Param* x) { v__ast__Param* ptr = memdup(x, sizeof(v__ast__Param)); return (v__ast__Node){ ._v__ast__Param = ptr, ._typ = 352}; } static inline v__ast__Expr v__ast__TypeNode_to_sumtype_v__ast__Expr(v__ast__TypeNode* x) { v__ast__TypeNode* ptr = memdup(x, sizeof(v__ast__TypeNode)); return (v__ast__Expr){ ._v__ast__TypeNode = ptr, ._typ = 312}; } static inline v__ast__ScopeObject v__ast__AsmRegister_to_sumtype_v__ast__ScopeObject(v__ast__AsmRegister* x) { v__ast__AsmRegister* ptr = memdup(x, sizeof(v__ast__AsmRegister)); return (v__ast__ScopeObject){ ._v__ast__AsmRegister = ptr, ._typ = 342, .name = (string*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AsmRegister, name)), .typ = (v__ast__Type*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AsmRegister, typ))}; } static inline v__ast__ComptTimeConstValue v__ast__EmptyExpr_to_sumtype_v__ast__ComptTimeConstValue(v__ast__EmptyExpr* x) { v__ast__EmptyExpr* ptr = memdup(x, sizeof(v__ast__EmptyExpr)); return (v__ast__ComptTimeConstValue){ ._v__ast__EmptyExpr = ptr, ._typ = 279}; } static inline v__ast__Expr v__ast__ArrayInit_to_sumtype_v__ast__Expr(v__ast__ArrayInit* x) { v__ast__ArrayInit* ptr = memdup(x, sizeof(v__ast__ArrayInit)); return (v__ast__Expr){ ._v__ast__ArrayInit = ptr, ._typ = 263}; } static inline v__ast__Expr v__ast__StringLiteral_to_sumtype_v__ast__Expr(v__ast__StringLiteral* x) { v__ast__StringLiteral* ptr = memdup(x, sizeof(v__ast__StringLiteral)); return (v__ast__Expr){ ._v__ast__StringLiteral = ptr, ._typ = 310}; } static inline v__ast__Expr v__ast__MapInit_to_sumtype_v__ast__Expr(v__ast__MapInit* x) { v__ast__MapInit* ptr = memdup(x, sizeof(v__ast__MapInit)); return (v__ast__Expr){ ._v__ast__MapInit = ptr, ._typ = 293}; } static inline v__ast__Expr v__ast__StructInit_to_sumtype_v__ast__Expr(v__ast__StructInit* x) { v__ast__StructInit* ptr = memdup(x, sizeof(v__ast__StructInit)); return (v__ast__Expr){ ._v__ast__StructInit = ptr, ._typ = 311}; } static inline v__ast__TypeInfo v__ast__SumType_to_sumtype_v__ast__TypeInfo(v__ast__SumType* x) { v__ast__SumType* ptr = memdup(x, sizeof(v__ast__SumType)); return (v__ast__TypeInfo){ ._v__ast__SumType = ptr, ._typ = 460}; } static inline v__ast__TypeInfo v__ast__Chan_to_sumtype_v__ast__TypeInfo(v__ast__Chan* x) { v__ast__Chan* ptr = memdup(x, sizeof(v__ast__Chan)); return (v__ast__TypeInfo){ ._v__ast__Chan = ptr, ._typ = 465}; } static inline v__ast__TypeInfo v__ast__Map_to_sumtype_v__ast__TypeInfo(v__ast__Map* x) { v__ast__Map* ptr = memdup(x, sizeof(v__ast__Map)); return (v__ast__TypeInfo){ ._v__ast__Map = ptr, ._typ = 434}; } static inline v__ast__TypeInfo v__ast__Thread_to_sumtype_v__ast__TypeInfo(v__ast__Thread* x) { v__ast__Thread* ptr = memdup(x, sizeof(v__ast__Thread)); return (v__ast__TypeInfo){ ._v__ast__Thread = ptr, ._typ = 466}; } static inline v__ast__TypeInfo v__ast__Struct_to_sumtype_v__ast__TypeInfo(v__ast__Struct* x) { v__ast__Struct* ptr = memdup(x, sizeof(v__ast__Struct)); return (v__ast__TypeInfo){ ._v__ast__Struct = ptr, ._typ = 437}; } static inline v__ast__TypeInfo v__ast__Array_to_sumtype_v__ast__TypeInfo(v__ast__Array* x) { v__ast__Array* ptr = memdup(x, sizeof(v__ast__Array)); return (v__ast__TypeInfo){ ._v__ast__Array = ptr, ._typ = 433}; } static inline v__ast__TypeInfo v__ast__ArrayFixed_to_sumtype_v__ast__TypeInfo(v__ast__ArrayFixed* x) { v__ast__ArrayFixed* ptr = memdup(x, sizeof(v__ast__ArrayFixed)); return (v__ast__TypeInfo){ ._v__ast__ArrayFixed = ptr, ._typ = 464}; } static inline v__ast__TypeInfo v__ast__MultiReturn_to_sumtype_v__ast__TypeInfo(v__ast__MultiReturn* x) { v__ast__MultiReturn* ptr = memdup(x, sizeof(v__ast__MultiReturn)); return (v__ast__TypeInfo){ ._v__ast__MultiReturn = ptr, ._typ = 467}; } static inline v__ast__TypeInfo v__ast__FnType_to_sumtype_v__ast__TypeInfo(v__ast__FnType* x) { v__ast__FnType* ptr = memdup(x, sizeof(v__ast__FnType)); return (v__ast__TypeInfo){ ._v__ast__FnType = ptr, ._typ = 468}; } static inline v__ast__Expr v__ast__None_to_sumtype_v__ast__Expr(v__ast__None* x) { v__ast__None* ptr = memdup(x, sizeof(v__ast__None)); return (v__ast__Expr){ ._v__ast__None = ptr, ._typ = 297}; } static inline v__ast__TypeInfo v__ast__Interface_to_sumtype_v__ast__TypeInfo(v__ast__Interface* x) { v__ast__Interface* ptr = memdup(x, sizeof(v__ast__Interface)); return (v__ast__TypeInfo){ ._v__ast__Interface = ptr, ._typ = 458}; } static inline v__ast__Stmt v__ast__AssertStmt_to_sumtype_v__ast__Stmt(v__ast__AssertStmt* x) { v__ast__AssertStmt* ptr = memdup(x, sizeof(v__ast__AssertStmt)); return (v__ast__Stmt){ ._v__ast__AssertStmt = ptr, ._typ = 317, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AssertStmt, pos))}; } static inline v__ast__Expr v__ast__IfExpr_to_sumtype_v__ast__Expr(v__ast__IfExpr* x) { v__ast__IfExpr* ptr = memdup(x, sizeof(v__ast__IfExpr)); return (v__ast__Expr){ ._v__ast__IfExpr = ptr, ._typ = 284}; } static inline v__ast__Expr v__ast__BoolLiteral_to_sumtype_v__ast__Expr(v__ast__BoolLiteral* x) { v__ast__BoolLiteral* ptr = memdup(x, sizeof(v__ast__BoolLiteral)); return (v__ast__Expr){ ._v__ast__BoolLiteral = ptr, ._typ = 267}; } static inline v__ast__Expr v__ast__IntegerLiteral_to_sumtype_v__ast__Expr(v__ast__IntegerLiteral* x) { v__ast__IntegerLiteral* ptr = memdup(x, sizeof(v__ast__IntegerLiteral)); return (v__ast__Expr){ ._v__ast__IntegerLiteral = ptr, ._typ = 288}; } static inline v__ast__Expr v__ast__FloatLiteral_to_sumtype_v__ast__Expr(v__ast__FloatLiteral* x) { v__ast__FloatLiteral* ptr = memdup(x, sizeof(v__ast__FloatLiteral)); return (v__ast__Expr){ ._v__ast__FloatLiteral = ptr, ._typ = 281}; } static inline v__ast__Expr v__ast__MatchExpr_to_sumtype_v__ast__Expr(v__ast__MatchExpr* x) { v__ast__MatchExpr* ptr = memdup(x, sizeof(v__ast__MatchExpr)); return (v__ast__Expr){ ._v__ast__MatchExpr = ptr, ._typ = 294}; } static inline v__ast__Stmt v__ast__ForCStmt_to_sumtype_v__ast__Stmt(v__ast__ForCStmt* x) { v__ast__ForCStmt* ptr = memdup(x, sizeof(v__ast__ForCStmt)); return (v__ast__Stmt){ ._v__ast__ForCStmt = ptr, ._typ = 327, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ForCStmt, pos))}; } static inline v__ast__Stmt v__ast__ForStmt_to_sumtype_v__ast__Stmt(v__ast__ForStmt* x) { v__ast__ForStmt* ptr = memdup(x, sizeof(v__ast__ForStmt)); return (v__ast__Stmt){ ._v__ast__ForStmt = ptr, ._typ = 329, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ForStmt, pos))}; } static inline v__ast__Stmt v__ast__InterfaceDecl_to_sumtype_v__ast__Stmt(v__ast__InterfaceDecl* x) { v__ast__InterfaceDecl* ptr = memdup(x, sizeof(v__ast__InterfaceDecl)); return (v__ast__Stmt){ ._v__ast__InterfaceDecl = ptr, ._typ = 335, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__InterfaceDecl, pos))}; } static inline v__ast__Expr v__ast__CallExpr_to_sumtype_v__ast__Expr(v__ast__CallExpr* x) { v__ast__CallExpr* ptr = memdup(x, sizeof(v__ast__CallExpr)); return (v__ast__Expr){ ._v__ast__CallExpr = ptr, ._typ = 269}; } static inline v__ast__Expr v__ast__InfixExpr_to_sumtype_v__ast__Expr(v__ast__InfixExpr* x) { v__ast__InfixExpr* ptr = memdup(x, sizeof(v__ast__InfixExpr)); return (v__ast__Expr){ ._v__ast__InfixExpr = ptr, ._typ = 287}; } static inline v__ast__Expr v__ast__SqlExpr_to_sumtype_v__ast__Expr(v__ast__SqlExpr* x) { v__ast__SqlExpr* ptr = memdup(x, sizeof(v__ast__SqlExpr)); return (v__ast__Expr){ ._v__ast__SqlExpr = ptr, ._typ = 308}; } static inline v__ast__Stmt v__ast__ExprStmt_to_sumtype_v__ast__Stmt(v__ast__ExprStmt* x) { v__ast__ExprStmt* ptr = memdup(x, sizeof(v__ast__ExprStmt)); return (v__ast__Stmt){ ._v__ast__ExprStmt = ptr, ._typ = 326, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ExprStmt, pos))}; } static inline v__ast__Expr v__ast__AnonFn_to_sumtype_v__ast__Expr(v__ast__AnonFn* x) { v__ast__AnonFn* ptr = memdup(x, sizeof(v__ast__AnonFn)); return (v__ast__Expr){ ._v__ast__AnonFn = ptr, ._typ = 261}; } static inline v__ast__Expr v__ast__ChanInit_to_sumtype_v__ast__Expr(v__ast__ChanInit* x) { v__ast__ChanInit* ptr = memdup(x, sizeof(v__ast__ChanInit)); return (v__ast__Expr){ ._v__ast__ChanInit = ptr, ._typ = 271}; } static inline v__ast__Expr v__ast__CTempVar_to_sumtype_v__ast__Expr(v__ast__CTempVar* x) { v__ast__CTempVar* ptr = memdup(x, sizeof(v__ast__CTempVar)); return (v__ast__Expr){ ._v__ast__CTempVar = ptr, ._typ = 268}; } static inline v__ast__Expr v__ast__SelectorExpr_to_sumtype_v__ast__Expr(v__ast__SelectorExpr* x) { v__ast__SelectorExpr* ptr = memdup(x, sizeof(v__ast__SelectorExpr)); return (v__ast__Expr){ ._v__ast__SelectorExpr = ptr, ._typ = 305}; } static inline v__ast__Expr v__ast__IndexExpr_to_sumtype_v__ast__Expr(v__ast__IndexExpr* x) { v__ast__IndexExpr* ptr = memdup(x, sizeof(v__ast__IndexExpr)); return (v__ast__Expr){ ._v__ast__IndexExpr = ptr, ._typ = 286}; } static inline v__ast__Stmt v__ast__ForInStmt_to_sumtype_v__ast__Stmt(v__ast__ForInStmt* x) { v__ast__ForInStmt* ptr = memdup(x, sizeof(v__ast__ForInStmt)); return (v__ast__Stmt){ ._v__ast__ForInStmt = ptr, ._typ = 328, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ForInStmt, pos))}; } static inline v__ast__ScopeObject v__ast__Var_to_sumtype_v__ast__ScopeObject(v__ast__Var* x) { v__ast__Var* ptr = memdup(x, sizeof(v__ast__Var)); return (v__ast__ScopeObject){ ._v__ast__Var = ptr, ._typ = 345, .name = (string*)((char*)ptr + __offsetof_ptr(ptr, v__ast__Var, name)), .typ = (v__ast__Type*)((char*)ptr + __offsetof_ptr(ptr, v__ast__Var, typ))}; } static inline v__ast__Expr v__ast__CastExpr_to_sumtype_v__ast__Expr(v__ast__CastExpr* x) { v__ast__CastExpr* ptr = memdup(x, sizeof(v__ast__CastExpr)); return (v__ast__Expr){ ._v__ast__CastExpr = ptr, ._typ = 270}; } static inline v__ast__Expr v__ast__PrefixExpr_to_sumtype_v__ast__Expr(v__ast__PrefixExpr* x) { v__ast__PrefixExpr* ptr = memdup(x, sizeof(v__ast__PrefixExpr)); return (v__ast__Expr){ ._v__ast__PrefixExpr = ptr, ._typ = 302}; } static inline v__ast__IdentInfo v__ast__IdentVar_to_sumtype_v__ast__IdentInfo(v__ast__IdentVar* x) { v__ast__IdentVar* ptr = memdup(x, sizeof(v__ast__IdentVar)); return (v__ast__IdentInfo){ ._v__ast__IdentVar = ptr, ._typ = 398}; } static inline v__ast__AsmArg v__ast__AsmRegister_to_sumtype_v__ast__AsmArg(v__ast__AsmRegister* x) { v__ast__AsmRegister* ptr = memdup(x, sizeof(v__ast__AsmRegister)); return (v__ast__AsmArg){ ._v__ast__AsmRegister = ptr, ._typ = 342}; } static inline v__ast__ScopeObject v__ast__ConstField_to_sumtype_v__ast__ScopeObject(v__ast__ConstField* x) { v__ast__ConstField* ptr = memdup(x, sizeof(v__ast__ConstField)); return (v__ast__ScopeObject){ ._v__ast__ConstField = ptr, ._typ = 343, .name = (string*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ConstField, name)), .typ = (v__ast__Type*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ConstField, typ))}; } static inline v__ast__IdentInfo v__ast__IdentFn_to_sumtype_v__ast__IdentInfo(v__ast__IdentFn* x) { v__ast__IdentFn* ptr = memdup(x, sizeof(v__ast__IdentFn)); return (v__ast__IdentInfo){ ._v__ast__IdentFn = ptr, ._typ = 397}; } static inline v__ast__ComptTimeConstValue i64_to_sumtype_v__ast__ComptTimeConstValue(i64* x) { i64* ptr = memdup(x, sizeof(i64)); return (v__ast__ComptTimeConstValue){ ._i64 = ptr, ._typ = 8}; } static inline v__ast__ComptTimeConstValue int_to_sumtype_v__ast__ComptTimeConstValue(int* x) { int* ptr = memdup(x, sizeof(int)); return (v__ast__ComptTimeConstValue){ ._int = ptr, ._typ = 7}; } static inline v__ast__ComptTimeConstValue f64_to_sumtype_v__ast__ComptTimeConstValue(f64* x) { f64* ptr = memdup(x, sizeof(f64)); return (v__ast__ComptTimeConstValue){ ._f64 = ptr, ._typ = 16}; } static inline v__ast__ComptTimeConstValue u64_to_sumtype_v__ast__ComptTimeConstValue(u64* x) { u64* ptr = memdup(x, sizeof(u64)); return (v__ast__ComptTimeConstValue){ ._u64 = ptr, ._typ = 13}; } static inline v__ast__ComptTimeConstValue string_to_sumtype_v__ast__ComptTimeConstValue(string* x) { string* ptr = memdup(x, sizeof(string)); return (v__ast__ComptTimeConstValue){ ._string = ptr, ._typ = 20}; } static inline v__ast__ComptTimeConstValue rune_to_sumtype_v__ast__ComptTimeConstValue(rune* x) { rune* ptr = memdup(x, sizeof(rune)); return (v__ast__ComptTimeConstValue){ ._rune = ptr, ._typ = 21}; } static inline v__ast__ComptTimeConstValue i8_to_sumtype_v__ast__ComptTimeConstValue(i8* x) { i8* ptr = memdup(x, sizeof(i8)); return (v__ast__ComptTimeConstValue){ ._i8 = ptr, ._typ = 5}; } static inline v__ast__ComptTimeConstValue i16_to_sumtype_v__ast__ComptTimeConstValue(i16* x) { i16* ptr = memdup(x, sizeof(i16)); return (v__ast__ComptTimeConstValue){ ._i16 = ptr, ._typ = 6}; } static inline v__ast__ComptTimeConstValue u8_to_sumtype_v__ast__ComptTimeConstValue(u8* x) { u8* ptr = memdup(x, sizeof(u8)); return (v__ast__ComptTimeConstValue){ ._u8 = ptr, ._typ = 10}; } static inline v__ast__ComptTimeConstValue u16_to_sumtype_v__ast__ComptTimeConstValue(u16* x) { u16* ptr = memdup(x, sizeof(u16)); return (v__ast__ComptTimeConstValue){ ._u16 = ptr, ._typ = 11}; } static inline v__ast__ComptTimeConstValue u32_to_sumtype_v__ast__ComptTimeConstValue(u32* x) { u32* ptr = memdup(x, sizeof(u32)); return (v__ast__ComptTimeConstValue){ ._u32 = ptr, ._typ = 12}; } static inline v__ast__ComptTimeConstValue f32_to_sumtype_v__ast__ComptTimeConstValue(f32* x) { f32* ptr = memdup(x, sizeof(f32)); return (v__ast__ComptTimeConstValue){ ._f32 = ptr, ._typ = 15}; } static inline v__ast__ComptTimeConstValue voidptr_to_sumtype_v__ast__ComptTimeConstValue(voidptr* x) { voidptr* ptr = memdup(x, sizeof(voidptr)); return (v__ast__ComptTimeConstValue){ ._voidptr = ptr, ._typ = 2}; } static inline v__ast__Stmt v__ast__Return_to_sumtype_v__ast__Stmt(v__ast__Return* x) { v__ast__Return* ptr = memdup(x, sizeof(v__ast__Return)); return (v__ast__Stmt){ ._v__ast__Return = ptr, ._typ = 337, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__Return, pos))}; } static inline v__ast__Expr v__ast__ComptimeSelector_to_sumtype_v__ast__Expr(v__ast__ComptimeSelector* x) { v__ast__ComptimeSelector* ptr = memdup(x, sizeof(v__ast__ComptimeSelector)); return (v__ast__Expr){ ._v__ast__ComptimeSelector = ptr, ._typ = 275}; } static inline v__ast__Expr v__ast__AsCast_to_sumtype_v__ast__Expr(v__ast__AsCast* x) { v__ast__AsCast* ptr = memdup(x, sizeof(v__ast__AsCast)); return (v__ast__Expr){ ._v__ast__AsCast = ptr, ._typ = 264}; } static inline v__ast__Expr v__ast__ParExpr_to_sumtype_v__ast__Expr(v__ast__ParExpr* x) { v__ast__ParExpr* ptr = memdup(x, sizeof(v__ast__ParExpr)); return (v__ast__Expr){ ._v__ast__ParExpr = ptr, ._typ = 300}; } static inline v__ast__TypeInfo v__ast__Aggregate_to_sumtype_v__ast__TypeInfo(v__ast__Aggregate* x) { v__ast__Aggregate* ptr = memdup(x, sizeof(v__ast__Aggregate)); return (v__ast__TypeInfo){ ._v__ast__Aggregate = ptr, ._typ = 453}; } static inline v__checker__ORMExpr v__ast__SqlExpr_to_sumtype_v__checker__ORMExpr(v__ast__SqlExpr* x) { v__ast__SqlExpr* ptr = memdup(x, sizeof(v__ast__SqlExpr)); return (v__checker__ORMExpr){ ._v__ast__SqlExpr = ptr, ._typ = 308, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SqlExpr, pos)), .db_expr = (v__ast__Expr*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SqlExpr, db_expr)), .or_expr = (v__ast__OrExpr*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SqlExpr, or_expr))}; } static inline v__checker__ORMExpr v__ast__SqlStmt_to_sumtype_v__checker__ORMExpr(v__ast__SqlStmt* x) { v__ast__SqlStmt* ptr = memdup(x, sizeof(v__ast__SqlStmt)); return (v__checker__ORMExpr){ ._v__ast__SqlStmt = ptr, ._typ = 339, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SqlStmt, pos)), .db_expr = (v__ast__Expr*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SqlStmt, db_expr)), .or_expr = (v__ast__OrExpr*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SqlStmt, or_expr))}; } static inline v__ast__Stmt v__ast__NodeError_to_sumtype_v__ast__Stmt(v__ast__NodeError* x) { v__ast__NodeError* ptr = memdup(x, sizeof(v__ast__NodeError)); return (v__ast__Stmt){ ._v__ast__NodeError = ptr, ._typ = 296, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__NodeError, pos))}; } static inline v__ast__Stmt v__ast__AssignStmt_to_sumtype_v__ast__Stmt(v__ast__AssignStmt* x) { v__ast__AssignStmt* ptr = memdup(x, sizeof(v__ast__AssignStmt)); return (v__ast__Stmt){ ._v__ast__AssignStmt = ptr, ._typ = 318, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AssignStmt, pos))}; } static inline v__ast__Expr v__ast__ComptimeCall_to_sumtype_v__ast__Expr(v__ast__ComptimeCall* x) { v__ast__ComptimeCall* ptr = memdup(x, sizeof(v__ast__ComptimeCall)); return (v__ast__Expr){ ._v__ast__ComptimeCall = ptr, ._typ = 274}; } static inline v__ast__Expr v__ast__NodeError_to_sumtype_v__ast__Expr(v__ast__NodeError* x) { v__ast__NodeError* ptr = memdup(x, sizeof(v__ast__NodeError)); return (v__ast__Expr){ ._v__ast__NodeError = ptr, ._typ = 296}; } static inline v__ast__Expr v__ast__Comment_to_sumtype_v__ast__Expr(v__ast__Comment* x) { v__ast__Comment* ptr = memdup(x, sizeof(v__ast__Comment)); return (v__ast__Expr){ ._v__ast__Comment = ptr, ._typ = 273}; } static inline v__ast__Expr v__ast__EnumVal_to_sumtype_v__ast__Expr(v__ast__EnumVal* x) { v__ast__EnumVal* ptr = memdup(x, sizeof(v__ast__EnumVal)); return (v__ast__Expr){ ._v__ast__EnumVal = ptr, ._typ = 280}; } static inline v__ast__Expr v__ast__AtExpr_to_sumtype_v__ast__Expr(v__ast__AtExpr* x) { v__ast__AtExpr* ptr = memdup(x, sizeof(v__ast__AtExpr)); return (v__ast__Expr){ ._v__ast__AtExpr = ptr, ._typ = 266}; } static inline v__ast__Expr v__ast__ComptimeType_to_sumtype_v__ast__Expr(v__ast__ComptimeType* x) { v__ast__ComptimeType* ptr = memdup(x, sizeof(v__ast__ComptimeType)); return (v__ast__Expr){ ._v__ast__ComptimeType = ptr, ._typ = 276}; } static inline v__ast__Expr v__ast__CharLiteral_to_sumtype_v__ast__Expr(v__ast__CharLiteral* x) { v__ast__CharLiteral* ptr = memdup(x, sizeof(v__ast__CharLiteral)); return (v__ast__Expr){ ._v__ast__CharLiteral = ptr, ._typ = 272}; } static inline v__ast__Expr v__ast__GoExpr_to_sumtype_v__ast__Expr(v__ast__GoExpr* x) { v__ast__GoExpr* ptr = memdup(x, sizeof(v__ast__GoExpr)); return (v__ast__Expr){ ._v__ast__GoExpr = ptr, ._typ = 282}; } static inline v__ast__Expr v__ast__SpawnExpr_to_sumtype_v__ast__Expr(v__ast__SpawnExpr* x) { v__ast__SpawnExpr* ptr = memdup(x, sizeof(v__ast__SpawnExpr)); return (v__ast__Expr){ ._v__ast__SpawnExpr = ptr, ._typ = 307}; } static inline v__ast__Expr v__ast__SelectExpr_to_sumtype_v__ast__Expr(v__ast__SelectExpr* x) { v__ast__SelectExpr* ptr = memdup(x, sizeof(v__ast__SelectExpr)); return (v__ast__Expr){ ._v__ast__SelectExpr = ptr, ._typ = 304}; } static inline v__ast__Expr v__ast__Nil_to_sumtype_v__ast__Expr(v__ast__Nil* x) { v__ast__Nil* ptr = memdup(x, sizeof(v__ast__Nil)); return (v__ast__Expr){ ._v__ast__Nil = ptr, ._typ = 295}; } static inline v__ast__Expr v__ast__UnsafeExpr_to_sumtype_v__ast__Expr(v__ast__UnsafeExpr* x) { v__ast__UnsafeExpr* ptr = memdup(x, sizeof(v__ast__UnsafeExpr)); return (v__ast__Expr){ ._v__ast__UnsafeExpr = ptr, ._typ = 314}; } static inline v__ast__Expr v__ast__LambdaExpr_to_sumtype_v__ast__Expr(v__ast__LambdaExpr* x) { v__ast__LambdaExpr* ptr = memdup(x, sizeof(v__ast__LambdaExpr)); return (v__ast__Expr){ ._v__ast__LambdaExpr = ptr, ._typ = 290}; } static inline v__ast__Expr v__ast__LockExpr_to_sumtype_v__ast__Expr(v__ast__LockExpr* x) { v__ast__LockExpr* ptr = memdup(x, sizeof(v__ast__LockExpr)); return (v__ast__Expr){ ._v__ast__LockExpr = ptr, ._typ = 292}; } static inline v__ast__Expr v__ast__TypeOf_to_sumtype_v__ast__Expr(v__ast__TypeOf* x) { v__ast__TypeOf* ptr = memdup(x, sizeof(v__ast__TypeOf)); return (v__ast__Expr){ ._v__ast__TypeOf = ptr, ._typ = 313}; } static inline v__ast__Expr v__ast__IsRefType_to_sumtype_v__ast__Expr(v__ast__IsRefType* x) { v__ast__IsRefType* ptr = memdup(x, sizeof(v__ast__IsRefType)); return (v__ast__Expr){ ._v__ast__IsRefType = ptr, ._typ = 289}; } static inline v__ast__Expr v__ast__SizeOf_to_sumtype_v__ast__Expr(v__ast__SizeOf* x) { v__ast__SizeOf* ptr = memdup(x, sizeof(v__ast__SizeOf)); return (v__ast__Expr){ ._v__ast__SizeOf = ptr, ._typ = 306}; } static inline v__ast__Expr v__ast__DumpExpr_to_sumtype_v__ast__Expr(v__ast__DumpExpr* x) { v__ast__DumpExpr* ptr = memdup(x, sizeof(v__ast__DumpExpr)); return (v__ast__Expr){ ._v__ast__DumpExpr = ptr, ._typ = 278}; } static inline v__ast__Expr v__ast__OffsetOf_to_sumtype_v__ast__Expr(v__ast__OffsetOf* x) { v__ast__OffsetOf* ptr = memdup(x, sizeof(v__ast__OffsetOf)); return (v__ast__Expr){ ._v__ast__OffsetOf = ptr, ._typ = 298}; } static inline v__ast__Expr v__ast__Likely_to_sumtype_v__ast__Expr(v__ast__Likely* x) { v__ast__Likely* ptr = memdup(x, sizeof(v__ast__Likely)); return (v__ast__Expr){ ._v__ast__Likely = ptr, ._typ = 291}; } static inline v__ast__Expr v__ast__PostfixExpr_to_sumtype_v__ast__Expr(v__ast__PostfixExpr* x) { v__ast__PostfixExpr* ptr = memdup(x, sizeof(v__ast__PostfixExpr)); return (v__ast__Expr){ ._v__ast__PostfixExpr = ptr, ._typ = 301}; } static inline v__ast__Expr v__ast__ArrayDecompose_to_sumtype_v__ast__Expr(v__ast__ArrayDecompose* x) { v__ast__ArrayDecompose* ptr = memdup(x, sizeof(v__ast__ArrayDecompose)); return (v__ast__Expr){ ._v__ast__ArrayDecompose = ptr, ._typ = 262}; } static inline v__ast__Expr v__ast__IfGuardExpr_to_sumtype_v__ast__Expr(v__ast__IfGuardExpr* x) { v__ast__IfGuardExpr* ptr = memdup(x, sizeof(v__ast__IfGuardExpr)); return (v__ast__Expr){ ._v__ast__IfGuardExpr = ptr, ._typ = 285}; } static inline v__ast__Expr v__ast__RangeExpr_to_sumtype_v__ast__Expr(v__ast__RangeExpr* x) { v__ast__RangeExpr* ptr = memdup(x, sizeof(v__ast__RangeExpr)); return (v__ast__Expr){ ._v__ast__RangeExpr = ptr, ._typ = 303}; } static inline v__ast__TypeInfo v__ast__GenericInst_to_sumtype_v__ast__TypeInfo(v__ast__GenericInst* x) { v__ast__GenericInst* ptr = memdup(x, sizeof(v__ast__GenericInst)); return (v__ast__TypeInfo){ ._v__ast__GenericInst = ptr, ._typ = 469}; } static inline v__ast__Stmt v__ast__Module_to_sumtype_v__ast__Stmt(v__ast__Module* x) { v__ast__Module* ptr = memdup(x, sizeof(v__ast__Module)); return (v__ast__Stmt){ ._v__ast__Module = ptr, ._typ = 336, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__Module, pos))}; } static inline v__ast__Stmt v__ast__Import_to_sumtype_v__ast__Stmt(v__ast__Import* x) { v__ast__Import* ptr = memdup(x, sizeof(v__ast__Import)); return (v__ast__Stmt){ ._v__ast__Import = ptr, ._typ = 334, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__Import, pos))}; } static inline v__ast__Stmt v__ast__ConstDecl_to_sumtype_v__ast__Stmt(v__ast__ConstDecl* x) { v__ast__ConstDecl* ptr = memdup(x, sizeof(v__ast__ConstDecl)); return (v__ast__Stmt){ ._v__ast__ConstDecl = ptr, ._typ = 322, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ConstDecl, pos))}; } static inline v__ast__Stmt v__ast__StructDecl_to_sumtype_v__ast__Stmt(v__ast__StructDecl* x) { v__ast__StructDecl* ptr = memdup(x, sizeof(v__ast__StructDecl)); return (v__ast__Stmt){ ._v__ast__StructDecl = ptr, ._typ = 340, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__StructDecl, pos))}; } static inline v__ast__Stmt v__ast__EnumDecl_to_sumtype_v__ast__Stmt(v__ast__EnumDecl* x) { v__ast__EnumDecl* ptr = memdup(x, sizeof(v__ast__EnumDecl)); return (v__ast__Stmt){ ._v__ast__EnumDecl = ptr, ._typ = 325, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__EnumDecl, pos))}; } static inline v__ast__Stmt v__ast__TypeDecl_to_sumtype_v__ast__Stmt(v__ast__TypeDecl* x) { v__ast__TypeDecl* ptr = memdup(x, sizeof(v__ast__TypeDecl)); return (v__ast__Stmt){ ._v__ast__TypeDecl = ptr, ._typ = 260, .pos = ptr->pos}; } static inline v__ast__Stmt v__ast__AsmStmt_to_sumtype_v__ast__Stmt(v__ast__AsmStmt* x) { v__ast__AsmStmt* ptr = memdup(x, sizeof(v__ast__AsmStmt)); return (v__ast__Stmt){ ._v__ast__AsmStmt = ptr, ._typ = 316, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AsmStmt, pos))}; } static inline v__ast__Stmt v__ast__GlobalDecl_to_sumtype_v__ast__Stmt(v__ast__GlobalDecl* x) { v__ast__GlobalDecl* ptr = memdup(x, sizeof(v__ast__GlobalDecl)); return (v__ast__Stmt){ ._v__ast__GlobalDecl = ptr, ._typ = 330, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__GlobalDecl, pos))}; } static inline v__ast__Stmt v__ast__ComptimeFor_to_sumtype_v__ast__Stmt(v__ast__ComptimeFor* x) { v__ast__ComptimeFor* ptr = memdup(x, sizeof(v__ast__ComptimeFor)); return (v__ast__Stmt){ ._v__ast__ComptimeFor = ptr, ._typ = 321, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__ComptimeFor, pos))}; } static inline v__ast__Stmt v__ast__HashStmt_to_sumtype_v__ast__Stmt(v__ast__HashStmt* x) { v__ast__HashStmt* ptr = memdup(x, sizeof(v__ast__HashStmt)); return (v__ast__Stmt){ ._v__ast__HashStmt = ptr, ._typ = 333, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__HashStmt, pos))}; } static inline v__ast__Stmt v__ast__SemicolonStmt_to_sumtype_v__ast__Stmt(v__ast__SemicolonStmt* x) { v__ast__SemicolonStmt* ptr = memdup(x, sizeof(v__ast__SemicolonStmt)); return (v__ast__Stmt){ ._v__ast__SemicolonStmt = ptr, ._typ = 338, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SemicolonStmt, pos))}; } static inline v__ast__Stmt v__ast__Block_to_sumtype_v__ast__Stmt(v__ast__Block* x) { v__ast__Block* ptr = memdup(x, sizeof(v__ast__Block)); return (v__ast__Stmt){ ._v__ast__Block = ptr, ._typ = 319, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__Block, pos))}; } static inline v__ast__Stmt v__ast__SqlStmt_to_sumtype_v__ast__Stmt(v__ast__SqlStmt* x) { v__ast__SqlStmt* ptr = memdup(x, sizeof(v__ast__SqlStmt)); return (v__ast__Stmt){ ._v__ast__SqlStmt = ptr, ._typ = 339, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SqlStmt, pos))}; } static inline v__ast__Stmt v__ast__GotoLabel_to_sumtype_v__ast__Stmt(v__ast__GotoLabel* x) { v__ast__GotoLabel* ptr = memdup(x, sizeof(v__ast__GotoLabel)); return (v__ast__Stmt){ ._v__ast__GotoLabel = ptr, ._typ = 331, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__GotoLabel, pos))}; } static inline v__ast__Stmt v__ast__BranchStmt_to_sumtype_v__ast__Stmt(v__ast__BranchStmt* x) { v__ast__BranchStmt* ptr = memdup(x, sizeof(v__ast__BranchStmt)); return (v__ast__Stmt){ ._v__ast__BranchStmt = ptr, ._typ = 320, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__BranchStmt, pos))}; } static inline v__ast__Stmt v__ast__DeferStmt_to_sumtype_v__ast__Stmt(v__ast__DeferStmt* x) { v__ast__DeferStmt* ptr = memdup(x, sizeof(v__ast__DeferStmt)); return (v__ast__Stmt){ ._v__ast__DeferStmt = ptr, ._typ = 323, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__DeferStmt, pos))}; } static inline v__ast__Stmt v__ast__GotoStmt_to_sumtype_v__ast__Stmt(v__ast__GotoStmt* x) { v__ast__GotoStmt* ptr = memdup(x, sizeof(v__ast__GotoStmt)); return (v__ast__Stmt){ ._v__ast__GotoStmt = ptr, ._typ = 332, .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__GotoStmt, pos))}; } static inline v__ast__AsmArg v__ast__FloatLiteral_to_sumtype_v__ast__AsmArg(v__ast__FloatLiteral* x) { v__ast__FloatLiteral* ptr = memdup(x, sizeof(v__ast__FloatLiteral)); return (v__ast__AsmArg){ ._v__ast__FloatLiteral = ptr, ._typ = 281}; } static inline v__ast__AsmArg v__ast__AsmDisp_to_sumtype_v__ast__AsmArg(v__ast__AsmDisp* x) { v__ast__AsmDisp* ptr = memdup(x, sizeof(v__ast__AsmDisp)); return (v__ast__AsmArg){ ._v__ast__AsmDisp = ptr, ._typ = 420}; } static inline v__ast__AsmArg v__ast__IntegerLiteral_to_sumtype_v__ast__AsmArg(v__ast__IntegerLiteral* x) { v__ast__IntegerLiteral* ptr = memdup(x, sizeof(v__ast__IntegerLiteral)); return (v__ast__AsmArg){ ._v__ast__IntegerLiteral = ptr, ._typ = 288}; } static inline v__ast__AsmArg v__ast__CharLiteral_to_sumtype_v__ast__AsmArg(v__ast__CharLiteral* x) { v__ast__CharLiteral* ptr = memdup(x, sizeof(v__ast__CharLiteral)); return (v__ast__AsmArg){ ._v__ast__CharLiteral = ptr, ._typ = 272}; } static inline v__ast__AsmArg v__ast__AsmAddressing_to_sumtype_v__ast__AsmArg(v__ast__AsmAddressing* x) { v__ast__AsmAddressing* ptr = memdup(x, sizeof(v__ast__AsmAddressing)); return (v__ast__AsmArg){ ._v__ast__AsmAddressing = ptr, ._typ = 418}; } static inline v__ast__AsmArg v__ast__AsmAlias_to_sumtype_v__ast__AsmArg(v__ast__AsmAlias* x) { v__ast__AsmAlias* ptr = memdup(x, sizeof(v__ast__AsmAlias)); return (v__ast__AsmArg){ ._v__ast__AsmAlias = ptr, ._typ = 419}; } static inline v__ast__Expr v__ast__ConcatExpr_to_sumtype_v__ast__Expr(v__ast__ConcatExpr* x) { v__ast__ConcatExpr* ptr = memdup(x, sizeof(v__ast__ConcatExpr)); return (v__ast__Expr){ ._v__ast__ConcatExpr = ptr, ._typ = 277}; } static inline v__ast__Expr v__ast__StringInterLiteral_to_sumtype_v__ast__Expr(v__ast__StringInterLiteral* x) { v__ast__StringInterLiteral* ptr = memdup(x, sizeof(v__ast__StringInterLiteral)); return (v__ast__Expr){ ._v__ast__StringInterLiteral = ptr, ._typ = 309}; } static inline v__ast__ScopeObject v__ast__GlobalField_to_sumtype_v__ast__ScopeObject(v__ast__GlobalField* x) { v__ast__GlobalField* ptr = memdup(x, sizeof(v__ast__GlobalField)); return (v__ast__ScopeObject){ ._v__ast__GlobalField = ptr, ._typ = 344, .name = (string*)((char*)ptr + __offsetof_ptr(ptr, v__ast__GlobalField, name)), .typ = (v__ast__Type*)((char*)ptr + __offsetof_ptr(ptr, v__ast__GlobalField, typ))}; } static inline v__ast__TypeInfo v__ast__Enum_to_sumtype_v__ast__TypeInfo(v__ast__Enum* x) { v__ast__Enum* ptr = memdup(x, sizeof(v__ast__Enum)); return (v__ast__TypeInfo){ ._v__ast__Enum = ptr, ._typ = 470}; } static inline v__ast__TypeDecl v__ast__SumTypeDecl_to_sumtype_v__ast__TypeDecl(v__ast__SumTypeDecl* x) { v__ast__SumTypeDecl* ptr = memdup(x, sizeof(v__ast__SumTypeDecl)); return (v__ast__TypeDecl){ ._v__ast__SumTypeDecl = ptr, ._typ = 259, .name = (string*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SumTypeDecl, name)), .is_pub = (bool*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SumTypeDecl, is_pub)), .typ = (v__ast__Type*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SumTypeDecl, typ)), .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__SumTypeDecl, pos))}; } static inline v__ast__TypeDecl v__ast__FnTypeDecl_to_sumtype_v__ast__TypeDecl(v__ast__FnTypeDecl* x) { v__ast__FnTypeDecl* ptr = memdup(x, sizeof(v__ast__FnTypeDecl)); return (v__ast__TypeDecl){ ._v__ast__FnTypeDecl = ptr, ._typ = 258, .name = (string*)((char*)ptr + __offsetof_ptr(ptr, v__ast__FnTypeDecl, name)), .is_pub = (bool*)((char*)ptr + __offsetof_ptr(ptr, v__ast__FnTypeDecl, is_pub)), .typ = (v__ast__Type*)((char*)ptr + __offsetof_ptr(ptr, v__ast__FnTypeDecl, typ)), .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__FnTypeDecl, pos))}; } static inline v__ast__TypeDecl v__ast__AliasTypeDecl_to_sumtype_v__ast__TypeDecl(v__ast__AliasTypeDecl* x) { v__ast__AliasTypeDecl* ptr = memdup(x, sizeof(v__ast__AliasTypeDecl)); return (v__ast__TypeDecl){ ._v__ast__AliasTypeDecl = ptr, ._typ = 257, .name = (string*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AliasTypeDecl, name)), .is_pub = (bool*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AliasTypeDecl, is_pub)), .typ = (v__ast__Type*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AliasTypeDecl, typ)), .pos = (v__token__Pos*)((char*)ptr + __offsetof_ptr(ptr, v__ast__AliasTypeDecl, pos))}; } static inline v__ast__TypeInfo v__ast__Alias_to_sumtype_v__ast__TypeInfo(v__ast__Alias* x) { v__ast__Alias* ptr = memdup(x, sizeof(v__ast__Alias)); return (v__ast__TypeInfo){ ._v__ast__Alias = ptr, ._typ = 455}; } static inline v__ast__Node v__ast__File_to_sumtype_v__ast__Node(v__ast__File* x) { v__ast__File* ptr = memdup(x, sizeof(v__ast__File)); return (v__ast__Node){ ._v__ast__File = ptr, ._typ = 185}; } static bool Array_u8_contains(Array_u8 a, u8 v) { for (int i = 0; i < a.len; ++i) { if (((u8*)a.data)[i] == v) { return true; } } return false; } static bool Array_string_contains(Array_string a, string v) { for (int i = 0; i < a.len; ++i) { if (fast_string_eq(((string*)a.data)[i], v)) { return true; } } return false; } static bool Array_v__token__Kind_contains(Array_v__token__Kind a, v__token__Kind v) { for (int i = 0; i < a.len; ++i) { if (((v__token__Kind*)a.data)[i] == v) { return true; } } return false; } static bool Array_Array_v__ast__Type_contains(Array_Array_v__ast__Type a, Array_v__ast__Type v) { for (int i = 0; i < a.len; ++i) { if (Array_v__ast__Type_arr_eq(((Array_v__ast__Type*)a.data)[i], v)) { return true; } } return false; } static bool Array_v__ast__Type_contains(Array_v__ast__Type a, v__ast__Type v) { for (int i = 0; i < a.len; ++i) { if (v__ast__Type_alias_eq(((v__ast__Type*)a.data)[i], v)) { return true; } } return false; } static bool Array_int_contains(Array_int a, int v) { for (int i = 0; i < a.len; ++i) { if (((int*)a.data)[i] == v) { return true; } } return false; } static bool Array_v__gen__c__StrType_contains(Array_v__gen__c__StrType a, v__gen__c__StrType v) { for (int i = 0; i < a.len; ++i) { if (v__gen__c__StrType_struct_eq(((v__gen__c__StrType*)a.data)[i], v)) { return true; } } return false; } static bool Array_v__gen__c__SumtypeCastingFn_contains(Array_v__gen__c__SumtypeCastingFn a, v__gen__c__SumtypeCastingFn v) { for (int i = 0; i < a.len; ++i) { if (v__gen__c__SumtypeCastingFn_struct_eq(((v__gen__c__SumtypeCastingFn*)a.data)[i], v)) { return true; } } return false; } static bool Array_v__ast__EmbeddedFile_contains(Array_v__ast__EmbeddedFile a, v__ast__EmbeddedFile v) { for (int i = 0; i < a.len; ++i) { if (v__ast__EmbeddedFile_struct_eq(((v__ast__EmbeddedFile*)a.data)[i], v)) { return true; } } return false; } static bool Array_i64_contains(Array_i64 a, i64 v) { for (int i = 0; i < a.len; ++i) { if (((i64*)a.data)[i] == v) { return true; } } return false; } static bool Array_u64_contains(Array_u64 a, u64 v) { for (int i = 0; i < a.len; ++i) { if (((u64*)a.data)[i] == v) { return true; } } return false; } static int Array_string_index(Array_string a, string v) { string* pelem = a.data; for (int i = 0; i < a.len; ++i, ++pelem) { if (fast_string_eq(*pelem, v)) { return i; } } return -1; } static int Array_v__ast__StructField_index(Array_v__ast__StructField a, v__ast__StructField v) { v__ast__StructField* pelem = a.data; for (int i = 0; i < a.len; ++i, ++pelem) { if (v__ast__StructField_struct_eq(*pelem, v)) { return i; } } return -1; } static bool Array_rune_arr_eq(Array_rune a, Array_rune b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (*((rune*)((byte*)a.data+(i*a.element_size))) != *((rune*)((byte*)b.data+(i*b.element_size)))) { return false; } } return true; } static bool time__Duration_alias_eq(time__Duration a, time__Duration b) { return a == b; } static bool v__ast__Type_alias_eq(v__ast__Type a, v__ast__Type b) { return a == b; } static bool Array_string_arr_eq(Array_string a, Array_string b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!string__eq(*((string*)((byte*)a.data+(i*a.element_size))), *((string*)((byte*)b.data+(i*b.element_size))))) { return false; } } return true; } static bool Array_v__ast__Type_arr_eq(Array_v__ast__Type a, Array_v__ast__Type b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Type_alias_eq(((v__ast__Type*)a.data)[i], ((v__ast__Type*)b.data)[i])) { return false; } } return true; } static bool v__token__Pos_struct_eq(v__token__Pos a, v__token__Pos b) { return a.len == b.len && a.line_nr == b.line_nr && a.pos == b.pos && a.col == b.col && a.last_line == b.last_line; } static bool v__ast__AsmRegister_struct_eq(v__ast__AsmRegister a, v__ast__AsmRegister b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__Type_alias_eq(a.typ, b.typ) && a.size == b.size; } static bool v__ast__Comment_struct_eq(v__ast__Comment a, v__ast__Comment b) { return ((a.text.len == b.text.len && a.text.len == 0) || string__eq(a.text, b.text)) && a.is_multi == b.is_multi && v__token__Pos_struct_eq(a.pos, b.pos); } static bool Array_v__ast__Comment_arr_eq(Array_v__ast__Comment a, Array_v__ast__Comment b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Comment_struct_eq(((v__ast__Comment*)a.data)[i], ((v__ast__Comment*)b.data)[i])) { return false; } } return true; } static bool v__ast__AsmClobbered_struct_eq(v__ast__AsmClobbered a, v__ast__AsmClobbered b) { return v__ast__AsmRegister_struct_eq(a.reg, b.reg) && Array_v__ast__Comment_arr_eq(a.comments, b.comments); } static bool Array_v__ast__AsmClobbered_arr_eq(Array_v__ast__AsmClobbered a, Array_v__ast__AsmClobbered b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__AsmClobbered_struct_eq(((v__ast__AsmClobbered*)a.data)[i], ((v__ast__AsmClobbered*)b.data)[i])) { return false; } } return true; } static bool v__ast__AsmAddressing_struct_eq(v__ast__AsmAddressing a, v__ast__AsmAddressing b) { return a.scale == b.scale && a.mode == b.mode && v__token__Pos_struct_eq(a.pos, b.pos) && ((a.segment.len == b.segment.len && a.segment.len == 0) || string__eq(a.segment, b.segment)) && v__ast__AsmArg_sumtype_eq(a.displacement, b.displacement) && v__ast__AsmArg_sumtype_eq(a.base, b.base) && v__ast__AsmArg_sumtype_eq(a.index, b.index); } static bool v__ast__AsmAlias_struct_eq(v__ast__AsmAlias a, v__ast__AsmAlias b) { return v__token__Pos_struct_eq(a.pos, b.pos) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)); } static bool v__ast__AsmDisp_struct_eq(v__ast__AsmDisp a, v__ast__AsmDisp b) { return ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)) && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__BoolLiteral_struct_eq(v__ast__BoolLiteral a, v__ast__BoolLiteral b) { return a.val == b.val && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__CharLiteral_struct_eq(v__ast__CharLiteral a, v__ast__CharLiteral b) { return ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)) && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__FloatLiteral_struct_eq(v__ast__FloatLiteral a, v__ast__FloatLiteral b) { return ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)) && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__IntegerLiteral_struct_eq(v__ast__IntegerLiteral a, v__ast__IntegerLiteral b) { return ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)) && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__AsmArg_sumtype_eq(v__ast__AsmArg a, v__ast__AsmArg b) { if (a._typ != b._typ) { return false; } if (a._typ == b._typ && b._typ == 0) { return true; } // uninitialized if (a._typ == 418) { return v__ast__AsmAddressing_struct_eq(*a._v__ast__AsmAddressing, *b._v__ast__AsmAddressing); } if (a._typ == 419) { return v__ast__AsmAlias_struct_eq(*a._v__ast__AsmAlias, *b._v__ast__AsmAlias); } if (a._typ == 420) { return v__ast__AsmDisp_struct_eq(*a._v__ast__AsmDisp, *b._v__ast__AsmDisp); } if (a._typ == 342) { return v__ast__AsmRegister_struct_eq(*a._v__ast__AsmRegister, *b._v__ast__AsmRegister); } if (a._typ == 267) { return v__ast__BoolLiteral_struct_eq(*a._v__ast__BoolLiteral, *b._v__ast__BoolLiteral); } if (a._typ == 272) { return v__ast__CharLiteral_struct_eq(*a._v__ast__CharLiteral, *b._v__ast__CharLiteral); } if (a._typ == 281) { return v__ast__FloatLiteral_struct_eq(*a._v__ast__FloatLiteral, *b._v__ast__FloatLiteral); } if (a._typ == 288) { return v__ast__IntegerLiteral_struct_eq(*a._v__ast__IntegerLiteral, *b._v__ast__IntegerLiteral); } if (a._typ == 20) { return string__eq(*a._string, *b._string); } return false; } static bool Array_v__ast__AsmArg_arr_eq(Array_v__ast__AsmArg a, Array_v__ast__AsmArg b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__AsmArg_sumtype_eq(((v__ast__AsmArg*)a.data)[i], ((v__ast__AsmArg*)b.data)[i])) { return false; } } return true; } static bool v__ast__AsmTemplate_struct_eq(v__ast__AsmTemplate a, v__ast__AsmTemplate b) { return Array_v__ast__AsmArg_arr_eq(a.args, b.args) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_label == b.is_label && a.is_directive == b.is_directive; } static bool Array_v__ast__AsmTemplate_arr_eq(Array_v__ast__AsmTemplate a, Array_v__ast__AsmTemplate b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__AsmTemplate_struct_eq(((v__ast__AsmTemplate*)a.data)[i], ((v__ast__AsmTemplate*)b.data)[i])) { return false; } } return true; } static bool v__ast__Attr_struct_eq(v__ast__Attr a, v__ast__Attr b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && ((a.arg.len == b.arg.len && a.arg.len == 0) || string__eq(a.arg, b.arg)) && v__ast__Expr_sumtype_eq(a.ct_expr, b.ct_expr) && v__token__Pos_struct_eq(a.pos, b.pos) && a.kind == b.kind && a.has_arg == b.has_arg && a.ct_opt == b.ct_opt && a.has_at == b.has_at && a.ct_evaled == b.ct_evaled && a.ct_skip == b.ct_skip; } static bool Array_v__ast__Attr_arr_eq(Array_v__ast__Attr a, Array_v__ast__Attr b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Attr_struct_eq(((v__ast__Attr*)a.data)[i], ((v__ast__Attr*)b.data)[i])) { return false; } } return true; } static bool v__ast__Embed_struct_eq(v__ast__Embed a, v__ast__Embed b) { return v__ast__Type_alias_eq(a.typ, b.typ) && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments); } static bool Array_v__ast__Embed_arr_eq(Array_v__ast__Embed a, Array_v__ast__Embed b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Embed_struct_eq(((v__ast__Embed*)a.data)[i], ((v__ast__Embed*)b.data)[i])) { return false; } } return true; } static bool Array_v__ast__StructField_arr_eq(Array_v__ast__StructField a, Array_v__ast__StructField b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__StructField_struct_eq(((v__ast__StructField*)a.data)[i], ((v__ast__StructField*)b.data)[i])) { return false; } } return true; } static bool v__ast__StructDecl_struct_eq(v__ast__StructDecl a, v__ast__StructDecl b) { return Array_v__ast__Type_arr_eq(a.generic_types, b.generic_types) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && Array_v__ast__Comment_arr_eq(a.pre_comments, b.pre_comments) && Array_v__ast__Comment_arr_eq(a.end_comments, b.end_comments) && Array_v__ast__Embed_arr_eq(a.embeds, b.embeds) && Array_v__ast__StructField_arr_eq(a.fields, b.fields) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.mut_pos == b.mut_pos && a.pub_pos == b.pub_pos && a.pub_mut_pos == b.pub_mut_pos && a.global_pos == b.global_pos && a.module_pos == b.module_pos && a.language == b.language && a.is_pub == b.is_pub && a.is_union == b.is_union; } static bool v__ast__StructField_struct_eq(v__ast__StructField a, v__ast__StructField b) { return v__ast__StructDecl_struct_eq(a.anon_struct_decl, b.anon_struct_decl) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && ((a.default_val.len == b.default_val.len && a.default_val.len == 0) || string__eq(a.default_val, b.default_val)) && v__ast__Expr_sumtype_eq(a.default_expr, b.default_expr) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.type_pos, b.type_pos) && v__token__Pos_struct_eq(a.option_pos, b.option_pos) && a.i == b.i && v__ast__Type_alias_eq(a.default_expr_typ, b.default_expr_typ) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.unaliased_typ, b.unaliased_typ) && a.has_default_expr == b.has_default_expr && a.is_pub == b.is_pub && a.is_mut == b.is_mut && a.is_global == b.is_global && a.is_volatile == b.is_volatile && a.is_deprecated == b.is_deprecated && a.is_recursive == b.is_recursive; } static bool v__ast__Param_struct_eq(v__ast__Param a, v__ast__Param b) { return Array_v__ast__Comment_arr_eq(a.comments, b.comments) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.type_pos, b.type_pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.is_mut == b.is_mut && a.is_shared == b.is_shared && a.is_atomic == b.is_atomic && a.is_auto_rec == b.is_auto_rec && a.is_hidden == b.is_hidden; } static bool Array_v__ast__Param_arr_eq(Array_v__ast__Param a, Array_v__ast__Param b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Param_struct_eq(((v__ast__Param*)a.data)[i], ((v__ast__Param*)b.data)[i])) { return false; } } return true; } static bool Array_v__ast__Stmt_arr_eq(Array_v__ast__Stmt a, Array_v__ast__Stmt b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Stmt_sumtype_eq(((v__ast__Stmt*)a.data)[i], ((v__ast__Stmt*)b.data)[i])) { return false; } } return true; } static bool v__ast__OrExpr_struct_eq(v__ast__OrExpr a, v__ast__OrExpr b) { return a.kind == b.kind && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts); } static bool v__ast__EmptyExpr_alias_eq(v__ast__EmptyExpr a, v__ast__EmptyExpr b) { return a == b; } static bool v__ast__ComptTimeConstValue_sumtype_eq(v__ast__ComptTimeConstValue a, v__ast__ComptTimeConstValue b) { if (a._typ != b._typ) { return false; } if (a._typ == b._typ && b._typ == 0) { return true; } // uninitialized if (a._typ == 279) { return v__ast__EmptyExpr_alias_eq(*a._v__ast__EmptyExpr, *b._v__ast__EmptyExpr); } if (a._typ == 15) { return *a._f32 == *b._f32; } if (a._typ == 16) { return *a._f64 == *b._f64; } if (a._typ == 6) { return *a._i16 == *b._i16; } if (a._typ == 8) { return *a._i64 == *b._i64; } if (a._typ == 5) { return *a._i8 == *b._i8; } if (a._typ == 7) { return *a._int == *b._int; } if (a._typ == 21) { return *a._rune == *b._rune; } if (a._typ == 20) { return string__eq(*a._string, *b._string); } if (a._typ == 11) { return *a._u16 == *b._u16; } if (a._typ == 12) { return *a._u32 == *b._u32; } if (a._typ == 13) { return *a._u64 == *b._u64; } if (a._typ == 10) { return *a._u8 == *b._u8; } if (a._typ == 2) { return *a._voidptr == *b._voidptr; } return false; } static bool v__ast__ConstField_struct_eq(v__ast__ConstField a, v__ast__ConstField b) { return ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && a.is_pub == b.is_pub && a.is_markused == b.is_markused && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Type_alias_eq(a.typ, b.typ) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Comment_arr_eq(a.end_comments, b.end_comments) && v__ast__ComptTimeConstValue_sumtype_eq(a.comptime_expr_value, b.comptime_expr_value); } static bool v__ast__GlobalField_struct_eq(v__ast__GlobalField a, v__ast__GlobalField b) { return Array_v__ast__Comment_arr_eq(a.comments, b.comments) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.typ_pos, b.typ_pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.has_expr == b.has_expr && a.is_markused == b.is_markused && a.is_volatile == b.is_volatile; } static bool v__ast__Var_struct_eq(v__ast__Var a, v__ast__Var b) { return Array_v__ast__Type_arr_eq(a.smartcasts, b.smartcasts) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.orig_type, b.orig_type) && a.ct_type_var == b.ct_type_var && a.share == b.share && a.is_mut == b.is_mut && a.is_autofree_tmp == b.is_autofree_tmp && a.is_inherited == b.is_inherited && a.has_inherited == b.has_inherited && a.is_arg == b.is_arg && a.is_auto_deref == b.is_auto_deref && a.is_used == b.is_used && a.is_changed == b.is_changed && a.is_or == b.is_or && a.is_tmp == b.is_tmp && a.is_auto_heap == b.is_auto_heap && a.is_stack_obj == b.is_stack_obj; } static bool v__ast__ScopeObject_sumtype_eq(v__ast__ScopeObject a, v__ast__ScopeObject b) { if (a._typ != b._typ) { return false; } if (a._typ == b._typ && b._typ == 0) { return true; } // uninitialized if (a._typ == 342) { return v__ast__AsmRegister_struct_eq(*a._v__ast__AsmRegister, *b._v__ast__AsmRegister); } if (a._typ == 343) { return v__ast__ConstField_struct_eq(*a._v__ast__ConstField, *b._v__ast__ConstField); } if (a._typ == 344) { return v__ast__GlobalField_struct_eq(*a._v__ast__GlobalField, *b._v__ast__GlobalField); } if (a._typ == 345) { return v__ast__Var_struct_eq(*a._v__ast__Var, *b._v__ast__Var); } return false; } static bool v__ast__IdentFn_struct_eq(v__ast__IdentFn a, v__ast__IdentFn b) { return v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__ast__IdentVar_struct_eq(v__ast__IdentVar a, v__ast__IdentVar b) { return v__ast__Type_alias_eq(a.typ, b.typ) && a.share == b.share && a.is_mut == b.is_mut && a.is_static == b.is_static && a.is_volatile == b.is_volatile && a.is_option == b.is_option; } static bool v__ast__IdentInfo_sumtype_eq(v__ast__IdentInfo a, v__ast__IdentInfo b) { if (a._typ != b._typ) { return false; } if (a._typ == b._typ && b._typ == 0) { return true; } // uninitialized if (a._typ == 397) { return v__ast__IdentFn_struct_eq(*a._v__ast__IdentFn, *b._v__ast__IdentFn); } if (a._typ == 398) { return v__ast__IdentVar_struct_eq(*a._v__ast__IdentVar, *b._v__ast__IdentVar); } return false; } static bool v__ast__Ident_struct_eq(v__ast__Ident a, v__ast__Ident b) { return v__ast__OrExpr_struct_eq(a.or_expr, b.or_expr) && Array_v__ast__Type_arr_eq(a.concrete_types, b.concrete_types) && v__ast__ScopeObject_sumtype_eq(a.obj, b.obj) && ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__IdentInfo_sumtype_eq(a.info, b.info) && a.scope == b.scope && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.mut_pos, b.mut_pos) && a.tok_kind == b.tok_kind && a.language == b.language && a.kind == b.kind && a.comptime == b.comptime && a.is_mut == b.is_mut; } static bool Array_v__ast__Ident_arr_eq(Array_v__ast__Ident a, Array_v__ast__Ident b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Ident_struct_eq(((v__ast__Ident*)a.data)[i], ((v__ast__Ident*)b.data)[i])) { return false; } } return true; } static bool v__ast__DeferStmt_struct_eq(v__ast__DeferStmt a, v__ast__DeferStmt b) { return Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && Array_v__ast__Ident_arr_eq(a.defer_vars, b.defer_vars) && ((a.ifdef.len == b.ifdef.len && a.ifdef.len == 0) || string__eq(a.ifdef, b.ifdef)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.idx_in_fn == b.idx_in_fn; } static bool Array_v__ast__DeferStmt_arr_eq(Array_v__ast__DeferStmt a, Array_v__ast__DeferStmt b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__DeferStmt_struct_eq(((v__ast__DeferStmt*)a.data)[i], ((v__ast__DeferStmt*)b.data)[i])) { return false; } } return true; } static bool v__ast__FnDecl_struct_eq(v__ast__FnDecl a, v__ast__FnDecl b) { return v__ast__StructField_struct_eq(a.receiver, b.receiver) && Array_string_arr_eq(a.generic_names, b.generic_names) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && Array_v__ast__Param_arr_eq(a.params, b.params) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && Array_v__ast__DeferStmt_arr_eq(a.defer_stmts, b.defer_stmts) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Comment_arr_eq(a.end_comments, b.end_comments) && Array_v__ast__Comment_arr_eq(a.next_comments, b.next_comments) && Array_string_arr_eq(a.label_names, b.label_names) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && ((a.short_name.len == b.short_name.len && a.short_name.len == 0) || string__eq(a.short_name, b.short_name)) && ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && ((a.file.len == b.file.len && a.file.len == 0) || string__eq(a.file, b.file)) && a.source_file == b.source_file && a.scope == b.scope && v__token__Pos_struct_eq(a.receiver_pos, b.receiver_pos) && v__token__Pos_struct_eq(a.method_type_pos, b.method_type_pos) && v__token__Pos_struct_eq(a.name_pos, b.name_pos) && v__token__Pos_struct_eq(a.body_pos, b.body_pos) && v__token__Pos_struct_eq(a.return_type_pos, b.return_type_pos) && v__token__Pos_struct_eq(a.pos, b.pos) && a.method_idx == b.method_idx && a.ctdefine_idx == b.ctdefine_idx && a.idx == b.idx && v__ast__Type_alias_eq(a.return_type, b.return_type) && a.ninstances == b.ninstances && a.language == b.language && a.file_mode == b.file_mode && a.rec_share == b.rec_share && a.is_deprecated == b.is_deprecated && a.is_pub == b.is_pub && a.is_variadic == b.is_variadic && a.is_anon == b.is_anon && a.is_noreturn == b.is_noreturn && a.is_manualfree == b.is_manualfree && a.is_main == b.is_main && a.is_test == b.is_test && a.is_conditional == b.is_conditional && a.is_exported == b.is_exported && a.is_keep_alive == b.is_keep_alive && a.is_unsafe == b.is_unsafe && a.is_markused == b.is_markused && a.is_file_translated == b.is_file_translated && a.is_method == b.is_method && a.is_static_type_method == b.is_static_type_method && a.rec_mut == b.rec_mut && a.no_body == b.no_body && a.is_builtin == b.is_builtin && a.is_direct_arr == b.is_direct_arr && a.has_return == b.has_return && a.should_be_skipped == b.should_be_skipped && a.has_await == b.has_await; } static bool Map_string_bool_map_eq(Map_string_bool a, Map_string_bool b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.key_values.len; ++i) { if (!DenseArray_has_index(&a.key_values, i)) continue; voidptr k = DenseArray_key(&a.key_values, i); if (!map_exists(&b, k)) return false; bool v = *(bool*)map_get(&a, k, &(bool[]){ 0 }); if (*(bool*)map_get(&b, k, &(bool[]){ 0 }) != v) { return false; } } return true; } static bool v__ast__AnonFn_struct_eq(v__ast__AnonFn a, v__ast__AnonFn b) { return v__ast__FnDecl_struct_eq(a.decl, b.decl) && Array_v__ast__Param_arr_eq(a.inherited_vars, b.inherited_vars) && v__ast__Type_alias_eq(a.typ, b.typ) && Map_string_bool_map_eq(a.has_gen, b.has_gen); } static bool v__ast__ArrayDecompose_struct_eq(v__ast__ArrayDecompose a, v__ast__ArrayDecompose b) { return v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Type_alias_eq(a.expr_type, b.expr_type) && v__ast__Type_alias_eq(a.arg_type, b.arg_type); } static bool Array_Array_v__ast__Comment_arr_eq(Array_Array_v__ast__Comment a, Array_Array_v__ast__Comment b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!Array_v__ast__Comment_arr_eq(((Array_v__ast__Comment*)a.data)[i], ((Array_v__ast__Comment*)b.data)[i])) { return false; } } return true; } static bool Array_v__ast__Expr_arr_eq(Array_v__ast__Expr a, Array_v__ast__Expr b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Expr_sumtype_eq(((v__ast__Expr*)a.data)[i], ((v__ast__Expr*)b.data)[i])) { return false; } } return true; } static bool v__ast__ArrayInit_struct_eq(v__ast__ArrayInit a, v__ast__ArrayInit b) { return Array_Array_v__ast__Comment_arr_eq(a.ecmnts, b.ecmnts) && Array_v__ast__Comment_arr_eq(a.pre_cmnts, b.pre_cmnts) && Array_v__ast__Expr_arr_eq(a.exprs, b.exprs) && Array_v__ast__Type_arr_eq(a.expr_types, b.expr_types) && ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && v__ast__Expr_sumtype_eq(a.len_expr, b.len_expr) && v__ast__Expr_sumtype_eq(a.cap_expr, b.cap_expr) && v__ast__Expr_sumtype_eq(a.default_expr, b.default_expr) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.elem_type_pos, b.elem_type_pos) && v__ast__Type_alias_eq(a.elem_type, b.elem_type) && v__ast__Type_alias_eq(a.default_type, b.default_type) && v__ast__Type_alias_eq(a.typ, b.typ) && a.is_fixed == b.is_fixed && a.has_val == b.has_val && a.has_len == b.has_len && a.has_cap == b.has_cap && a.has_default == b.has_default && a.has_index == b.has_index; } static bool v__ast__AsCast_struct_eq(v__ast__AsCast a, v__ast__AsCast b) { return v__ast__Type_alias_eq(a.typ, b.typ) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Type_alias_eq(a.expr_type, b.expr_type); } static bool v__ast__Assoc_struct_eq(v__ast__Assoc a, v__ast__Assoc b) { return Array_string_arr_eq(a.fields, b.fields) && Array_v__ast__Expr_arr_eq(a.exprs, b.exprs) && ((a.var_name.len == b.var_name.len && a.var_name.len == 0) || string__eq(a.var_name, b.var_name)) && a.scope == b.scope && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__ast__AtExpr_struct_eq(v__ast__AtExpr a, v__ast__AtExpr b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.kind == b.kind && ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)); } static bool v__ast__CTempVar_struct_eq(v__ast__CTempVar a, v__ast__CTempVar b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__Type_alias_eq(a.typ, b.typ) && a.is_ptr == b.is_ptr && v__ast__Expr_sumtype_eq(a.orig, b.orig); } static bool v__ast__CallArg_struct_eq(v__ast__CallArg a, v__ast__CallArg b) { return Array_v__ast__Comment_arr_eq(a.comments, b.comments) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.share == b.share && a.is_mut == b.is_mut && a.is_tmp_autofree == b.is_tmp_autofree; } static bool Array_v__ast__CallArg_arr_eq(Array_v__ast__CallArg a, Array_v__ast__CallArg b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__CallArg_struct_eq(((v__ast__CallArg*)a.data)[i], ((v__ast__CallArg*)b.data)[i])) { return false; } } return true; } static bool v__ast__CallExpr_struct_eq(v__ast__CallExpr a, v__ast__CallExpr b) { return v__ast__OrExpr_struct_eq(a.or_block, b.or_block) && Array_v__ast__CallArg_arr_eq(a.args, b.args) && Array_v__ast__Type_arr_eq(a.expected_arg_types, b.expected_arg_types) && Array_v__ast__Type_arr_eq(a.concrete_types, b.concrete_types) && Array_v__ast__Type_arr_eq(a.raw_concrete_types, b.raw_concrete_types) && Array_v__ast__Type_arr_eq(a.from_embed_types, b.from_embed_types) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__Expr_sumtype_eq(a.left, b.left) && ((a.const_name.len == b.const_name.len && a.const_name.len == 0) || string__eq(a.const_name, b.const_name)) && a.scope == b.scope && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.name_pos, b.name_pos) && v__token__Pos_struct_eq(a.concrete_list_pos, b.concrete_list_pos) && v__ast__Type_alias_eq(a.left_type, b.left_type) && v__ast__Type_alias_eq(a.receiver_type, b.receiver_type) && v__ast__Type_alias_eq(a.return_type, b.return_type) && v__ast__Type_alias_eq(a.fn_var_type, b.fn_var_type) && a.language == b.language && a.is_method == b.is_method && a.is_field == b.is_field && a.is_fn_var == b.is_fn_var && a.is_fn_a_const == b.is_fn_a_const && a.is_keep_alive == b.is_keep_alive && a.is_noreturn == b.is_noreturn && a.is_ctor_new == b.is_ctor_new && a.is_file_translated == b.is_file_translated && a.comptime_ret_val == b.comptime_ret_val && a.should_be_skipped == b.should_be_skipped && a.free_receiver == b.free_receiver; } static bool v__ast__CastExpr_struct_eq(v__ast__CastExpr a, v__ast__CastExpr b) { return v__ast__Expr_sumtype_eq(a.arg, b.arg) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && ((a.typname.len == b.typname.len && a.typname.len == 0) || string__eq(a.typname, b.typname)) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.expr_type, b.expr_type) && a.has_arg == b.has_arg; } static bool v__ast__ChanInit_struct_eq(v__ast__ChanInit a, v__ast__ChanInit b) { return v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.elem_type_pos, b.elem_type_pos) && a.has_cap == b.has_cap && v__ast__Expr_sumtype_eq(a.cap_expr, b.cap_expr) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.elem_type, b.elem_type); } static bool v__ast__Module_struct_eq(v__ast__Module a, v__ast__Module b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && ((a.short_name.len == b.short_name.len && a.short_name.len == 0) || string__eq(a.short_name, b.short_name)) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.name_pos, b.name_pos) && a.is_skipped == b.is_skipped; } static bool v__ast__ImportSymbol_struct_eq(v__ast__ImportSymbol a, v__ast__ImportSymbol b) { return v__token__Pos_struct_eq(a.pos, b.pos) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)); } static bool Array_v__ast__ImportSymbol_arr_eq(Array_v__ast__ImportSymbol a, Array_v__ast__ImportSymbol b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__ImportSymbol_struct_eq(((v__ast__ImportSymbol*)a.data)[i], ((v__ast__ImportSymbol*)b.data)[i])) { return false; } } return true; } static bool v__ast__Import_struct_eq(v__ast__Import a, v__ast__Import b) { return ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && ((a.alias.len == b.alias.len && a.alias.len == 0) || string__eq(a.alias, b.alias)) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.mod_pos, b.mod_pos) && v__token__Pos_struct_eq(a.alias_pos, b.alias_pos) && v__token__Pos_struct_eq(a.syms_pos, b.syms_pos) && Array_v__ast__ImportSymbol_arr_eq(a.syms, b.syms) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Comment_arr_eq(a.next_comments, b.next_comments); } static bool Array_v__ast__Import_arr_eq(Array_v__ast__Import a, Array_v__ast__Import b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__Import_struct_eq(((v__ast__Import*)a.data)[i], ((v__ast__Import*)b.data)[i])) { return false; } } return true; } static bool Array_u8_arr_eq(Array_u8 a, Array_u8 b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (*((u8*)((byte*)a.data+(i*a.element_size))) != *((u8*)((byte*)b.data+(i*b.element_size)))) { return false; } } return true; } static bool v__ast__EmbeddedFile_struct_eq(v__ast__EmbeddedFile a, v__ast__EmbeddedFile b) { return Array_u8_arr_eq(a.bytes, b.bytes) && ((a.compression_type.len == b.compression_type.len && a.compression_type.len == 0) || string__eq(a.compression_type, b.compression_type)) && ((a.rpath.len == b.rpath.len && a.rpath.len == 0) || string__eq(a.rpath, b.rpath)) && ((a.apath.len == b.apath.len && a.apath.len == 0) || string__eq(a.apath, b.apath)) && a.len == b.len && a.is_compressed == b.is_compressed; } static bool Array_v__ast__EmbeddedFile_arr_eq(Array_v__ast__EmbeddedFile a, Array_v__ast__EmbeddedFile b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__EmbeddedFile_struct_eq(((v__ast__EmbeddedFile*)a.data)[i], ((v__ast__EmbeddedFile*)b.data)[i])) { return false; } } return true; } static bool Map_string_string_map_eq(Map_string_string a, Map_string_string b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.key_values.len; ++i) { if (!DenseArray_has_index(&a.key_values, i)) continue; voidptr k = DenseArray_key(&a.key_values, i); if (!map_exists(&b, k)) return false; string v = *(string*)map_get(&a, k, &(string[]){ 0 }); if (!fast_string_eq(*(string*)map_get(&b, k, &(string[]){_SLIT("")}), v)) { return false; } } return true; } static bool v__errors__CompilerMessage_struct_eq(v__errors__CompilerMessage a, v__errors__CompilerMessage b) { return ((a.message.len == b.message.len && a.message.len == 0) || string__eq(a.message, b.message)) && ((a.details.len == b.details.len && a.details.len == 0) || string__eq(a.details, b.details)) && ((a.file_path.len == b.file_path.len && a.file_path.len == 0) || string__eq(a.file_path, b.file_path)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.reporter == b.reporter; } static bool v__errors__Error_struct_eq(v__errors__Error a, v__errors__Error b) { return v__errors__CompilerMessage_struct_eq(a.CompilerMessage, b.CompilerMessage); } static bool Array_v__errors__Error_arr_eq(Array_v__errors__Error a, Array_v__errors__Error b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__errors__Error_struct_eq(((v__errors__Error*)a.data)[i], ((v__errors__Error*)b.data)[i])) { return false; } } return true; } static bool v__errors__Warning_struct_eq(v__errors__Warning a, v__errors__Warning b) { return v__errors__CompilerMessage_struct_eq(a.CompilerMessage, b.CompilerMessage); } static bool Array_v__errors__Warning_arr_eq(Array_v__errors__Warning a, Array_v__errors__Warning b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__errors__Warning_struct_eq(((v__errors__Warning*)a.data)[i], ((v__errors__Warning*)b.data)[i])) { return false; } } return true; } static bool v__errors__Notice_struct_eq(v__errors__Notice a, v__errors__Notice b) { return v__errors__CompilerMessage_struct_eq(a.CompilerMessage, b.CompilerMessage); } static bool Array_v__errors__Notice_arr_eq(Array_v__errors__Notice a, Array_v__errors__Notice b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__errors__Notice_struct_eq(((v__errors__Notice*)a.data)[i], ((v__errors__Notice*)b.data)[i])) { return false; } } return true; } static bool Array_v__ast__FnDecl_ptr_arr_eq(Array_v__ast__FnDecl_ptr a, Array_v__ast__FnDecl_ptr b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (*((v__ast__FnDecl**)((byte*)a.data+(i*a.element_size))) != *((v__ast__FnDecl**)((byte*)b.data+(i*b.element_size)))) { return false; } } return true; } static bool v__ast__File_struct_eq(v__ast__File a, v__ast__File b) { return a.nr_lines == b.nr_lines && a.nr_bytes == b.nr_bytes && v__ast__Module_struct_eq(a.mod, b.mod) && a.global_scope == b.global_scope && a.is_test == b.is_test && a.is_generated == b.is_generated && a.is_translated == b.is_translated && a.idx == b.idx && ((a.path.len == b.path.len && a.path.len == 0) || string__eq(a.path, b.path)) && ((a.path_base.len == b.path_base.len && a.path_base.len == 0) || string__eq(a.path_base, b.path_base)) && a.scope == b.scope && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && Array_v__ast__Import_arr_eq(a.imports, b.imports) && Array_string_arr_eq(a.auto_imports, b.auto_imports) && Array_v__ast__EmbeddedFile_arr_eq(a.embedded_files, b.embedded_files) && Map_string_string_map_eq(a.imported_symbols, b.imported_symbols) && Array_v__errors__Error_arr_eq(a.errors, b.errors) && Array_v__errors__Warning_arr_eq(a.warnings, b.warnings) && Array_v__errors__Notice_arr_eq(a.notices, b.notices) && Array_v__ast__FnDecl_ptr_arr_eq(a.generic_fns, b.generic_fns) && Array_string_arr_eq(a.global_labels, b.global_labels) && Array_string_arr_eq(a.template_paths, b.template_paths) && ((a.unique_prefix.len == b.unique_prefix.len && a.unique_prefix.len == 0) || string__eq(a.unique_prefix, b.unique_prefix)); } static bool v__ast__ComptimeCall_struct_eq(v__ast__ComptimeCall a, v__ast__ComptimeCall b) { return v__ast__File_struct_eq(a.vweb_tmpl, b.vweb_tmpl) && v__ast__EmbeddedFile_struct_eq(a.embed_file, b.embed_file) && v__ast__OrExpr_struct_eq(a.or_block, b.or_block) && Array_v__ast__CallArg_arr_eq(a.args, b.args) && ((a.method_name.len == b.method_name.len && a.method_name.len == 0) || string__eq(a.method_name, b.method_name)) && v__ast__Expr_sumtype_eq(a.left, b.left) && ((a.env_value.len == b.env_value.len && a.env_value.len == 0) || string__eq(a.env_value, b.env_value)) && ((a.args_var.len == b.args_var.len && a.args_var.len == 0) || string__eq(a.args_var, b.args_var)) && a.scope == b.scope && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.method_pos, b.method_pos) && v__token__Pos_struct_eq(a.env_pos, b.env_pos) && v__ast__Type_alias_eq(a.left_type, b.left_type) && v__ast__Type_alias_eq(a.result_type, b.result_type) && a.has_parens == b.has_parens && a.is_vweb == b.is_vweb && a.is_embed == b.is_embed && a.is_env == b.is_env && a.is_pkgconfig == b.is_pkgconfig; } static bool v__ast__ComptimeSelector_struct_eq(v__ast__ComptimeSelector a, v__ast__ComptimeSelector b) { return v__ast__Expr_sumtype_eq(a.left, b.left) && v__ast__Expr_sumtype_eq(a.field_expr, b.field_expr) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.left_type, b.left_type) && v__ast__Type_alias_eq(a.typ, b.typ) && a.has_parens == b.has_parens; } static bool v__ast__ComptimeType_struct_eq(v__ast__ComptimeType a, v__ast__ComptimeType b) { return a.kind == b.kind && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__ConcatExpr_struct_eq(v__ast__ConcatExpr a, v__ast__ConcatExpr b) { return Array_v__ast__Expr_arr_eq(a.vals, b.vals) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.return_type, b.return_type); } static bool v__ast__DumpExpr_struct_eq(v__ast__DumpExpr a, v__ast__DumpExpr b) { return v__ast__Expr_sumtype_eq(a.expr, b.expr) && ((a.cname.len == b.cname.len && a.cname.len == 0) || string__eq(a.cname, b.cname)) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.expr_type, b.expr_type); } static bool v__ast__EnumVal_struct_eq(v__ast__EnumVal a, v__ast__EnumVal b) { return ((a.enum_name.len == b.enum_name.len && a.enum_name.len == 0) || string__eq(a.enum_name, b.enum_name)) && ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)) && ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__ast__GoExpr_struct_eq(v__ast__GoExpr a, v__ast__GoExpr b) { return v__ast__CallExpr_struct_eq(a.call_expr, b.call_expr) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_expr == b.is_expr; } static bool v__ast__IfBranch_struct_eq(v__ast__IfBranch a, v__ast__IfBranch b) { return v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.body_pos, b.body_pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && v__ast__Expr_sumtype_eq(a.cond, b.cond) && a.pkg_exist == b.pkg_exist && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && a.scope == b.scope; } static bool Array_v__ast__IfBranch_arr_eq(Array_v__ast__IfBranch a, Array_v__ast__IfBranch b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__IfBranch_struct_eq(((v__ast__IfBranch*)a.data)[i], ((v__ast__IfBranch*)b.data)[i])) { return false; } } return true; } static bool v__ast__IfExpr_struct_eq(v__ast__IfExpr a, v__ast__IfExpr b) { return Array_v__ast__Comment_arr_eq(a.post_comments, b.post_comments) && Array_v__ast__IfBranch_arr_eq(a.branches, b.branches) && v__ast__Expr_sumtype_eq(a.left, b.left) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.tok_kind == b.tok_kind && a.is_comptime == b.is_comptime && a.is_expr == b.is_expr && a.has_else == b.has_else; } static bool v__ast__IfGuardVar_struct_eq(v__ast__IfGuardVar a, v__ast__IfGuardVar b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && a.is_mut == b.is_mut && v__token__Pos_struct_eq(a.pos, b.pos); } static bool Array_v__ast__IfGuardVar_arr_eq(Array_v__ast__IfGuardVar a, Array_v__ast__IfGuardVar b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__IfGuardVar_struct_eq(((v__ast__IfGuardVar*)a.data)[i], ((v__ast__IfGuardVar*)b.data)[i])) { return false; } } return true; } static bool v__ast__IfGuardExpr_struct_eq(v__ast__IfGuardExpr a, v__ast__IfGuardExpr b) { return Array_v__ast__IfGuardVar_arr_eq(a.vars, b.vars) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Type_alias_eq(a.expr_type, b.expr_type); } static bool v__ast__IndexExpr_struct_eq(v__ast__IndexExpr a, v__ast__IndexExpr b) { return v__ast__OrExpr_struct_eq(a.or_expr, b.or_expr) && v__ast__Expr_sumtype_eq(a.index, b.index) && v__ast__Expr_sumtype_eq(a.left, b.left) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.left_type, b.left_type) && a.is_setter == b.is_setter && a.is_map == b.is_map && a.is_array == b.is_array && a.is_farray == b.is_farray && a.is_option == b.is_option && a.is_direct == b.is_direct && a.is_gated == b.is_gated; } static bool v__ast__InfixExpr_struct_eq(v__ast__InfixExpr a, v__ast__InfixExpr b) { return v__ast__OrExpr_struct_eq(a.or_block, b.or_block) && Array_v__ast__Comment_arr_eq(a.before_op_comments, b.before_op_comments) && Array_v__ast__Comment_arr_eq(a.after_op_comments, b.after_op_comments) && v__ast__Expr_sumtype_eq(a.left, b.left) && v__ast__Expr_sumtype_eq(a.right, b.right) && ((a.auto_locked.len == b.auto_locked.len && a.auto_locked.len == 0) || string__eq(a.auto_locked, b.auto_locked)) && v__ast__ComptTimeConstValue_sumtype_eq(a.ct_left_value, b.ct_left_value) && v__ast__ComptTimeConstValue_sumtype_eq(a.ct_right_value, b.ct_right_value) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.left_type, b.left_type) && v__ast__Type_alias_eq(a.right_type, b.right_type) && v__ast__Type_alias_eq(a.promoted_type, b.promoted_type) && a.op == b.op && a.is_stmt == b.is_stmt && a.ct_left_value_evaled == b.ct_left_value_evaled && a.ct_right_value_evaled == b.ct_right_value_evaled; } static bool v__ast__IsRefType_struct_eq(v__ast__IsRefType a, v__ast__IsRefType b) { return a.guessed_type == b.guessed_type && a.is_type == b.is_type && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__ast__LambdaExpr_struct_eq(v__ast__LambdaExpr a, v__ast__LambdaExpr b) { return v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Ident_arr_eq(a.params, b.params) && v__token__Pos_struct_eq(a.pos_expr, b.pos_expr) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__token__Pos_struct_eq(a.pos_end, b.pos_end) && a.scope == b.scope && a.func == b.func && a.is_checked == b.is_checked && v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__ast__Likely_struct_eq(v__ast__Likely a, v__ast__Likely b) { return v__token__Pos_struct_eq(a.pos, b.pos) && a.is_likely == b.is_likely && v__ast__Expr_sumtype_eq(a.expr, b.expr); } static bool Array_bool_arr_eq(Array_bool a, Array_bool b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (*((bool*)((byte*)a.data+(i*a.element_size))) != *((bool*)((byte*)b.data+(i*b.element_size)))) { return false; } } return true; } static bool v__ast__LockExpr_struct_eq(v__ast__LockExpr a, v__ast__LockExpr b) { return Array_bool_arr_eq(a.is_rlock, b.is_rlock) && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && Array_v__ast__Expr_arr_eq(a.lockeds, b.lockeds) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && a.is_expr == b.is_expr && v__ast__Type_alias_eq(a.typ, b.typ) && a.scope == b.scope; } static bool v__ast__MapInit_struct_eq(v__ast__MapInit a, v__ast__MapInit b) { return Array_Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Comment_arr_eq(a.pre_cmnts, b.pre_cmnts) && Array_v__ast__Expr_arr_eq(a.keys, b.keys) && Array_v__ast__Expr_arr_eq(a.vals, b.vals) && Array_v__ast__Type_arr_eq(a.val_types, b.val_types) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.key_type, b.key_type) && v__ast__Type_alias_eq(a.value_type, b.value_type); } static bool v__ast__MatchBranch_struct_eq(v__ast__MatchBranch a, v__ast__MatchBranch b) { return Array_Array_v__ast__Comment_arr_eq(a.ecmnts, b.ecmnts) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_else == b.is_else && Array_v__ast__Comment_arr_eq(a.post_comments, b.post_comments) && v__token__Pos_struct_eq(a.branch_pos, b.branch_pos) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && Array_v__ast__Expr_arr_eq(a.exprs, b.exprs) && a.scope == b.scope; } static bool Array_v__ast__MatchBranch_arr_eq(Array_v__ast__MatchBranch a, Array_v__ast__MatchBranch b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__MatchBranch_struct_eq(((v__ast__MatchBranch*)a.data)[i], ((v__ast__MatchBranch*)b.data)[i])) { return false; } } return true; } static bool v__ast__MatchExpr_struct_eq(v__ast__MatchExpr a, v__ast__MatchExpr b) { return Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__MatchBranch_arr_eq(a.branches, b.branches) && v__ast__Expr_sumtype_eq(a.cond, b.cond) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.return_type, b.return_type) && v__ast__Type_alias_eq(a.cond_type, b.cond_type) && v__ast__Type_alias_eq(a.expected_type, b.expected_type) && a.tok_kind == b.tok_kind && a.is_expr == b.is_expr && a.is_sum_type == b.is_sum_type; } static bool v__ast__Nil_struct_eq(v__ast__Nil a, v__ast__Nil b) { return v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__NodeError_struct_eq(v__ast__NodeError a, v__ast__NodeError b) { return a.idx == b.idx && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__None_struct_eq(v__ast__None a, v__ast__None b) { return v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__OffsetOf_struct_eq(v__ast__OffsetOf a, v__ast__OffsetOf b) { return ((a.field.len == b.field.len && a.field.len == 0) || string__eq(a.field, b.field)) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.struct_type, b.struct_type); } static bool v__ast__ParExpr_struct_eq(v__ast__ParExpr a, v__ast__ParExpr b) { return v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && Array_v__ast__Comment_arr_eq(a.comments, b.comments); } static bool v__ast__PostfixExpr_struct_eq(v__ast__PostfixExpr a, v__ast__PostfixExpr b) { return a.op == b.op && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_c2v_prefix == b.is_c2v_prefix && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Type_alias_eq(a.typ, b.typ) && ((a.auto_locked.len == b.auto_locked.len && a.auto_locked.len == 0) || string__eq(a.auto_locked, b.auto_locked)); } static bool v__ast__PrefixExpr_struct_eq(v__ast__PrefixExpr a, v__ast__PrefixExpr b) { return v__ast__OrExpr_struct_eq(a.or_block, b.or_block) && v__ast__Expr_sumtype_eq(a.right, b.right) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.right_type, b.right_type) && a.op == b.op && a.is_option == b.is_option; } static bool v__ast__RangeExpr_struct_eq(v__ast__RangeExpr a, v__ast__RangeExpr b) { return v__ast__Expr_sumtype_eq(a.low, b.low) && v__ast__Expr_sumtype_eq(a.high, b.high) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.has_high == b.has_high && a.has_low == b.has_low && a.is_gated == b.is_gated; } static bool v__ast__SelectBranch_struct_eq(v__ast__SelectBranch a, v__ast__SelectBranch b) { return v__ast__Comment_struct_eq(a.comment, b.comment) && Array_v__ast__Comment_arr_eq(a.post_comments, b.post_comments) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && v__ast__Stmt_sumtype_eq(a.stmt, b.stmt) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_else == b.is_else && a.is_timeout == b.is_timeout; } static bool Array_v__ast__SelectBranch_arr_eq(Array_v__ast__SelectBranch a, Array_v__ast__SelectBranch b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__SelectBranch_struct_eq(((v__ast__SelectBranch*)a.data)[i], ((v__ast__SelectBranch*)b.data)[i])) { return false; } } return true; } static bool v__ast__SelectExpr_struct_eq(v__ast__SelectExpr a, v__ast__SelectExpr b) { return Array_v__ast__SelectBranch_arr_eq(a.branches, b.branches) && v__token__Pos_struct_eq(a.pos, b.pos) && a.has_exception == b.has_exception && a.is_expr == b.is_expr && v__ast__Type_alias_eq(a.expected_type, b.expected_type); } static bool v__ast__SelectorExpr_struct_eq(v__ast__SelectorExpr a, v__ast__SelectorExpr b) { return v__ast__OrExpr_struct_eq(a.or_block, b.or_block) && Array_v__ast__Type_arr_eq(a.from_embed_types, b.from_embed_types) && ((a.field_name.len == b.field_name.len && a.field_name.len == 0) || string__eq(a.field_name, b.field_name)) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && a.scope == b.scope && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.mut_pos, b.mut_pos) && v__ast__Type_alias_eq(a.expr_type, b.expr_type) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.name_type, b.name_type) && a.next_token == b.next_token && a.gkind_field == b.gkind_field && a.is_mut == b.is_mut && a.has_hidden_receiver == b.has_hidden_receiver; } static bool v__ast__SizeOf_struct_eq(v__ast__SizeOf a, v__ast__SizeOf b) { return a.guessed_type == b.guessed_type && a.is_type == b.is_type && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__ast__SpawnExpr_struct_eq(v__ast__SpawnExpr a, v__ast__SpawnExpr b) { return v__ast__CallExpr_struct_eq(a.call_expr, b.call_expr) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_expr == b.is_expr; } static bool v__ast__TypeNode_struct_eq(v__ast__TypeNode a, v__ast__TypeNode b) { return v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && Array_v__ast__Comment_arr_eq(a.end_comments, b.end_comments); } static bool Map_int_v__ast__SqlExpr_map_eq(Map_int_v__ast__SqlExpr a, Map_int_v__ast__SqlExpr b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.key_values.len; ++i) { if (!DenseArray_has_index(&a.key_values, i)) continue; voidptr k = DenseArray_key(&a.key_values, i); if (!map_exists(&b, k)) return false; v__ast__SqlExpr v = *(v__ast__SqlExpr*)map_get(&a, k, &(v__ast__SqlExpr[]){ 0 }); if (!v__ast__SqlExpr_struct_eq(*(v__ast__SqlExpr*)map_get(&b, k, &(v__ast__SqlExpr[]){ 0 }), v)) { return false; } } return true; } static bool v__ast__SqlExpr_struct_eq(v__ast__SqlExpr a, v__ast__SqlExpr b) { return a.is_count == b.is_count && a.has_where == b.has_where && a.has_order == b.has_order && a.has_limit == b.has_limit && a.has_offset == b.has_offset && a.has_desc == b.has_desc && a.is_array == b.is_array && a.is_generated == b.is_generated && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Expr_sumtype_eq(a.db_expr, b.db_expr) && v__ast__Expr_sumtype_eq(a.where_expr, b.where_expr) && v__ast__Expr_sumtype_eq(a.order_expr, b.order_expr) && v__ast__Expr_sumtype_eq(a.limit_expr, b.limit_expr) && v__ast__Expr_sumtype_eq(a.offset_expr, b.offset_expr) && v__ast__TypeNode_struct_eq(a.table_expr, b.table_expr) && Array_v__ast__StructField_arr_eq(a.fields, b.fields) && Map_int_v__ast__SqlExpr_map_eq(a.sub_structs, b.sub_structs) && v__ast__OrExpr_struct_eq(a.or_expr, b.or_expr); } static bool Array_int_arr_eq(Array_int a, Array_int b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (*((int*)((byte*)a.data+(i*a.element_size))) != *((int*)((byte*)b.data+(i*b.element_size)))) { return false; } } return true; } static bool Array_v__token__Pos_arr_eq(Array_v__token__Pos a, Array_v__token__Pos b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__token__Pos_struct_eq(((v__token__Pos*)a.data)[i], ((v__token__Pos*)b.data)[i])) { return false; } } return true; } static bool v__ast__StringInterLiteral_struct_eq(v__ast__StringInterLiteral a, v__ast__StringInterLiteral b) { return Array_string_arr_eq(a.vals, b.vals) && Array_int_arr_eq(a.fwidths, b.fwidths) && Array_int_arr_eq(a.precisions, b.precisions) && Array_bool_arr_eq(a.pluss, b.pluss) && Array_bool_arr_eq(a.fills, b.fills) && Array_v__token__Pos_arr_eq(a.fmt_poss, b.fmt_poss) && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Expr_arr_eq(a.exprs, b.exprs) && Array_v__ast__Type_arr_eq(a.expr_types, b.expr_types) && Array_u8_arr_eq(a.fmts, b.fmts) && Array_bool_arr_eq(a.need_fmts, b.need_fmts); } static bool v__ast__StringLiteral_struct_eq(v__ast__StringLiteral a, v__ast__StringLiteral b) { return ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.language == b.language && a.is_raw == b.is_raw; } static bool v__ast__StructInitField_struct_eq(v__ast__StructInitField a, v__ast__StructInitField b) { return v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.name_pos, b.name_pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Comment_arr_eq(a.next_comments, b.next_comments) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.expected_type, b.expected_type) && v__ast__Type_alias_eq(a.parent_type, b.parent_type); } static bool Array_v__ast__StructInitField_arr_eq(Array_v__ast__StructInitField a, Array_v__ast__StructInitField b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__StructInitField_struct_eq(((v__ast__StructInitField*)a.data)[i], ((v__ast__StructInitField*)b.data)[i])) { return false; } } return true; } static bool v__ast__StructInit_struct_eq(v__ast__StructInit a, v__ast__StructInit b) { return Array_v__ast__Comment_arr_eq(a.pre_comments, b.pre_comments) && Array_v__ast__Comment_arr_eq(a.update_expr_comments, b.update_expr_comments) && Array_v__ast__StructInitField_arr_eq(a.init_fields, b.init_fields) && Array_v__ast__Type_arr_eq(a.generic_types, b.generic_types) && ((a.typ_str.len == b.typ_str.len && a.typ_str.len == 0) || string__eq(a.typ_str, b.typ_str)) && v__ast__Expr_sumtype_eq(a.update_expr, b.update_expr) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.name_pos, b.name_pos) && v__token__Pos_struct_eq(a.update_expr_pos, b.update_expr_pos) && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.update_expr_type, b.update_expr_type) && a.no_keys == b.no_keys && a.is_short_syntax == b.is_short_syntax && a.is_anon == b.is_anon && a.unresolved == b.unresolved && a.is_update_embed == b.is_update_embed && a.has_update_expr == b.has_update_expr; } static bool v__ast__TypeOf_struct_eq(v__ast__TypeOf a, v__ast__TypeOf b) { return v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.is_type == b.is_type; } static bool v__ast__UnsafeExpr_struct_eq(v__ast__UnsafeExpr a, v__ast__UnsafeExpr b) { return v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr); } static bool v__ast__Expr_sumtype_eq(v__ast__Expr a, v__ast__Expr b) { if (a._typ != b._typ) { return false; } if (a._typ == b._typ && b._typ == 0) { return true; } // uninitialized if (a._typ == 261) { return v__ast__AnonFn_struct_eq(*a._v__ast__AnonFn, *b._v__ast__AnonFn); } if (a._typ == 262) { return v__ast__ArrayDecompose_struct_eq(*a._v__ast__ArrayDecompose, *b._v__ast__ArrayDecompose); } if (a._typ == 263) { return v__ast__ArrayInit_struct_eq(*a._v__ast__ArrayInit, *b._v__ast__ArrayInit); } if (a._typ == 264) { return v__ast__AsCast_struct_eq(*a._v__ast__AsCast, *b._v__ast__AsCast); } if (a._typ == 265) { return v__ast__Assoc_struct_eq(*a._v__ast__Assoc, *b._v__ast__Assoc); } if (a._typ == 266) { return v__ast__AtExpr_struct_eq(*a._v__ast__AtExpr, *b._v__ast__AtExpr); } if (a._typ == 267) { return v__ast__BoolLiteral_struct_eq(*a._v__ast__BoolLiteral, *b._v__ast__BoolLiteral); } if (a._typ == 268) { return v__ast__CTempVar_struct_eq(*a._v__ast__CTempVar, *b._v__ast__CTempVar); } if (a._typ == 269) { return v__ast__CallExpr_struct_eq(*a._v__ast__CallExpr, *b._v__ast__CallExpr); } if (a._typ == 270) { return v__ast__CastExpr_struct_eq(*a._v__ast__CastExpr, *b._v__ast__CastExpr); } if (a._typ == 271) { return v__ast__ChanInit_struct_eq(*a._v__ast__ChanInit, *b._v__ast__ChanInit); } if (a._typ == 272) { return v__ast__CharLiteral_struct_eq(*a._v__ast__CharLiteral, *b._v__ast__CharLiteral); } if (a._typ == 273) { return v__ast__Comment_struct_eq(*a._v__ast__Comment, *b._v__ast__Comment); } if (a._typ == 274) { return v__ast__ComptimeCall_struct_eq(*a._v__ast__ComptimeCall, *b._v__ast__ComptimeCall); } if (a._typ == 275) { return v__ast__ComptimeSelector_struct_eq(*a._v__ast__ComptimeSelector, *b._v__ast__ComptimeSelector); } if (a._typ == 276) { return v__ast__ComptimeType_struct_eq(*a._v__ast__ComptimeType, *b._v__ast__ComptimeType); } if (a._typ == 277) { return v__ast__ConcatExpr_struct_eq(*a._v__ast__ConcatExpr, *b._v__ast__ConcatExpr); } if (a._typ == 278) { return v__ast__DumpExpr_struct_eq(*a._v__ast__DumpExpr, *b._v__ast__DumpExpr); } if (a._typ == 279) { return v__ast__EmptyExpr_alias_eq(*a._v__ast__EmptyExpr, *b._v__ast__EmptyExpr); } if (a._typ == 280) { return v__ast__EnumVal_struct_eq(*a._v__ast__EnumVal, *b._v__ast__EnumVal); } if (a._typ == 281) { return v__ast__FloatLiteral_struct_eq(*a._v__ast__FloatLiteral, *b._v__ast__FloatLiteral); } if (a._typ == 282) { return v__ast__GoExpr_struct_eq(*a._v__ast__GoExpr, *b._v__ast__GoExpr); } if (a._typ == 283) { return v__ast__Ident_struct_eq(*a._v__ast__Ident, *b._v__ast__Ident); } if (a._typ == 284) { return v__ast__IfExpr_struct_eq(*a._v__ast__IfExpr, *b._v__ast__IfExpr); } if (a._typ == 285) { return v__ast__IfGuardExpr_struct_eq(*a._v__ast__IfGuardExpr, *b._v__ast__IfGuardExpr); } if (a._typ == 286) { return v__ast__IndexExpr_struct_eq(*a._v__ast__IndexExpr, *b._v__ast__IndexExpr); } if (a._typ == 287) { return v__ast__InfixExpr_struct_eq(*a._v__ast__InfixExpr, *b._v__ast__InfixExpr); } if (a._typ == 288) { return v__ast__IntegerLiteral_struct_eq(*a._v__ast__IntegerLiteral, *b._v__ast__IntegerLiteral); } if (a._typ == 289) { return v__ast__IsRefType_struct_eq(*a._v__ast__IsRefType, *b._v__ast__IsRefType); } if (a._typ == 290) { return v__ast__LambdaExpr_struct_eq(*a._v__ast__LambdaExpr, *b._v__ast__LambdaExpr); } if (a._typ == 291) { return v__ast__Likely_struct_eq(*a._v__ast__Likely, *b._v__ast__Likely); } if (a._typ == 292) { return v__ast__LockExpr_struct_eq(*a._v__ast__LockExpr, *b._v__ast__LockExpr); } if (a._typ == 293) { return v__ast__MapInit_struct_eq(*a._v__ast__MapInit, *b._v__ast__MapInit); } if (a._typ == 294) { return v__ast__MatchExpr_struct_eq(*a._v__ast__MatchExpr, *b._v__ast__MatchExpr); } if (a._typ == 295) { return v__ast__Nil_struct_eq(*a._v__ast__Nil, *b._v__ast__Nil); } if (a._typ == 296) { return v__ast__NodeError_struct_eq(*a._v__ast__NodeError, *b._v__ast__NodeError); } if (a._typ == 297) { return v__ast__None_struct_eq(*a._v__ast__None, *b._v__ast__None); } if (a._typ == 298) { return v__ast__OffsetOf_struct_eq(*a._v__ast__OffsetOf, *b._v__ast__OffsetOf); } if (a._typ == 299) { return v__ast__OrExpr_struct_eq(*a._v__ast__OrExpr, *b._v__ast__OrExpr); } if (a._typ == 300) { return v__ast__ParExpr_struct_eq(*a._v__ast__ParExpr, *b._v__ast__ParExpr); } if (a._typ == 301) { return v__ast__PostfixExpr_struct_eq(*a._v__ast__PostfixExpr, *b._v__ast__PostfixExpr); } if (a._typ == 302) { return v__ast__PrefixExpr_struct_eq(*a._v__ast__PrefixExpr, *b._v__ast__PrefixExpr); } if (a._typ == 303) { return v__ast__RangeExpr_struct_eq(*a._v__ast__RangeExpr, *b._v__ast__RangeExpr); } if (a._typ == 304) { return v__ast__SelectExpr_struct_eq(*a._v__ast__SelectExpr, *b._v__ast__SelectExpr); } if (a._typ == 305) { return v__ast__SelectorExpr_struct_eq(*a._v__ast__SelectorExpr, *b._v__ast__SelectorExpr); } if (a._typ == 306) { return v__ast__SizeOf_struct_eq(*a._v__ast__SizeOf, *b._v__ast__SizeOf); } if (a._typ == 307) { return v__ast__SpawnExpr_struct_eq(*a._v__ast__SpawnExpr, *b._v__ast__SpawnExpr); } if (a._typ == 308) { return v__ast__SqlExpr_struct_eq(*a._v__ast__SqlExpr, *b._v__ast__SqlExpr); } if (a._typ == 309) { return v__ast__StringInterLiteral_struct_eq(*a._v__ast__StringInterLiteral, *b._v__ast__StringInterLiteral); } if (a._typ == 310) { return v__ast__StringLiteral_struct_eq(*a._v__ast__StringLiteral, *b._v__ast__StringLiteral); } if (a._typ == 311) { return v__ast__StructInit_struct_eq(*a._v__ast__StructInit, *b._v__ast__StructInit); } if (a._typ == 312) { return v__ast__TypeNode_struct_eq(*a._v__ast__TypeNode, *b._v__ast__TypeNode); } if (a._typ == 313) { return v__ast__TypeOf_struct_eq(*a._v__ast__TypeOf, *b._v__ast__TypeOf); } if (a._typ == 314) { return v__ast__UnsafeExpr_struct_eq(*a._v__ast__UnsafeExpr, *b._v__ast__UnsafeExpr); } return false; } static bool v__ast__AsmIO_struct_eq(v__ast__AsmIO a, v__ast__AsmIO b) { return ((a.alias.len == b.alias.len && a.alias.len == 0) || string__eq(a.alias, b.alias)) && ((a.constraint.len == b.constraint.len && a.constraint.len == 0) || string__eq(a.constraint, b.constraint)) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && v__ast__Type_alias_eq(a.typ, b.typ) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Expr_sumtype_eq(a.expr, b.expr); } static bool Array_v__ast__AsmIO_arr_eq(Array_v__ast__AsmIO a, Array_v__ast__AsmIO b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__AsmIO_struct_eq(((v__ast__AsmIO*)a.data)[i], ((v__ast__AsmIO*)b.data)[i])) { return false; } } return true; } static bool v__ast__AsmStmt_struct_eq(v__ast__AsmStmt a, v__ast__AsmStmt b) { return Array_v__ast__AsmClobbered_arr_eq(a.clobbered, b.clobbered) && Array_v__ast__AsmTemplate_arr_eq(a.templates, b.templates) && Array_v__ast__AsmIO_arr_eq(a.output, b.output) && Array_v__ast__AsmIO_arr_eq(a.input, b.input) && Array_string_arr_eq(a.global_labels, b.global_labels) && Array_string_arr_eq(a.local_labels, b.local_labels) && a.scope == b.scope && v__token__Pos_struct_eq(a.pos, b.pos) && a.arch == b.arch && a.is_basic == b.is_basic && a.is_volatile == b.is_volatile && a.is_goto == b.is_goto; } static bool v__ast__AssertStmt_struct_eq(v__ast__AssertStmt a, v__ast__AssertStmt b) { return v__ast__Expr_sumtype_eq(a.expr, b.expr) && v__ast__Expr_sumtype_eq(a.extra, b.extra) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.extra_pos, b.extra_pos) && a.is_used == b.is_used; } static bool v__ast__AssignStmt_struct_eq(v__ast__AssignStmt a, v__ast__AssignStmt b) { return Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Comment_arr_eq(a.end_comments, b.end_comments) && Array_v__ast__Expr_arr_eq(a.right, b.right) && Array_v__ast__Expr_arr_eq(a.left, b.left) && Array_v__ast__Type_arr_eq(a.left_types, b.left_types) && Array_v__ast__Type_arr_eq(a.right_types, b.right_types) && v__token__Pos_struct_eq(a.pos, b.pos) && a.op == b.op && a.is_static == b.is_static && a.is_volatile == b.is_volatile && a.is_simple == b.is_simple && a.has_cross_var == b.has_cross_var; } static bool v__ast__Block_struct_eq(v__ast__Block a, v__ast__Block b) { return a.is_unsafe == b.is_unsafe && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts); } static bool v__ast__BranchStmt_struct_eq(v__ast__BranchStmt a, v__ast__BranchStmt b) { return ((a.label.len == b.label.len && a.label.len == 0) || string__eq(a.label, b.label)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.kind == b.kind; } static bool v__ast__ComptimeFor_struct_eq(v__ast__ComptimeFor a, v__ast__ComptimeFor b) { return ((a.val_var.len == b.val_var.len && a.val_var.len == 0) || string__eq(a.val_var, b.val_var)) && a.kind == b.kind && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.typ_pos, b.typ_pos) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && v__ast__Type_alias_eq(a.typ, b.typ); } static bool Array_v__ast__ConstField_arr_eq(Array_v__ast__ConstField a, Array_v__ast__ConstField b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__ConstField_struct_eq(((v__ast__ConstField*)a.data)[i], ((v__ast__ConstField*)b.data)[i])) { return false; } } return true; } static bool v__ast__ConstDecl_struct_eq(v__ast__ConstDecl a, v__ast__ConstDecl b) { return Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && Array_v__ast__ConstField_arr_eq(a.fields, b.fields) && Array_v__ast__Comment_arr_eq(a.end_comments, b.end_comments) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_pub == b.is_pub && a.is_block == b.is_block; } static bool v__ast__EmptyStmt_struct_eq(v__ast__EmptyStmt a, v__ast__EmptyStmt b) { return v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__EnumField_struct_eq(v__ast__EnumField a, v__ast__EnumField b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Comment_arr_eq(a.next_comments, b.next_comments) && a.has_expr == b.has_expr && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && v__ast__Expr_sumtype_eq(a.expr, b.expr); } static bool Array_v__ast__EnumField_arr_eq(Array_v__ast__EnumField a, Array_v__ast__EnumField b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__EnumField_struct_eq(((v__ast__EnumField*)a.data)[i], ((v__ast__EnumField*)b.data)[i])) { return false; } } return true; } static bool v__ast__EnumDecl_struct_eq(v__ast__EnumDecl a, v__ast__EnumDecl b) { return Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__EnumField_arr_eq(a.fields, b.fields) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.typ_pos, b.typ_pos) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.is_pub == b.is_pub && a.is_flag == b.is_flag && a.is_multi_allowed == b.is_multi_allowed; } static bool v__ast__ExprStmt_struct_eq(v__ast__ExprStmt a, v__ast__ExprStmt b) { return v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && v__ast__Expr_sumtype_eq(a.expr, b.expr) && a.is_expr == b.is_expr && v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__ast__ForCStmt_struct_eq(v__ast__ForCStmt a, v__ast__ForCStmt b) { return a.has_init == b.has_init && a.has_cond == b.has_cond && a.has_inc == b.has_inc && a.is_multi == b.is_multi && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && v__ast__Stmt_sumtype_eq(a.init, b.init) && v__ast__Expr_sumtype_eq(a.cond, b.cond) && v__ast__Stmt_sumtype_eq(a.inc, b.inc) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && ((a.label.len == b.label.len && a.label.len == 0) || string__eq(a.label, b.label)) && a.scope == b.scope; } static bool v__ast__ForInStmt_struct_eq(v__ast__ForInStmt a, v__ast__ForInStmt b) { return Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && ((a.key_var.len == b.key_var.len && a.key_var.len == 0) || string__eq(a.key_var, b.key_var)) && ((a.val_var.len == b.val_var.len && a.val_var.len == 0) || string__eq(a.val_var, b.val_var)) && v__ast__Expr_sumtype_eq(a.cond, b.cond) && v__ast__Expr_sumtype_eq(a.high, b.high) && ((a.label.len == b.label.len && a.label.len == 0) || string__eq(a.label, b.label)) && a.scope == b.scope && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.kv_pos, b.kv_pos) && v__ast__Type_alias_eq(a.key_type, b.key_type) && v__ast__Type_alias_eq(a.val_type, b.val_type) && v__ast__Type_alias_eq(a.cond_type, b.cond_type) && v__ast__Type_alias_eq(a.high_type, b.high_type) && a.kind == b.kind && a.is_range == b.is_range && a.val_is_mut == b.val_is_mut && a.val_is_ref == b.val_is_ref; } static bool v__ast__ForStmt_struct_eq(v__ast__ForStmt a, v__ast__ForStmt b) { return a.is_inf == b.is_inf && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && v__ast__Expr_sumtype_eq(a.cond, b.cond) && Array_v__ast__Stmt_arr_eq(a.stmts, b.stmts) && ((a.label.len == b.label.len && a.label.len == 0) || string__eq(a.label, b.label)) && a.scope == b.scope; } static bool Array_v__ast__GlobalField_arr_eq(Array_v__ast__GlobalField a, Array_v__ast__GlobalField b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__GlobalField_struct_eq(((v__ast__GlobalField*)a.data)[i], ((v__ast__GlobalField*)b.data)[i])) { return false; } } return true; } static bool v__ast__GlobalDecl_struct_eq(v__ast__GlobalDecl a, v__ast__GlobalDecl b) { return ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_block == b.is_block && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && Array_v__ast__GlobalField_arr_eq(a.fields, b.fields) && Array_v__ast__Comment_arr_eq(a.end_comments, b.end_comments); } static bool v__ast__GotoLabel_struct_eq(v__ast__GotoLabel a, v__ast__GotoLabel b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_used == b.is_used; } static bool v__ast__GotoStmt_struct_eq(v__ast__GotoStmt a, v__ast__GotoStmt b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.pos, b.pos); } static bool v__ast__HashStmt_struct_eq(v__ast__HashStmt a, v__ast__HashStmt b) { return ((a.mod.len == b.mod.len && a.mod.len == 0) || string__eq(a.mod, b.mod)) && v__token__Pos_struct_eq(a.pos, b.pos) && ((a.source_file.len == b.source_file.len && a.source_file.len == 0) || string__eq(a.source_file, b.source_file)) && ((a.val.len == b.val.len && a.val.len == 0) || string__eq(a.val, b.val)) && ((a.kind.len == b.kind.len && a.kind.len == 0) || string__eq(a.kind, b.kind)) && ((a.main.len == b.main.len && a.main.len == 0) || string__eq(a.main, b.main)) && ((a.msg.len == b.msg.len && a.msg.len == 0) || string__eq(a.msg, b.msg)) && Array_v__ast__Expr_arr_eq(a.ct_conds, b.ct_conds); } static bool Array_v__ast__FnDecl_arr_eq(Array_v__ast__FnDecl a, Array_v__ast__FnDecl b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__FnDecl_struct_eq(((v__ast__FnDecl*)a.data)[i], ((v__ast__FnDecl*)b.data)[i])) { return false; } } return true; } static bool v__ast__InterfaceEmbedding_struct_eq(v__ast__InterfaceEmbedding a, v__ast__InterfaceEmbedding b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__ast__Type_alias_eq(a.typ, b.typ) && v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments); } static bool Array_v__ast__InterfaceEmbedding_arr_eq(Array_v__ast__InterfaceEmbedding a, Array_v__ast__InterfaceEmbedding b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__InterfaceEmbedding_struct_eq(((v__ast__InterfaceEmbedding*)a.data)[i], ((v__ast__InterfaceEmbedding*)b.data)[i])) { return false; } } return true; } static bool v__ast__InterfaceDecl_struct_eq(v__ast__InterfaceDecl a, v__ast__InterfaceDecl b) { return Array_string_arr_eq(a.field_names, b.field_names) && Array_v__ast__Comment_arr_eq(a.pre_comments, b.pre_comments) && Array_v__ast__Type_arr_eq(a.generic_types, b.generic_types) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && Array_v__ast__FnDecl_arr_eq(a.methods, b.methods) && Array_v__ast__StructField_arr_eq(a.fields, b.fields) && Array_v__ast__InterfaceEmbedding_arr_eq(a.embeds, b.embeds) && ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && v__token__Pos_struct_eq(a.name_pos, b.name_pos) && v__token__Pos_struct_eq(a.pos, b.pos) && v__ast__Type_alias_eq(a.typ, b.typ) && a.mut_pos == b.mut_pos && a.language == b.language && a.is_pub == b.is_pub && a.are_embeds_expanded == b.are_embeds_expanded; } static bool v__ast__Return_struct_eq(v__ast__Return a, v__ast__Return b) { return v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Expr_arr_eq(a.exprs, b.exprs) && Array_v__ast__Type_arr_eq(a.types, b.types); } static bool v__ast__SemicolonStmt_struct_eq(v__ast__SemicolonStmt a, v__ast__SemicolonStmt b) { return v__token__Pos_struct_eq(a.pos, b.pos); } static bool Map_int_v__ast__SqlStmtLine_map_eq(Map_int_v__ast__SqlStmtLine a, Map_int_v__ast__SqlStmtLine b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.key_values.len; ++i) { if (!DenseArray_has_index(&a.key_values, i)) continue; voidptr k = DenseArray_key(&a.key_values, i); if (!map_exists(&b, k)) return false; v__ast__SqlStmtLine v = *(v__ast__SqlStmtLine*)map_get(&a, k, &(v__ast__SqlStmtLine[]){ 0 }); if (!v__ast__SqlStmtLine_struct_eq(*(v__ast__SqlStmtLine*)map_get(&b, k, &(v__ast__SqlStmtLine[]){ 0 }), v)) { return false; } } return true; } static bool v__ast__SqlStmtLine_struct_eq(v__ast__SqlStmtLine a, v__ast__SqlStmtLine b) { return a.kind == b.kind && v__token__Pos_struct_eq(a.pos, b.pos) && a.is_generated == b.is_generated && a.scope == b.scope && ((a.object_var_name.len == b.object_var_name.len && a.object_var_name.len == 0) || string__eq(a.object_var_name, b.object_var_name)) && Array_string_arr_eq(a.updated_columns, b.updated_columns) && v__ast__TypeNode_struct_eq(a.table_expr, b.table_expr) && Array_v__ast__StructField_arr_eq(a.fields, b.fields) && Map_int_v__ast__SqlStmtLine_map_eq(a.sub_structs, b.sub_structs) && v__ast__Expr_sumtype_eq(a.where_expr, b.where_expr) && Array_v__ast__Expr_arr_eq(a.update_exprs, b.update_exprs); } static bool Array_v__ast__SqlStmtLine_arr_eq(Array_v__ast__SqlStmtLine a, Array_v__ast__SqlStmtLine b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__SqlStmtLine_struct_eq(((v__ast__SqlStmtLine*)a.data)[i], ((v__ast__SqlStmtLine*)b.data)[i])) { return false; } } return true; } static bool v__ast__SqlStmt_struct_eq(v__ast__SqlStmt a, v__ast__SqlStmt b) { return v__token__Pos_struct_eq(a.pos, b.pos) && Array_v__ast__SqlStmtLine_arr_eq(a.lines, b.lines) && v__ast__Expr_sumtype_eq(a.db_expr, b.db_expr) && v__ast__OrExpr_struct_eq(a.or_expr, b.or_expr) && v__ast__Type_alias_eq(a.db_expr_type, b.db_expr_type); } static bool v__ast__AliasTypeDecl_struct_eq(v__ast__AliasTypeDecl a, v__ast__AliasTypeDecl b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && a.is_pub == b.is_pub && v__ast__Type_alias_eq(a.typ, b.typ) && v__ast__Type_alias_eq(a.parent_type, b.parent_type) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.type_pos, b.type_pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments); } static bool v__ast__FnTypeDecl_struct_eq(v__ast__FnTypeDecl a, v__ast__FnTypeDecl b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && a.is_pub == b.is_pub && v__ast__Type_alias_eq(a.typ, b.typ) && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.type_pos, b.type_pos) && Array_v__ast__Comment_arr_eq(a.comments, b.comments) && Array_v__ast__Type_arr_eq(a.generic_types, b.generic_types) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs); } static bool Array_v__ast__TypeNode_arr_eq(Array_v__ast__TypeNode a, Array_v__ast__TypeNode b) { if (a.len != b.len) { return false; } for (int i = 0; i < a.len; ++i) { if (!v__ast__TypeNode_struct_eq(((v__ast__TypeNode*)a.data)[i], ((v__ast__TypeNode*)b.data)[i])) { return false; } } return true; } static bool v__ast__SumTypeDecl_struct_eq(v__ast__SumTypeDecl a, v__ast__SumTypeDecl b) { return ((a.name.len == b.name.len && a.name.len == 0) || string__eq(a.name, b.name)) && a.is_pub == b.is_pub && v__token__Pos_struct_eq(a.pos, b.pos) && v__token__Pos_struct_eq(a.name_pos, b.name_pos) && v__ast__Type_alias_eq(a.typ, b.typ) && Array_v__ast__Type_arr_eq(a.generic_types, b.generic_types) && Array_v__ast__Attr_arr_eq(a.attrs, b.attrs) && Array_v__ast__TypeNode_arr_eq(a.variants, b.variants); } static bool v__ast__TypeDecl_sumtype_eq(v__ast__TypeDecl a, v__ast__TypeDecl b) { if (a._typ != b._typ) { return false; } if (a._typ == b._typ && b._typ == 0) { return true; } // uninitialized if (a._typ == 257) { return v__ast__AliasTypeDecl_struct_eq(*a._v__ast__AliasTypeDecl, *b._v__ast__AliasTypeDecl); } if (a._typ == 258) { return v__ast__FnTypeDecl_struct_eq(*a._v__ast__FnTypeDecl, *b._v__ast__FnTypeDecl); } if (a._typ == 259) { return v__ast__SumTypeDecl_struct_eq(*a._v__ast__SumTypeDecl, *b._v__ast__SumTypeDecl); } return false; } static bool v__ast__Stmt_sumtype_eq(v__ast__Stmt a, v__ast__Stmt b) { if (a._typ != b._typ) { return false; } if (a._typ == b._typ && b._typ == 0) { return true; } // uninitialized if (a._typ == 316) { return v__ast__AsmStmt_struct_eq(*a._v__ast__AsmStmt, *b._v__ast__AsmStmt); } if (a._typ == 317) { return v__ast__AssertStmt_struct_eq(*a._v__ast__AssertStmt, *b._v__ast__AssertStmt); } if (a._typ == 318) { return v__ast__AssignStmt_struct_eq(*a._v__ast__AssignStmt, *b._v__ast__AssignStmt); } if (a._typ == 319) { return v__ast__Block_struct_eq(*a._v__ast__Block, *b._v__ast__Block); } if (a._typ == 320) { return v__ast__BranchStmt_struct_eq(*a._v__ast__BranchStmt, *b._v__ast__BranchStmt); } if (a._typ == 321) { return v__ast__ComptimeFor_struct_eq(*a._v__ast__ComptimeFor, *b._v__ast__ComptimeFor); } if (a._typ == 322) { return v__ast__ConstDecl_struct_eq(*a._v__ast__ConstDecl, *b._v__ast__ConstDecl); } if (a._typ == 323) { return v__ast__DeferStmt_struct_eq(*a._v__ast__DeferStmt, *b._v__ast__DeferStmt); } if (a._typ == 324) { return v__ast__EmptyStmt_struct_eq(*a._v__ast__EmptyStmt, *b._v__ast__EmptyStmt); } if (a._typ == 325) { return v__ast__EnumDecl_struct_eq(*a._v__ast__EnumDecl, *b._v__ast__EnumDecl); } if (a._typ == 326) { return v__ast__ExprStmt_struct_eq(*a._v__ast__ExprStmt, *b._v__ast__ExprStmt); } if (a._typ == 194) { return v__ast__FnDecl_struct_eq(*a._v__ast__FnDecl, *b._v__ast__FnDecl); } if (a._typ == 327) { return v__ast__ForCStmt_struct_eq(*a._v__ast__ForCStmt, *b._v__ast__ForCStmt); } if (a._typ == 328) { return v__ast__ForInStmt_struct_eq(*a._v__ast__ForInStmt, *b._v__ast__ForInStmt); } if (a._typ == 329) { return v__ast__ForStmt_struct_eq(*a._v__ast__ForStmt, *b._v__ast__ForStmt); } if (a._typ == 330) { return v__ast__GlobalDecl_struct_eq(*a._v__ast__GlobalDecl, *b._v__ast__GlobalDecl); } if (a._typ == 331) { return v__ast__GotoLabel_struct_eq(*a._v__ast__GotoLabel, *b._v__ast__GotoLabel); } if (a._typ == 332) { return v__ast__GotoStmt_struct_eq(*a._v__ast__GotoStmt, *b._v__ast__GotoStmt); } if (a._typ == 333) { return v__ast__HashStmt_struct_eq(*a._v__ast__HashStmt, *b._v__ast__HashStmt); } if (a._typ == 334) { return v__ast__Import_struct_eq(*a._v__ast__Import, *b._v__ast__Import); } if (a._typ == 335) { return v__ast__InterfaceDecl_struct_eq(*a._v__ast__InterfaceDecl, *b._v__ast__InterfaceDecl); } if (a._typ == 336) { return v__ast__Module_struct_eq(*a._v__ast__Module, *b._v__ast__Module); } if (a._typ == 296) { return v__ast__NodeError_struct_eq(*a._v__ast__NodeError, *b._v__ast__NodeError); } if (a._typ == 337) { return v__ast__Return_struct_eq(*a._v__ast__Return, *b._v__ast__Return); } if (a._typ == 338) { return v__ast__SemicolonStmt_struct_eq(*a._v__ast__SemicolonStmt, *b._v__ast__SemicolonStmt); } if (a._typ == 339) { return v__ast__SqlStmt_struct_eq(*a._v__ast__SqlStmt, *b._v__ast__SqlStmt); } if (a._typ == 340) { return v__ast__StructDecl_struct_eq(*a._v__ast__StructDecl, *b._v__ast__StructDecl); } if (a._typ == 260) { return v__ast__TypeDecl_sumtype_eq(*a._v__ast__TypeDecl, *b._v__ast__TypeDecl); } return false; } static bool v__gen__c__StrType_struct_eq(v__gen__c__StrType a, v__gen__c__StrType b) { return ((a.styp.len == b.styp.len && a.styp.len == 0) || string__eq(a.styp, b.styp)) && v__ast__Type_alias_eq(a.typ, b.typ); } static bool v__gen__c__SumtypeCastingFn_struct_eq(v__gen__c__SumtypeCastingFn a, v__gen__c__SumtypeCastingFn b) { return ((a.fn_name.len == b.fn_name.len && a.fn_name.len == 0) || string__eq(a.fn_name, b.fn_name)) && v__ast__Type_alias_eq(a.got, b.got) && v__ast__Type_alias_eq(a.exp, b.exp); } void v__ast__Comment_free(v__ast__Comment* it) { string_free(&(it->text)); v__token__Pos_free(&(it->pos)); } void Array_v__ast__Comment_free(Array_v__ast__Comment* it) { for (int i = 0; i < it->len; i++) { v__ast__Comment_free(&(((v__ast__Comment*)it->data)[i])); } array_free(it); } void v__ast__Param_free(v__ast__Param* it) { Array_v__ast__Comment_free(&(it->comments)); string_free(&(it->name)); v__token__Pos_free(&(it->pos)); v__token__Pos_free(&(it->type_pos)); } void Array_v__ast__Param_free(Array_v__ast__Param* it) { for (int i = 0; i < it->len; i++) { v__ast__Param_free(&(((v__ast__Param*)it->data)[i])); } array_free(it); } void v__ast__Attr_free(v__ast__Attr* it) { string_free(&(it->name)); string_free(&(it->arg)); v__token__Pos_free(&(it->pos)); } void Array_v__ast__Attr_free(Array_v__ast__Attr* it) { for (int i = 0; i < it->len; i++) { v__ast__Attr_free(&(((v__ast__Attr*)it->data)[i])); } array_free(it); } void v__ast__Fn_free(v__ast__Fn* it) { Array_v__ast__Param_free(&(it->params)); Array_string_free(&(it->generic_names)); Array_string_free(&(it->dep_names)); Array_v__ast__Attr_free(&(it->attrs)); string_free(&(it->mod)); string_free(&(it->file)); string_free(&(it->name)); v__token__Pos_free(&(it->pos)); v__token__Pos_free(&(it->return_type_pos)); } void Array_v__ast__Fn_free(Array_v__ast__Fn* it) { for (int i = 0; i < it->len; i++) { v__ast__Fn_free(&(((v__ast__Fn*)it->data)[i])); } array_free(it); } void Array_v__ast__Type_free(Array_v__ast__Type* it) { array_free(it); } void v__ast__TypeSymbol_free(v__ast__TypeSymbol* it) { Array_v__ast__Fn_free(&(it->methods)); Array_v__ast__Type_free(&(it->generic_types)); string_free(&(it->name)); string_free(&(it->cname)); string_free(&(it->rname)); string_free(&(it->mod)); } // V closure helpers #include #ifdef _MSC_VER #define __RETURN_ADDRESS() ((char*)_ReturnAddress()) #elif defined(__TINYC__) && defined(_WIN32) #define __RETURN_ADDRESS() ((char*)__builtin_return_address(0)) #else #define __RETURN_ADDRESS() ((char*)__builtin_extract_return_addr(__builtin_return_address(0))) #endif static int _V_page_size = 0x4000; // 16K #define ASSUMED_PAGE_SIZE 0x4000 #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1)) // equal to `max(2*sizeof(void*), sizeof(__closure_thunk))`, rounded up to the next multiple of `sizeof(void*)` // refer to https://godbolt.org/z/r7P3EYv6c for a complete assembly #ifdef __V_amd64 static const char __closure_thunk[] = { 0xF3, 0x44, 0x0F, 0x7E, 0x3D, 0xF7, 0xBF, 0xFF, 0xFF, // movq xmm15, QWORD PTR [rip - userdata] 0xFF, 0x25, 0xF9, 0xBF, 0xFF, 0xFF // jmp QWORD PTR [rip - fn] }; static char __CLOSURE_GET_DATA_BYTES[] = { 0x66, 0x4C, 0x0F, 0x7E, 0xF8, // movq rax, xmm15 0xC3 // ret }; #elif defined(__V_x86) static char __closure_thunk[] = { 0xe8, 0x00, 0x00, 0x00, 0x00, // call here // here: 0x59, // pop ecx 0x66, 0x0F, 0x6E, 0xF9, // movd xmm7, ecx 0xff, 0xA1, 0xff, 0xbf, 0xff, 0xff, // jmp DWORD PTR [ecx - 0x4001] # }; static char __CLOSURE_GET_DATA_BYTES[] = { 0x66, 0x0F, 0x7E, 0xF8, // movd eax, xmm7 0x8B, 0x80, 0xFB, 0xBF, 0xFF, 0xFF, // mov eax, DWORD PTR [eax - 0x4005] 0xc3 // ret }; #elif defined(__V_arm64) static char __closure_thunk[] = { 0x11, 0x00, 0xFE, 0x58, // ldr x17, userdata 0x30, 0x00, 0xFE, 0x58, // ldr x16, fn 0x00, 0x02, 0x1F, 0xD6 // br x16 }; static char __CLOSURE_GET_DATA_BYTES[] = { 0xE0, 0x03, 0x11, 0xAA, // mov x0, x17 0xC0, 0x03, 0x5F, 0xD6 // ret }; #elif defined(__V_arm32) static char __closure_thunk[] = { 0x04, 0xC0, 0x4F, 0xE2, // adr ip, here // here: 0x01, 0xC9, 0x4C, 0xE2, // sub ip, ip, #4000 0x90, 0xCA, 0x07, 0xEE, // vmov s15, ip 0x00, 0xC0, 0x9C, 0xE5, // ldr ip, [ip, 0] 0x1C, 0xFF, 0x2F, 0xE1 // bx ip }; static char __CLOSURE_GET_DATA_BYTES[] = { 0x90, 0x0A, 0x17, 0xEE, 0x04, 0x00, 0x10, 0xE5, 0x1E, 0xFF, 0x2F, 0xE1 }; #elif defined (__V_rv64) static char __closure_thunk[] = { 0x97, 0xCF, 0xFF, 0xFF, // auipc t6, 0xffffc 0x03, 0xBF, 0x8F, 0x00, // ld t5, 8(t6) 0x67, 0x00, 0x0F, 0x00 // jr t5 }; static char __CLOSURE_GET_DATA_BYTES[] = { 0x03, 0xb5, 0x0f, 0x00, // ld a0, 0(t6) 0x67, 0x80, 0x00, 0x00 // ret }; #elif defined (__V_rv32) static char __closure_thunk[] = { 0x97, 0xCF, 0xFF, 0xFF, // auipc t6, 0xffffc 0x03, 0xAF, 0x4F, 0x00, // lw t5, 4(t6) 0x67, 0x00, 0x0F, 0x00 // jr t5 }; static char __CLOSURE_GET_DATA_BYTES[] = { 0x03, 0xA5, 0x0F, 0x00, // lw a0, 0(t6) 0x67, 0x80, 0x00, 0x00 // ret }; #endif static void*(*__CLOSURE_GET_DATA)(void) = 0; static inline void __closure_set_data(char* closure, void* data) { void** p = (void**)(closure - ASSUMED_PAGE_SIZE); p[0] = data; } static inline void __closure_set_function(char* closure, void* f) { void** p = (void**)(closure - ASSUMED_PAGE_SIZE); p[1] = f; } #ifdef _WIN32 #include static SRWLOCK _closure_mtx; #define _closure_mtx_init() InitializeSRWLock(&_closure_mtx) #define _closure_mtx_lock() AcquireSRWLockExclusive(&_closure_mtx) #define _closure_mtx_unlock() ReleaseSRWLockExclusive(&_closure_mtx) #else static pthread_mutex_t _closure_mtx; #define _closure_mtx_init() pthread_mutex_init(&_closure_mtx, 0) #define _closure_mtx_lock() pthread_mutex_lock(&_closure_mtx) #define _closure_mtx_unlock() pthread_mutex_unlock(&_closure_mtx) #endif static char* _closure_ptr = 0; static int _closure_cap = 0; static void __closure_alloc(void) { #ifdef _WIN32 char* p = VirtualAlloc(NULL, _V_page_size * 2, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); if (p == NULL) return; #else char* p = mmap(0, _V_page_size * 2, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); if (p == MAP_FAILED) return; #endif char* x = p + _V_page_size; int remaining = _V_page_size / _CLOSURE_SIZE; _closure_ptr = x; _closure_cap = remaining; while (remaining > 0) { memcpy(x, __closure_thunk, sizeof(__closure_thunk)); remaining--; x += _CLOSURE_SIZE; } #ifdef _WIN32 DWORD _tmp; VirtualProtect(_closure_ptr, _V_page_size, PAGE_EXECUTE_READ, &_tmp); #else mprotect(_closure_ptr, _V_page_size, PROT_READ | PROT_EXEC); #endif } #ifdef _WIN32 void __closure_init() { SYSTEM_INFO si; GetNativeSystemInfo(&si); uint32_t page_size = si.dwPageSize * (((ASSUMED_PAGE_SIZE - 1) / si.dwPageSize) + 1); _V_page_size = page_size; __closure_alloc(); DWORD _tmp; VirtualProtect(_closure_ptr, page_size, PAGE_READWRITE, &_tmp); memcpy(_closure_ptr, __CLOSURE_GET_DATA_BYTES, sizeof(__CLOSURE_GET_DATA_BYTES)); VirtualProtect(_closure_ptr, page_size, PAGE_EXECUTE_READ, &_tmp); __CLOSURE_GET_DATA = (void*)_closure_ptr; _closure_ptr += _CLOSURE_SIZE; _closure_cap--; } #else void __closure_init() { uint32_t page_size = sysconf(_SC_PAGESIZE); page_size = page_size * (((ASSUMED_PAGE_SIZE - 1) / page_size) + 1); _V_page_size = page_size; __closure_alloc(); mprotect(_closure_ptr, page_size, PROT_READ | PROT_WRITE); memcpy(_closure_ptr, __CLOSURE_GET_DATA_BYTES, sizeof(__CLOSURE_GET_DATA_BYTES)); mprotect(_closure_ptr, page_size, PROT_READ | PROT_EXEC); __CLOSURE_GET_DATA = (void*)_closure_ptr; _closure_ptr += _CLOSURE_SIZE; _closure_cap--; } #endif static void* __closure_create(void* fn, void* data) { _closure_mtx_lock(); if (_closure_cap == 0) { __closure_alloc(); } _closure_cap--; void* closure = _closure_ptr; _closure_ptr += _CLOSURE_SIZE; __closure_set_data(closure, data); __closure_set_function(closure, fn); _closure_mtx_unlock(); return closure; } // V anon functions: /*F*/ VV_LOCAL_SYMBOL void anon_fn_40181cb3d9c4559e__82(void) { println(_SLIT("}")); } /*F*/ struct _V_anon_fn_135e2010175ca59e_v__ast__structfield__bool_19063_Ctx { v__checker__Checker* c; }; VV_LOCAL_SYMBOL bool anon_fn_135e2010175ca59e_v__ast__structfield__bool_19063(v__ast__StructField field) { struct _V_anon_fn_135e2010175ca59e_v__ast__structfield__bool_19063_Ctx* _V_closure_ctx = __CLOSURE_GET_DATA(); v__ast__Type type_with_no_option_flag = v__ast__Type_clear_flag(field.typ, v__ast__TypeFlag__option); bool is_struct = (*(v__ast__TypeSymbol**)array_get(_V_closure_ctx->c->table->type_symbols, ((int)(type_with_no_option_flag))))->kind == v__ast__Kind__struct_; bool is_array = v__ast__Table_sym(_V_closure_ctx->c->table, type_with_no_option_flag)->kind == v__ast__Kind__array; bool is_array_with_struct_elements = is_array && v__ast__Table_sym(_V_closure_ctx->c->table, v__ast__TypeSymbol_array_info(v__ast__Table_sym(_V_closure_ctx->c->table, type_with_no_option_flag)).elem_type)->kind == v__ast__Kind__struct_; bool is_time = string__eq(v__ast__Table_get_type_name(_V_closure_ctx->c->table, type_with_no_option_flag), _SLIT("time.Time")); bool _t1 = (is_struct || is_array_with_struct_elements) && !is_time; return _t1; } // end of V out // >> typeof() support for sum types / interfaces static char * v_typeof_interface_IError(int sidx) { /* IError */ if (sidx == _IError_None___index) return "None__"; if (sidx == _IError_voidptr_index) return "voidptr"; if (sidx == _IError_Error_index) return "Error"; if (sidx == _IError_MessageError_index) return "MessageError"; if (sidx == _IError_time__TimeParseError_index) return "time.TimeParseError"; if (sidx == _IError_flag__UnknownFlagError_index) return "flag.UnknownFlagError"; if (sidx == _IError_flag__ArgsCountError_index) return "flag.ArgsCountError"; if (sidx == _IError_semver__InvalidComparatorFormatError_index) return "semver.InvalidComparatorFormatError"; if (sidx == _IError_semver__EmptyInputError_index) return "semver.EmptyInputError"; if (sidx == _IError_semver__InvalidVersionFormatError_index) return "semver.InvalidVersionFormatError"; if (sidx == _IError_os__Eof_index) return "os.Eof"; if (sidx == _IError_os__NotExpected_index) return "os.NotExpected"; if (sidx == _IError_os__FileNotOpenedError_index) return "os.FileNotOpenedError"; if (sidx == _IError_os__SizeOfTypeIs0Error_index) return "os.SizeOfTypeIs0Error"; if (sidx == _IError_os__ExecutableNotFoundError_index) return "os.ExecutableNotFoundError"; if (sidx == _IError_v__gen__c__UnsupportedAssertCtempTransform_index) return "v.gen.c.UnsupportedAssertCtempTransform"; return "unknown IError"; } static int v_typeof_interface_idx_IError(int sidx) { /* IError */ if (sidx == _IError_None___index) return 65609; if (sidx == _IError_voidptr_index) return 2; if (sidx == _IError_Error_index) return 74; if (sidx == _IError_MessageError_index) return 75; if (sidx == _IError_time__TimeParseError_index) return 242; if (sidx == _IError_flag__UnknownFlagError_index) return 66138; if (sidx == _IError_flag__ArgsCountError_index) return 66139; if (sidx == _IError_semver__InvalidComparatorFormatError_index) return 66150; if (sidx == _IError_semver__EmptyInputError_index) return 66152; if (sidx == _IError_semver__InvalidVersionFormatError_index) return 66153; if (sidx == _IError_os__Eof_index) return 114; if (sidx == _IError_os__NotExpected_index) return 115; if (sidx == _IError_os__FileNotOpenedError_index) return 65654; if (sidx == _IError_os__SizeOfTypeIs0Error_index) return 65655; if (sidx == _IError_os__ExecutableNotFoundError_index) return 65669; if (sidx == _IError_v__gen__c__UnsupportedAssertCtempTransform_index) return 537; return 29; } static char * v_typeof_interface_rand__PRNG(int sidx) { /* rand.PRNG */ if (sidx == _rand__PRNG_rand__wyrand__WyRandRNG_index) return "rand.wyrand.WyRandRNG"; if (sidx == _rand__PRNG_voidptr_index) return "voidptr"; return "unknown rand.PRNG"; } static int v_typeof_interface_idx_rand__PRNG(int sidx) { /* rand.PRNG */ if (sidx == _rand__PRNG_rand__wyrand__WyRandRNG_index) return 65754; if (sidx == _rand__PRNG_voidptr_index) return 2; return 212; } char * v_typeof_sumtype_v__ast__TypeDecl(int sidx) { /* v.ast.TypeDecl */ switch(sidx) { case 260: return "v.ast.TypeDecl"; case 257: return "v.ast.AliasTypeDecl"; case 258: return "v.ast.FnTypeDecl"; case 259: return "v.ast.SumTypeDecl"; default: return "unknown v.ast.TypeDecl"; } } int v_typeof_sumtype_idx_v__ast__TypeDecl(int sidx) { /* v.ast.TypeDecl */ switch(sidx) { case 260: return 260; case 257: return 257; case 258: return 258; case 259: return 259; default: return 260; } } char * v_typeof_sumtype_v__ast__Expr(int sidx) { /* v.ast.Expr */ switch(sidx) { case 315: return "v.ast.Expr"; case 261: return "v.ast.AnonFn"; case 262: return "v.ast.ArrayDecompose"; case 263: return "v.ast.ArrayInit"; case 264: return "v.ast.AsCast"; case 265: return "v.ast.Assoc"; case 266: return "v.ast.AtExpr"; case 267: return "v.ast.BoolLiteral"; case 268: return "v.ast.CTempVar"; case 269: return "v.ast.CallExpr"; case 270: return "v.ast.CastExpr"; case 271: return "v.ast.ChanInit"; case 272: return "v.ast.CharLiteral"; case 273: return "v.ast.Comment"; case 274: return "v.ast.ComptimeCall"; case 275: return "v.ast.ComptimeSelector"; case 276: return "v.ast.ComptimeType"; case 277: return "v.ast.ConcatExpr"; case 278: return "v.ast.DumpExpr"; case 279: return "v.ast.EmptyExpr"; case 280: return "v.ast.EnumVal"; case 281: return "v.ast.FloatLiteral"; case 282: return "v.ast.GoExpr"; case 283: return "v.ast.Ident"; case 284: return "v.ast.IfExpr"; case 285: return "v.ast.IfGuardExpr"; case 286: return "v.ast.IndexExpr"; case 287: return "v.ast.InfixExpr"; case 288: return "v.ast.IntegerLiteral"; case 289: return "v.ast.IsRefType"; case 290: return "v.ast.LambdaExpr"; case 291: return "v.ast.Likely"; case 292: return "v.ast.LockExpr"; case 293: return "v.ast.MapInit"; case 294: return "v.ast.MatchExpr"; case 295: return "v.ast.Nil"; case 296: return "v.ast.NodeError"; case 297: return "v.ast.None"; case 298: return "v.ast.OffsetOf"; case 299: return "v.ast.OrExpr"; case 300: return "v.ast.ParExpr"; case 301: return "v.ast.PostfixExpr"; case 302: return "v.ast.PrefixExpr"; case 303: return "v.ast.RangeExpr"; case 304: return "v.ast.SelectExpr"; case 305: return "v.ast.SelectorExpr"; case 306: return "v.ast.SizeOf"; case 307: return "v.ast.SpawnExpr"; case 308: return "v.ast.SqlExpr"; case 309: return "v.ast.StringInterLiteral"; case 310: return "v.ast.StringLiteral"; case 311: return "v.ast.StructInit"; case 312: return "v.ast.TypeNode"; case 313: return "v.ast.TypeOf"; case 314: return "v.ast.UnsafeExpr"; default: return "unknown v.ast.Expr"; } } int v_typeof_sumtype_idx_v__ast__Expr(int sidx) { /* v.ast.Expr */ switch(sidx) { case 315: return 315; case 261: return 261; case 262: return 262; case 263: return 263; case 264: return 264; case 265: return 265; case 266: return 266; case 267: return 267; case 268: return 268; case 269: return 269; case 270: return 270; case 271: return 271; case 272: return 272; case 273: return 273; case 274: return 274; case 275: return 275; case 276: return 276; case 277: return 277; case 278: return 278; case 279: return 279; case 280: return 280; case 281: return 281; case 282: return 282; case 283: return 283; case 284: return 284; case 285: return 285; case 286: return 286; case 287: return 287; case 288: return 288; case 289: return 289; case 290: return 290; case 291: return 291; case 292: return 292; case 293: return 293; case 294: return 294; case 295: return 295; case 296: return 296; case 297: return 297; case 298: return 298; case 299: return 299; case 300: return 300; case 301: return 301; case 302: return 302; case 303: return 303; case 304: return 304; case 305: return 305; case 306: return 306; case 307: return 307; case 308: return 308; case 309: return 309; case 310: return 310; case 311: return 311; case 312: return 312; case 313: return 313; case 314: return 314; default: return 315; } } char * v_typeof_sumtype_v__ast__Stmt(int sidx) { /* v.ast.Stmt */ switch(sidx) { case 341: return "v.ast.Stmt"; case 316: return "v.ast.AsmStmt"; case 317: return "v.ast.AssertStmt"; case 318: return "v.ast.AssignStmt"; case 319: return "v.ast.Block"; case 320: return "v.ast.BranchStmt"; case 321: return "v.ast.ComptimeFor"; case 322: return "v.ast.ConstDecl"; case 323: return "v.ast.DeferStmt"; case 324: return "v.ast.EmptyStmt"; case 325: return "v.ast.EnumDecl"; case 326: return "v.ast.ExprStmt"; case 194: return "v.ast.FnDecl"; case 327: return "v.ast.ForCStmt"; case 328: return "v.ast.ForInStmt"; case 329: return "v.ast.ForStmt"; case 330: return "v.ast.GlobalDecl"; case 331: return "v.ast.GotoLabel"; case 332: return "v.ast.GotoStmt"; case 333: return "v.ast.HashStmt"; case 334: return "v.ast.Import"; case 335: return "v.ast.InterfaceDecl"; case 336: return "v.ast.Module"; case 296: return "v.ast.NodeError"; case 337: return "v.ast.Return"; case 338: return "v.ast.SemicolonStmt"; case 339: return "v.ast.SqlStmt"; case 340: return "v.ast.StructDecl"; case 260: return "v.ast.TypeDecl"; default: return "unknown v.ast.Stmt"; } } int v_typeof_sumtype_idx_v__ast__Stmt(int sidx) { /* v.ast.Stmt */ switch(sidx) { case 341: return 341; case 316: return 316; case 317: return 317; case 318: return 318; case 319: return 319; case 320: return 320; case 321: return 321; case 322: return 322; case 323: return 323; case 324: return 324; case 325: return 325; case 326: return 326; case 194: return 194; case 327: return 327; case 328: return 328; case 329: return 329; case 330: return 330; case 331: return 331; case 332: return 332; case 333: return 333; case 334: return 334; case 335: return 335; case 336: return 336; case 296: return 296; case 337: return 337; case 338: return 338; case 339: return 339; case 340: return 340; case 260: return 260; default: return 341; } } char * v_typeof_sumtype_v__ast__ScopeObject(int sidx) { /* v.ast.ScopeObject */ switch(sidx) { case 346: return "v.ast.ScopeObject"; case 342: return "v.ast.AsmRegister"; case 343: return "v.ast.ConstField"; case 344: return "v.ast.GlobalField"; case 345: return "v.ast.Var"; default: return "unknown v.ast.ScopeObject"; } } int v_typeof_sumtype_idx_v__ast__ScopeObject(int sidx) { /* v.ast.ScopeObject */ switch(sidx) { case 346: return 346; case 342: return 342; case 343: return 343; case 344: return 344; case 345: return 345; default: return 346; } } char * v_typeof_sumtype_v__ast__Node(int sidx) { /* v.ast.Node */ switch(sidx) { case 356: return "v.ast.Node"; case 347: return "v.ast.CallArg"; case 343: return "v.ast.ConstField"; case 348: return "v.ast.EmptyNode"; case 349: return "v.ast.EnumField"; case 315: return "v.ast.Expr"; case 185: return "v.ast.File"; case 344: return "v.ast.GlobalField"; case 350: return "v.ast.IfBranch"; case 351: return "v.ast.MatchBranch"; case 296: return "v.ast.NodeError"; case 352: return "v.ast.Param"; case 346: return "v.ast.ScopeObject"; case 353: return "v.ast.SelectBranch"; case 341: return "v.ast.Stmt"; case 354: return "v.ast.StructField"; case 355: return "v.ast.StructInitField"; default: return "unknown v.ast.Node"; } } int v_typeof_sumtype_idx_v__ast__Node(int sidx) { /* v.ast.Node */ switch(sidx) { case 356: return 356; case 347: return 347; case 343: return 343; case 348: return 348; case 349: return 349; case 315: return 315; case 185: return 185; case 344: return 344; case 350: return 350; case 351: return 351; case 296: return 296; case 352: return 352; case 346: return 346; case 353: return 353; case 341: return 341; case 354: return 354; case 355: return 355; default: return 356; } } char * v_typeof_sumtype_v__ast__ComptTimeConstValue(int sidx) { /* v.ast.ComptTimeConstValue */ switch(sidx) { case 370: return "v.ast.ComptTimeConstValue"; case 279: return "v.ast.EmptyExpr"; case 15: return "f32"; case 16: return "f64"; case 6: return "i16"; case 8: return "i64"; case 5: return "i8"; case 7: return "int"; case 21: return "rune"; case 20: return "string"; case 11: return "u16"; case 12: return "u32"; case 13: return "u64"; case 10: return "u8"; case 2: return "voidptr"; default: return "unknown v.ast.ComptTimeConstValue"; } } int v_typeof_sumtype_idx_v__ast__ComptTimeConstValue(int sidx) { /* v.ast.ComptTimeConstValue */ switch(sidx) { case 370: return 370; case 279: return 279; case 15: return 15; case 16: return 16; case 6: return 6; case 8: return 8; case 5: return 5; case 7: return 7; case 21: return 21; case 20: return 20; case 11: return 11; case 12: return 12; case 13: return 13; case 10: return 10; case 2: return 2; default: return 370; } } char * v_typeof_sumtype_v__ast__IdentInfo(int sidx) { /* v.ast.IdentInfo */ switch(sidx) { case 399: return "v.ast.IdentInfo"; case 397: return "v.ast.IdentFn"; case 398: return "v.ast.IdentVar"; default: return "unknown v.ast.IdentInfo"; } } int v_typeof_sumtype_idx_v__ast__IdentInfo(int sidx) { /* v.ast.IdentInfo */ switch(sidx) { case 399: return 399; case 397: return 397; case 398: return 398; default: return 399; } } char * v_typeof_sumtype_v__ast__AsmArg(int sidx) { /* v.ast.AsmArg */ switch(sidx) { case 416: return "v.ast.AsmArg"; case 418: return "v.ast.AsmAddressing"; case 419: return "v.ast.AsmAlias"; case 420: return "v.ast.AsmDisp"; case 342: return "v.ast.AsmRegister"; case 267: return "v.ast.BoolLiteral"; case 272: return "v.ast.CharLiteral"; case 281: return "v.ast.FloatLiteral"; case 288: return "v.ast.IntegerLiteral"; case 20: return "string"; default: return "unknown v.ast.AsmArg"; } } int v_typeof_sumtype_idx_v__ast__AsmArg(int sidx) { /* v.ast.AsmArg */ switch(sidx) { case 416: return 416; case 418: return 418; case 419: return 419; case 420: return 420; case 342: return 342; case 267: return 267; case 272: return 272; case 281: return 281; case 288: return 288; case 20: return 20; default: return 416; } } char * v_typeof_sumtype_v__ast__TypeInfo(int sidx) { /* v.ast.TypeInfo */ switch(sidx) { case 471: return "v.ast.TypeInfo"; case 453: return "v.ast.Aggregate"; case 455: return "v.ast.Alias"; case 433: return "v.ast.Array"; case 464: return "v.ast.ArrayFixed"; case 465: return "v.ast.Chan"; case 470: return "v.ast.Enum"; case 468: return "v.ast.FnType"; case 469: return "v.ast.GenericInst"; case 458: return "v.ast.Interface"; case 434: return "v.ast.Map"; case 467: return "v.ast.MultiReturn"; case 437: return "v.ast.Struct"; case 460: return "v.ast.SumType"; case 466: return "v.ast.Thread"; default: return "unknown v.ast.TypeInfo"; } } int v_typeof_sumtype_idx_v__ast__TypeInfo(int sidx) { /* v.ast.TypeInfo */ switch(sidx) { case 471: return 471; case 453: return 453; case 455: return 455; case 433: return 433; case 464: return 464; case 465: return 465; case 470: return 470; case 468: return 468; case 469: return 469; case 458: return 458; case 434: return 434; case 467: return 467; case 437: return 437; case 460: return 460; case 466: return 466; default: return 471; } } char * v_typeof_sumtype_v__checker__ORMExpr(int sidx) { /* v.checker.ORMExpr */ switch(sidx) { case 488: return "v.checker.ORMExpr"; case 308: return "v.ast.SqlExpr"; case 339: return "v.ast.SqlStmt"; default: return "unknown v.checker.ORMExpr"; } } int v_typeof_sumtype_idx_v__checker__ORMExpr(int sidx) { /* v.checker.ORMExpr */ switch(sidx) { case 488: return 488; case 308: return 308; case 339: return 339; default: return 488; } } static char * v_typeof_interface_hash__Hasher(int sidx) { /* hash.Hasher */ return "unknown hash.Hasher"; } static int v_typeof_interface_idx_hash__Hasher(int sidx) { /* hash.Hasher */ return 531; } static char * v_typeof_interface_hash__Hash32er(int sidx) { /* hash.Hash32er */ return "unknown hash.Hash32er"; } static int v_typeof_interface_idx_hash__Hash32er(int sidx) { /* hash.Hash32er */ return 532; } static char * v_typeof_interface_hash__Hash64er(int sidx) { /* hash.Hash64er */ return "unknown hash.Hash64er"; } static int v_typeof_interface_idx_hash__Hash64er(int sidx) { /* hash.Hash64er */ return 533; } static char * v_typeof_interface_v__ast__walker__Visitor(int sidx) { /* v.ast.walker.Visitor */ if (sidx == _v__ast__walker__Visitor_v__ast__walker__Inspector_index) return "v.ast.walker.Inspector"; if (sidx == _v__ast__walker__Visitor_voidptr_index) return "voidptr"; if (sidx == _v__ast__walker__Visitor_v__callgraph__Mapper_index) return "v.callgraph.Mapper"; return "unknown v.ast.walker.Visitor"; } static int v_typeof_interface_idx_v__ast__walker__Visitor(int sidx) { /* v.ast.walker.Visitor */ if (sidx == _v__ast__walker__Visitor_v__ast__walker__Inspector_index) return 600; if (sidx == _v__ast__walker__Visitor_voidptr_index) return 2; if (sidx == _v__ast__walker__Visitor_v__callgraph__Mapper_index) return 66060; return 598; } // << typeof() support for sum types // pointers to common sumtype fields // pointers to common sumtype fields // pointers to common sumtype fields // pointers to common sumtype fields // TypeDecl strings__Builder strings__new_builder(int initial_size) { strings__Builder res = ((__new_array_with_default(0, initial_size, sizeof(u8), 0))); ArrayFlags_set(&res.flags, ArrayFlags__noslices); return res; } // Attr: [unsafe] Array_u8 strings__Builder_reuse_as_plain_u8_array(strings__Builder* b) { ArrayFlags_clear(&b->flags, ArrayFlags__noslices); return *b; } // Attr: [unsafe] void strings__Builder_write_ptr(strings__Builder* b, u8* ptr, int len) { if (len == 0) { return; } array_push_many(b, ptr, len); } // Attr: [manualfree] void strings__Builder_write_rune(strings__Builder* b, rune r) { Array_fixed_u8_5 buffer = {0, 0, 0, 0, 0}; string res = utf32_to_str_no_malloc(((u32)(r)), &buffer[0]); if (res.len == 0) { return; } array_push_many(b, res.str, res.len); } void strings__Builder_write_runes(strings__Builder* b, Array_rune runes) { Array_fixed_u8_5 buffer = {0, 0, 0, 0, 0}; for (int _t1 = 0; _t1 < runes.len; ++_t1) { rune r = ((rune*)runes.data)[_t1]; string res = utf32_to_str_no_malloc(((u32)(r)), &buffer[0]); if (res.len == 0) { continue; } array_push_many(b, res.str, res.len); } } void strings__Builder_clear(strings__Builder* b) { *b = __new_array_with_default(0, b->cap, sizeof(u8), 0); } void strings__Builder_write_u8(strings__Builder* b, u8 data) { array_push((array*)b, _MOV((u8[]){ data })); } void strings__Builder_write_byte(strings__Builder* b, byte data) { array_push((array*)b, _MOV((u8[]){ data })); } _result_int strings__Builder_write(strings__Builder* b, Array_u8 data) { if (data.len == 0) { _result_int _t1; _result_ok(&(int[]) { 0 }, (_result*)(&_t1), sizeof(int)); return _t1; } _PUSH_MANY(b, (data), _t2, strings__Builder); _result_int _t3; _result_ok(&(int[]) { data.len }, (_result*)(&_t3), sizeof(int)); return _t3; } // Attr: [manualfree] void strings__Builder_drain_builder(strings__Builder* b, strings__Builder* other, int other_new_cap) { if (other->len > 0) { _PUSH_MANY(b, (*other), _t1, strings__Builder); } strings__Builder_free(other); *other = strings__new_builder(other_new_cap); } // Attr: [inline] inline u8 strings__Builder_byte_at(strings__Builder* b, int n) { return (*(u8*)array_get(*(((Array_u8*)(b))), n)); } // Attr: [inline] inline void strings__Builder_write_string(strings__Builder* b, string s) { if (s.len == 0) { return; } array_push_many(b, s.str, s.len); } void strings__Builder_go_back(strings__Builder* b, int n) { array_trim(b, (int)(b->len - n)); } // Attr: [inline] inline VV_LOCAL_SYMBOL string strings__Builder_spart(strings__Builder* b, int start_pos, int n) { { // Unsafe block u8* x = malloc_noscan((int)(n + 1)); vmemcpy(x, ((u8*)(b->data)) + start_pos, n); x[n] = 0; return tos(x, n); } return (string){.str=(byteptr)"", .is_lit=1}; } string strings__Builder_cut_last(strings__Builder* b, int n) { int cut_pos = (int)(b->len - n); string res = strings__Builder_spart(b, cut_pos, n); array_trim(b, cut_pos); return res; } string strings__Builder_cut_to(strings__Builder* b, int pos) { if (pos > b->len) { return _SLIT(""); } return strings__Builder_cut_last(b, (int)(b->len - pos)); } void strings__Builder_go_back_to(strings__Builder* b, int pos) { array_trim(b, pos); } // Attr: [inline] inline void strings__Builder_writeln(strings__Builder* b, string s) { if (s.len > 0) { array_push_many(b, s.str, s.len); } array_push((array*)b, _MOV((u8[]){ ((u8)('\n')) })); } string strings__Builder_last_n(strings__Builder* b, int n) { if (n > b->len) { return _SLIT(""); } return strings__Builder_spart(b, (int)(b->len - n), n); } string strings__Builder_after(strings__Builder* b, int n) { if (n >= b->len) { return _SLIT(""); } return strings__Builder_spart(b, n, (int)(b->len - n)); } string strings__Builder_str(strings__Builder* b) { array_push((array*)b, _MOV((u8[]){ ((u8)(0)) })); u8* bcopy = ((u8*)(memdup_noscan(b->data, b->len))); string s = u8_vstring_with_len(bcopy, (int)(b->len - 1)); array_trim(b, 0); return s; } void strings__Builder_ensure_cap(strings__Builder* b, int n) { if (n <= b->cap) { return; } u8* new_data = vcalloc((int)(n * b->element_size)); if (b->data != ((void*)0)) { vmemcpy(new_data, b->data, (int)(b->len * b->element_size)); if (ArrayFlags_has(&b->flags, ArrayFlags__noslices)) { _v_free(b->data); } } { // Unsafe block b->data = new_data; b->offset = 0; b->cap = n; } } // Attr: [unsafe] void strings__Builder_free(strings__Builder* b) { if (b->data != 0) { _v_free(b->data); { // Unsafe block b->data = ((void*)0); } } } int strings__levenshtein_distance(string a, string b) { Array_int f = array_repeat_to_depth(new_array_from_c_array(1, 1, sizeof(int), _MOV((int[1]){0})), (int)(b.len + 1), 0); for (int j = 0; j < f.len; ++j) { array_set(&f, j, &(int[]) { j }); } for (int _t1 = 0; _t1 < a.len; ++_t1) { u8 ca = a.str[_t1]; int j = 1; int fj1 = (*(int*)array_get(f, 0)); (*(int*)array_get(f, 0))++; for (int _t2 = 0; _t2 < b.len; ++_t2) { u8 cb = b.str[_t2]; int mn = ((int)((*(int*)array_get(f, j)) + 1) <= (int)((*(int*)array_get(f, (int)(j - 1))) + 1) ? ((int)((*(int*)array_get(f, j)) + 1)) : ((int)((*(int*)array_get(f, (int)(j - 1))) + 1))); if (cb != ca) { mn = (mn <= (int)(fj1 + 1) ? (mn) : ((int)(fj1 + 1))); } else { mn = (mn <= fj1 ? (mn) : (fj1)); } fj1 = (*(int*)array_get(f, j)); array_set(&f, j, &(int[]) { mn }); j++; } } return (*(int*)array_get(f, (int)(f.len - 1))); } f32 strings__levenshtein_distance_percentage(string a, string b) { int d = strings__levenshtein_distance(a, b); int l = (a.len >= b.len ? (a.len) : (b.len)); return (f32)(((f32)(((f32)(1.00)) - (f32)(((f32)(d)) / ((f32)(l))))) * ((f32)(100.00))); } f32 strings__dice_coefficient(string s1, string s2) { if (s1.len == 0 || s2.len == 0) { return 0.0; } if (string__eq(s1, s2)) { return 1.0; } if (s1.len < 2 || s2.len < 2) { return 0.0; } string a = (s1.len > s2.len ? (s1) : (s2)); string b = (string__eq(a, s1) ? (s2) : (s1)); Map_string_int first_bigrams = new_map(sizeof(string), sizeof(int), &map_hash_string, &map_eq_string, &map_clone_string, &map_free_string) ; for (int i = 0; i < (int)(a.len - 1); ++i) { string bigram = string_substr(a, i, (int_literal)(i + 2)); int q = (_IN_MAP(ADDR(string, bigram), ADDR(map, first_bigrams)) ? ((int)((*(int*)map_get(ADDR(map, first_bigrams), &(string[]){bigram}, &(int[]){ 0 })) + 1)) : (1)); map_set(&first_bigrams, &(string[]){bigram}, &(int[]) { q }); } int intersection_size = 0; for (int i = 0; i < (int)(b.len - 1); ++i) { string bigram = string_substr(b, i, (int_literal)(i + 2)); int count = (_IN_MAP(ADDR(string, bigram), ADDR(map, first_bigrams)) ? ((*(int*)map_get(ADDR(map, first_bigrams), &(string[]){bigram}, &(int[]){ 0 }))) : (0)); if (count > 0) { map_set(&first_bigrams, &(string[]){bigram}, &(int[]) { (int)(count - 1) }); intersection_size++; } } return (f32)(((f32)(((f32)(2.0)) * ((f32)(intersection_size)))) / ((f32)((f32)(((f32)(a.len)) + ((f32)(b.len))) - 2))); } // Attr: [direct_array_access] string strings__repeat(u8 c, int n) { if (n <= 0) { return _SLIT(""); } u8* bytes = malloc_noscan((int)(n + 1)); { // Unsafe block memset(bytes, c, n); bytes[n] = '0'; } return u8_vstring_with_len(bytes, n); } // Attr: [direct_array_access] string strings__repeat_string(string s, int n) { if (n <= 0 || s.len == 0) { return _SLIT(""); } int slen = s.len; int blen = (int)(slen * n); u8* bytes = malloc_noscan((int)(blen + 1)); for (int bi = 0; bi < n; ++bi) { int bislen = (int)(bi * slen); for (int si = 0; si < slen; ++si) { { // Unsafe block bytes[(int)(bislen + si)] = s.str[ si]; } } } { // Unsafe block bytes[blen] = '0'; } return u8_vstring_with_len(bytes, blen); } string strings__find_between_pair_u8(string input, u8 start, u8 end) { int marks = 0; int start_index = -1; for (int i = 0; i < input.len; ++i) { u8 b = input.str[i]; if (b == start) { if (start_index == -1) { start_index = (int)(i + 1); } marks++; continue; } if (start_index > 0) { if (b == end) { marks--; if (marks == 0) { return string_substr(input, start_index, i); } } } } return _SLIT(""); } string strings__find_between_pair_rune(string input, rune start, rune end) { int marks = 0; int start_index = -1; Array_rune runes = string_runes(input); for (int i = 0; i < runes.len; ++i) { rune r = ((rune*)runes.data)[i]; if (r == start) { if (start_index == -1) { start_index = (int)(i + 1); } marks++; continue; } if (start_index > 0) { if (r == end) { marks--; if (marks == 0) { return Array_rune_string(array_slice(runes, start_index, i)); } } } } return _SLIT(""); } string strings__find_between_pair_string(string input, string start, string end) { int start_index = -1; int marks = 0; Array_rune start_runes = string_runes(start); Array_rune end_runes = string_runes(end); Array_rune runes = string_runes(input); int i = 0; for (; i < runes.len; i++) { Array_rune start_slice = array_slice_ni(runes, i, (int)(i + start_runes.len)); if (Array_rune_arr_eq(start_slice, start_runes)) { i = (int)((int)(i + start_runes.len) - 1); if (start_index < 0) { start_index = (int)(i + 1); } marks++; continue; } if (start_index > 0) { Array_rune end_slice = array_slice_ni(runes, i, (int)(i + end_runes.len)); if (Array_rune_arr_eq(end_slice, end_runes)) { marks--; if (marks == 0) { return Array_rune_string(array_slice(runes, start_index, i)); } i = (int)((int)(i + end_runes.len) - 1); continue; } } } return _SLIT(""); } Array_string strings__split_capital(string s) { Array_string res = __new_array_with_default(0, 0, sizeof(string), 0); int word_start = 0; for (int idx = 0; idx < s.len; ++idx) { u8 c = s.str[idx]; if (c >= 'A' && c <= 'Z') { if (word_start != idx) { array_push((array*)&res, _MOV((string[]){ string_substr_ni(s, word_start, idx) })); } word_start = idx; continue; } } if (word_start != s.len) { array_push((array*)&res, _MOV((string[]){ string_substr_ni(s, word_start, (s).len) })); } return res; } int math__bits__leading_zeros_8(u8 x) { return (int)(8 - math__bits__len_8(x)); } int math__bits__leading_zeros_16(u16 x) { return (int)(16 - math__bits__len_16(x)); } int math__bits__leading_zeros_32(u32 x) { return (int)(32 - math__bits__len_32(x)); } int math__bits__leading_zeros_64(u64 x) { return (int)(64 - math__bits__len_64(x)); } int math__bits__trailing_zeros_8(u8 x) { return ((int)(_const_math__bits__ntz_8_tab[v_fixed_index(x, 256)])); } int math__bits__trailing_zeros_16(u16 x) { if (x == 0U) { return 16; } return ((int)(_const_math__bits__de_bruijn32tab[v_fixed_index(((u32)(((u32)((x & -x))) * _const_math__bits__de_bruijn32) >> (27)), 32)])); } int math__bits__trailing_zeros_32(u32 x) { if (x == 0U) { return 32; } return ((int)(_const_math__bits__de_bruijn32tab[v_fixed_index(((u32)(((x & -x)) * _const_math__bits__de_bruijn32) >> (27)), 32)])); } int math__bits__trailing_zeros_64(u64 x) { if (x == 0U) { return 64; } return ((int)(_const_math__bits__de_bruijn64tab[v_fixed_index(((u64)(((x & -x)) * _const_math__bits__de_bruijn64) >> (58)), 64)])); } int math__bits__ones_count_8(u8 x) { return ((int)(_const_math__bits__pop_8_tab[v_fixed_index(x, 256)])); } int math__bits__ones_count_16(u16 x) { return ((int)((u8)(_const_math__bits__pop_8_tab[v_fixed_index((x >> 8U), 256)] + _const_math__bits__pop_8_tab[v_fixed_index((x & ((u16)(0xffU))), 256)]))); } int math__bits__ones_count_32(u32 x) { return ((int)((u8)((u8)((u8)(_const_math__bits__pop_8_tab[v_fixed_index((x >> 24U), 256)] + _const_math__bits__pop_8_tab[v_fixed_index(((x >> 16U) & 0xffU), 256)]) + _const_math__bits__pop_8_tab[v_fixed_index(((x >> 8U) & 0xffU), 256)]) + _const_math__bits__pop_8_tab[v_fixed_index((x & ((u32)(0xffU))), 256)]))); } int math__bits__ones_count_64(u64 x) { u64 y = (u64)((((x >> ((u64)(1U))) & ((_const_math__bits__m0 & _const_math__bits__max_u64)))) + ((x & ((_const_math__bits__m0 & _const_math__bits__max_u64))))); y = (u64)((((y >> ((u64)(2U))) & ((_const_math__bits__m1 & _const_math__bits__max_u64)))) + ((y & ((_const_math__bits__m1 & _const_math__bits__max_u64))))); y = (((u64)(((y >> 4U)) + y)) & ((_const_math__bits__m2 & _const_math__bits__max_u64))); y += (y >> 8U); y += (y >> 16U); y += (y >> 32U); return (((int)(y)) & ((int_literal)((128) - 1))); } // Attr: [inline] inline u8 math__bits__rotate_left_8(u8 x, int k) { u8 s = (((u8)(k)) & ((u8)(_const_math__bits__n8 - ((u8)(1))))); return (((x << s)) | ((x >> ((u8)(_const_math__bits__n8 - s))))); } // Attr: [inline] inline u16 math__bits__rotate_left_16(u16 x, int k) { u16 s = (((u16)(k)) & ((u16)(_const_math__bits__n16 - ((u16)(1U))))); return (((x << s)) | ((x >> ((u16)(_const_math__bits__n16 - s))))); } // Attr: [inline] inline u32 math__bits__rotate_left_32(u32 x, int k) { u32 s = (((u32)(k)) & ((u32)(_const_math__bits__n32 - ((u32)(1U))))); return (((x << s)) | ((x >> ((u32)(_const_math__bits__n32 - s))))); } // Attr: [inline] inline u64 math__bits__rotate_left_64(u64 x, int k) { u64 s = (((u64)(k)) & ((u64)(_const_math__bits__n64 - ((u64)(1U))))); return (((x << s)) | ((x >> ((u64)(_const_math__bits__n64 - s))))); } // Attr: [inline] inline u8 math__bits__reverse_8(u8 x) { return _const_math__bits__rev_8_tab[v_fixed_index(x, 256)]; } // Attr: [inline] inline u16 math__bits__reverse_16(u16 x) { return (((u16)(_const_math__bits__rev_8_tab[v_fixed_index((x >> 8U), 256)])) | ((((u16)(_const_math__bits__rev_8_tab[v_fixed_index((x & ((u16)(0xffU))), 256)])) << 8U))); } // Attr: [inline] inline u32 math__bits__reverse_32(u32 x) { u64 y = (((((x >> ((u32)(1U))) & ((_const_math__bits__m0 & _const_math__bits__max_u32)))) | ((((x & ((_const_math__bits__m0 & _const_math__bits__max_u32)))) << 1U)))); y = (((((y >> ((u32)(2U))) & ((_const_math__bits__m1 & _const_math__bits__max_u32)))) | ((((y & ((_const_math__bits__m1 & _const_math__bits__max_u32)))) << ((u32)(2U)))))); y = (((((y >> ((u32)(4U))) & ((_const_math__bits__m2 & _const_math__bits__max_u32)))) | ((((y & ((_const_math__bits__m2 & _const_math__bits__max_u32)))) << ((u32)(4U)))))); return math__bits__reverse_bytes_32(((u32)(y))); } // Attr: [inline] inline u64 math__bits__reverse_64(u64 x) { u64 y = (((((x >> ((u64)(1U))) & ((_const_math__bits__m0 & _const_math__bits__max_u64)))) | ((((x & ((_const_math__bits__m0 & _const_math__bits__max_u64)))) << 1U)))); y = (((((y >> ((u64)(2U))) & ((_const_math__bits__m1 & _const_math__bits__max_u64)))) | ((((y & ((_const_math__bits__m1 & _const_math__bits__max_u64)))) << 2U)))); y = (((((y >> ((u64)(4U))) & ((_const_math__bits__m2 & _const_math__bits__max_u64)))) | ((((y & ((_const_math__bits__m2 & _const_math__bits__max_u64)))) << 4U)))); return math__bits__reverse_bytes_64(y); } // Attr: [inline] inline u16 math__bits__reverse_bytes_16(u16 x) { return (((x >> 8U)) | ((x << 8U))); } // Attr: [inline] inline u32 math__bits__reverse_bytes_32(u32 x) { u64 y = (((((x >> ((u32)(8U))) & ((_const_math__bits__m3 & _const_math__bits__max_u32)))) | ((((x & ((_const_math__bits__m3 & _const_math__bits__max_u32)))) << ((u32)(8U)))))); return ((u32)((((y >> 16U)) | ((y << 16U))))); } // Attr: [inline] inline u64 math__bits__reverse_bytes_64(u64 x) { u64 y = (((((x >> ((u64)(8U))) & ((_const_math__bits__m3 & _const_math__bits__max_u64)))) | ((((x & ((_const_math__bits__m3 & _const_math__bits__max_u64)))) << ((u64)(8U)))))); y = (((((y >> ((u64)(16U))) & ((_const_math__bits__m4 & _const_math__bits__max_u64)))) | ((((y & ((_const_math__bits__m4 & _const_math__bits__max_u64)))) << ((u64)(16U)))))); return (((y >> 32U)) | ((y << 32U))); } int math__bits__len_8(u8 x) { return ((int)(_const_math__bits__len_8_tab[v_fixed_index(x, 256)])); } int math__bits__len_16(u16 x) { u16 y = x; int n = 0; if (y >= 256U) { y >>= 8U; n = 8; } return (int)(n + ((int)(_const_math__bits__len_8_tab[v_fixed_index(y, 256)]))); } int math__bits__len_32(u32 x) { u32 y = x; int n = 0; if (y >= (65536)) { y >>= 16U; n = 16; } if (y >= (256)) { y >>= 8U; n += 8; } return (int)(n + ((int)(_const_math__bits__len_8_tab[v_fixed_index(y, 256)]))); } int math__bits__len_64(u64 x) { u64 y = x; int n = 0; if (y >= (((u64)(1U)) << ((u64)(32U)))) { y >>= 32U; n = 32; } if (y >= (((u64)(1U)) << ((u64)(16U)))) { y >>= 16U; n += 16; } if (y >= (((u64)(1U)) << ((u64)(8U)))) { y >>= 8U; n += 8; } return (int)(n + ((int)(_const_math__bits__len_8_tab[v_fixed_index(y, 256)]))); } multi_return_u32_u32 math__bits__add_32(u32 x, u32 y, u32 carry) { u64 sum64 = (u64)((u64)(((u64)(x)) + ((u64)(y))) + ((u64)(carry))); u32 sum = ((u32)(sum64)); u32 carry_out = ((u32)((sum64 >> 32U))); return (multi_return_u32_u32){.arg0=sum, .arg1=carry_out}; } multi_return_u64_u64 math__bits__add_64(u64 x, u64 y, u64 carry) { u64 sum = (u64)((u64)(x + y) + carry); u64 carry_out = (((((x & y)) | ((((x | y)) & ~sum)))) >> 63U); return (multi_return_u64_u64){.arg0=sum, .arg1=carry_out}; } multi_return_u32_u32 math__bits__sub_32(u32 x, u32 y, u32 borrow) { u32 diff = (u32)((u32)(x - y) - borrow); u32 borrow_out = (((((~x & y)) | ((~((x ^ y)) & diff)))) >> 31U); return (multi_return_u32_u32){.arg0=diff, .arg1=borrow_out}; } multi_return_u64_u64 math__bits__sub_64(u64 x, u64 y, u64 borrow) { u64 diff = (u64)((u64)(x - y) - borrow); u64 borrow_out = (((((~x & y)) | ((~((x ^ y)) & diff)))) >> 63U); return (multi_return_u64_u64){.arg0=diff, .arg1=borrow_out}; } multi_return_u32_u32 math__bits__mul_32(u32 x, u32 y) { u64 tmp = (u64)(((u64)(x)) * ((u64)(y))); u32 hi = ((u32)((tmp >> 32U))); u32 lo = ((u32)(tmp)); return (multi_return_u32_u32){.arg0=hi, .arg1=lo}; } multi_return_u64_u64 math__bits__mul_64(u64 x, u64 y) { u64 x0 = (x & _const_math__bits__mask32); u64 x1 = (x >> 32U); u64 y0 = (y & _const_math__bits__mask32); u64 y1 = (y >> 32U); u64 w0 = (u64)(x0 * y0); u64 t = (u64)((u64)(x1 * y0) + ((w0 >> 32U))); u64 w1 = (t & _const_math__bits__mask32); u64 w2 = (t >> 32U); w1 += (u64)(x0 * y1); u64 hi = (u64)((u64)((u64)(x1 * y1) + w2) + ((w1 >> 32U))); u64 lo = (u64)(x * y); return (multi_return_u64_u64){.arg0=hi, .arg1=lo}; } multi_return_u32_u32 math__bits__div_32(u32 hi, u32 lo, u32 y) { if (y != 0U && y <= hi) { _v_panic(_const_math__bits__overflow_error); VUNREACHABLE(); } u64 z = (((((u64)(hi)) << 32U)) | ((u64)(lo))); u32 quo = ((u32)((u64)(z / ((u64)(y))))); u32 rem = ((u32)((u64)(z % ((u64)(y))))); return (multi_return_u32_u32){.arg0=quo, .arg1=rem}; } multi_return_u64_u64 math__bits__div_64(u64 hi, u64 lo, u64 y1) { u64 y = y1; if (y == 0U) { _v_panic(_const_math__bits__overflow_error); VUNREACHABLE(); } if (y <= hi) { _v_panic(_const_math__bits__overflow_error); VUNREACHABLE(); } u32 s = ((u32)(math__bits__leading_zeros_64(y))); y <<= s; u64 yn1 = (y >> 32U); u64 yn0 = (y & _const_math__bits__mask32); u64 ss1 = ((hi << s)); u32 xxx = (u32)(64 - s); u64 ss2 = (lo >> xxx); if (xxx == 64U) { ss2 = 0U; } u64 un32 = (ss1 | ss2); u64 un10 = (lo << s); u64 un1 = (un10 >> 32U); u64 un0 = (un10 & _const_math__bits__mask32); u64 q1 = (u64)(un32 / yn1); u64 rhat = (u64)(un32 - ((u64)(q1 * yn1))); for (;;) { if (!(q1 >= _const_math__bits__two32 || ((u64)(q1 * yn0)) > ((u64)(((u64)(_const_math__bits__two32 * rhat)) + un1)))) break; q1--; rhat += yn1; if (rhat >= _const_math__bits__two32) { break; } } u64 un21 = (u64)(((u64)(un32 * _const_math__bits__two32)) + ((u64)(un1 - ((u64)(q1 * y))))); u64 q0 = (u64)(un21 / yn1); rhat = (u64)(un21 - (u64)(q0 * yn1)); for (;;) { if (!(q0 >= _const_math__bits__two32 || ((u64)(q0 * yn0)) > ((u64)(((u64)(_const_math__bits__two32 * rhat)) + un0)))) break; q0--; rhat += yn1; if (rhat >= _const_math__bits__two32) { break; } } u64 qq = ((u64)(((u64)(q1 * _const_math__bits__two32)) + q0)); u64 rr = (((u64)((u64)(((u64)(un21 * _const_math__bits__two32)) + un0) - ((u64)(q0 * y)))) >> s); return (multi_return_u64_u64){.arg0=qq, .arg1=rr}; } u32 math__bits__rem_32(u32 hi, u32 lo, u32 y) { return ((u32)((u64)(((((((u64)(hi)) << 32U)) | ((u64)(lo)))) % ((u64)(y))))); } u64 math__bits__rem_64(u64 hi, u64 lo, u64 y) { multi_return_u64_u64 mr_16656 = math__bits__div_64((u64)(hi % y), lo, y); u64 rem = mr_16656.arg1; return rem; } multi_return_f64_int math__bits__normalize(f64 x) { f64 smallest_normal = 2.2250738585072014e-308; if (((x > ((f64)(0.0)) ? (x) : (-x))) < smallest_normal) { return (multi_return_f64_int){.arg0=(f64)(x * ((((u64)(1U)) << ((u64)(52U))))), .arg1=-52}; } return (multi_return_f64_int){.arg0=x, .arg1=0}; } // Attr: [inline] inline u32 math__bits__f32_bits(f32 f) { u32 p = *((u32*)(&f)); return p; } // Attr: [inline] inline f32 math__bits__f32_from_bits(u32 b) { f32 p = *((f32*)(&b)); return p; } // Attr: [inline] inline u64 math__bits__f64_bits(f64 f) { u64 p = *((u64*)(&f)); return p; } // Attr: [inline] inline f64 math__bits__f64_from_bits(u64 b) { f64 p = *((f64*)(&b)); return p; } VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__lsr96(u32 s2, u32 s1, u32 s0) { u32 r0 = ((u32)(0U)); u32 r1 = ((u32)(0U)); u32 r2 = ((u32)(0U)); r0 = (((s0 >> 1U)) | ((((s1 & ((u32)(1U)))) << 31U))); r1 = (((s1 >> 1U)) | ((((s2 & ((u32)(1U)))) << 31U))); r2 = (s2 >> 1U); return (multi_return_u32_u32_u32){.arg0=r2, .arg1=r1, .arg2=r0}; } VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__lsl96(u32 s2, u32 s1, u32 s0) { u32 r0 = ((u32)(0U)); u32 r1 = ((u32)(0U)); u32 r2 = ((u32)(0U)); r2 = (((s2 << 1U)) | ((((s1 & ((((u32)(1U)) << 31U)))) >> 31U))); r1 = (((s1 << 1U)) | ((((s0 & ((((u32)(1U)) << 31U)))) >> 31U))); r0 = (s0 << 1U); return (multi_return_u32_u32_u32){.arg0=r2, .arg1=r1, .arg2=r0}; } VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__add96(u32 s2, u32 s1, u32 s0, u32 d2, u32 d1, u32 d0) { u64 w = ((u64)(0U)); u32 r0 = ((u32)(0U)); u32 r1 = ((u32)(0U)); u32 r2 = ((u32)(0U)); w = (u64)(((u64)(s0)) + ((u64)(d0))); r0 = ((u32)(w)); w >>= 32U; w += (u64)(((u64)(s1)) + ((u64)(d1))); r1 = ((u32)(w)); w >>= 32U; w += (u64)(((u64)(s2)) + ((u64)(d2))); r2 = ((u32)(w)); return (multi_return_u32_u32_u32){.arg0=r2, .arg1=r1, .arg2=r0}; } VV_LOCAL_SYMBOL multi_return_u32_u32_u32 strconv__sub96(u32 s2, u32 s1, u32 s0, u32 d2, u32 d1, u32 d0) { u64 w = ((u64)(0U)); u32 r0 = ((u32)(0U)); u32 r1 = ((u32)(0U)); u32 r2 = ((u32)(0U)); w = (u64)(((u64)(s0)) - ((u64)(d0))); r0 = ((u32)(w)); w >>= 32U; w += (u64)(((u64)(s1)) - ((u64)(d1))); r1 = ((u32)(w)); w >>= 32U; w += (u64)(((u64)(s2)) - ((u64)(d2))); r2 = ((u32)(w)); return (multi_return_u32_u32_u32){.arg0=r2, .arg1=r1, .arg2=r0}; } VV_LOCAL_SYMBOL bool strconv__is_digit(u8 x) { return x >= _const_strconv__c_zero && x <= _const_strconv__c_nine; } VV_LOCAL_SYMBOL bool strconv__is_space(u8 x) { return x == '\t' || x == '\n' || x == '\v' || x == '\f' || x == '\r' || x == ' '; } VV_LOCAL_SYMBOL bool strconv__is_exp(u8 x) { return x == 'E' || x == 'e'; } // Attr: [direct_array_access] VV_LOCAL_SYMBOL multi_return_strconv__ParserState_strconv__PrepNumber strconv__parser(string s) { int digx = 0; strconv__ParserState result = strconv__ParserState__ok; bool expneg = false; int expexp = 0; int i = 0; strconv__PrepNumber pn = ((strconv__PrepNumber){.negative = 0,.exponent = 0,.mantissa = 0,}); for (;;) { if (!(i < s.len && u8_is_space(s.str[ i]))) break; i++; } if (s.str[ i] == '-') { pn.negative = true; i++; } if (s.str[ i] == '+') { i++; } for (;;) { if (!(i < s.len && u8_is_digit(s.str[ i]))) break; if (digx < _const_strconv__digits) { pn.mantissa *= 10U; pn.mantissa += ((u64)((rune)(s.str[ i] - _const_strconv__c_zero))); digx++; } else if (pn.exponent < 2147483647) { pn.exponent++; } i++; } if (i < s.len && s.str[ i] == '.') { i++; for (;;) { if (!(i < s.len && u8_is_digit(s.str[ i]))) break; if (digx < _const_strconv__digits) { pn.mantissa *= 10U; pn.mantissa += ((u64)((rune)(s.str[ i] - _const_strconv__c_zero))); pn.exponent--; digx++; } i++; } } if (i < s.len && (s.str[ i] == 'e' || s.str[ i] == 'E')) { i++; if (i < s.len) { if (s.str[ i] == _const_strconv__c_plus) { i++; } else if (s.str[ i] == _const_strconv__c_minus) { expneg = true; i++; } for (;;) { if (!(i < s.len && u8_is_digit(s.str[ i]))) break; if (expexp < 214748364) { expexp *= 10; expexp += ((int)((rune)(s.str[ i] - _const_strconv__c_zero))); } i++; } } } if (expneg) { expexp = -expexp; } pn.exponent += expexp; if (pn.mantissa == 0U) { if (pn.negative) { result = strconv__ParserState__mzero; } else { result = strconv__ParserState__pzero; } } else if (pn.exponent > 309) { if (pn.negative) { result = strconv__ParserState__minf; } else { result = strconv__ParserState__pinf; } } else if (pn.exponent < -328) { if (pn.negative) { result = strconv__ParserState__mzero; } else { result = strconv__ParserState__pzero; } } if (i == 0 && s.len > 0) { return (multi_return_strconv__ParserState_strconv__PrepNumber){.arg0=strconv__ParserState__invalid_number, .arg1=pn}; } return (multi_return_strconv__ParserState_strconv__PrepNumber){.arg0=result, .arg1=pn}; } VV_LOCAL_SYMBOL u64 strconv__converter(strconv__PrepNumber* pn) { int binexp = 92; u32 s2 = ((u32)(0U)); u32 s1 = ((u32)(0U)); u32 s0 = ((u32)(0U)); u32 q2 = ((u32)(0U)); u32 q1 = ((u32)(0U)); u32 q0 = ((u32)(0U)); u32 r2 = ((u32)(0U)); u32 r1 = ((u32)(0U)); u32 r0 = ((u32)(0U)); u32 mask28 = ((u32)((((u64)(0xFU)) << 28U))); u64 result = ((u64)(0U)); s0 = ((u32)((pn->mantissa & ((u64)(0x00000000FFFFFFFFU))))); s1 = ((u32)((pn->mantissa >> 32U))); s2 = ((u32)(0U)); for (;;) { if (!(pn->exponent > 0)) break; multi_return_u32_u32_u32 mr_5492 = strconv__lsl96(s2, s1, s0); q2 = mr_5492.arg0; q1 = mr_5492.arg1; q0 = mr_5492.arg2; multi_return_u32_u32_u32 mr_5538 = strconv__lsl96(q2, q1, q0); r2 = mr_5538.arg0; r1 = mr_5538.arg1; r0 = mr_5538.arg2; multi_return_u32_u32_u32 mr_5594 = strconv__lsl96(r2, r1, r0); s2 = mr_5594.arg0; s1 = mr_5594.arg1; s0 = mr_5594.arg2; multi_return_u32_u32_u32 mr_5650 = strconv__add96(s2, s1, s0, q2, q1, q0); s2 = mr_5650.arg0; s1 = mr_5650.arg1; s0 = mr_5650.arg2; pn->exponent--; for (;;) { if (!(((s2 & mask28)) != 0U)) break; multi_return_u32_u32_u32 mr_5773 = strconv__lsr96(s2, s1, s0); q2 = mr_5773.arg0; q1 = mr_5773.arg1; q0 = mr_5773.arg2; binexp++; s2 = q2; s1 = q1; s0 = q0; } } for (;;) { if (!(pn->exponent < 0)) break; for (;;) { if (!(!(((s2 & ((((u32)(1U)) << 31U)))) != 0U))) break; multi_return_u32_u32_u32 mr_5920 = strconv__lsl96(s2, s1, s0); q2 = mr_5920.arg0; q1 = mr_5920.arg1; q0 = mr_5920.arg2; binexp--; s2 = q2; s1 = q1; s0 = q0; } q2 = (u32)(s2 / _const_strconv__c_ten); r1 = (u32)(s2 % _const_strconv__c_ten); r2 = (((s1 >> 8U)) | ((r1 << 24U))); q1 = (u32)(r2 / _const_strconv__c_ten); r1 = (u32)(r2 % _const_strconv__c_ten); r2 = ((((((s1 & ((u32)(0xFFU)))) << 16U)) | ((s0 >> 16U))) | ((r1 << 24U))); r0 = (u32)(r2 / _const_strconv__c_ten); r1 = (u32)(r2 % _const_strconv__c_ten); q1 = (((q1 << 8U)) | ((((r0 & ((u32)(0x00FF0000U)))) >> 16U))); q0 = (r0 << 16U); r2 = (((s0 & ((u32)(0xFFFFU)))) | ((r1 << 16U))); q0 |= (u32)(r2 / _const_strconv__c_ten); s2 = q2; s1 = q1; s0 = q0; pn->exponent++; } if (s2 != 0U || s1 != 0U || s0 != 0U) { for (;;) { if (!(((s2 & mask28)) == 0U)) break; multi_return_u32_u32_u32 mr_6656 = strconv__lsl96(s2, s1, s0); q2 = mr_6656.arg0; q1 = mr_6656.arg1; q0 = mr_6656.arg2; binexp--; s2 = q2; s1 = q1; s0 = q0; } } int nbit = 7; u32 check_round_bit = (((u32)(1U)) << ((u32)(nbit))); u32 check_round_mask = (((u32)(0xFFFFFFFFU)) << ((u32)(nbit))); if (((s1 & check_round_bit)) != 0U) { if (((s1 & ~check_round_mask)) != 0U) { multi_return_u32_u32_u32 mr_7741 = strconv__add96(s2, s1, s0, 0U, check_round_bit, 0U); s2 = mr_7741.arg0; s1 = mr_7741.arg1; s0 = mr_7741.arg2; } else { if (((s1 & ((check_round_bit << ((u32)(1U)))))) != 0U) { multi_return_u32_u32_u32 mr_7935 = strconv__add96(s2, s1, s0, 0U, check_round_bit, 0U); s2 = mr_7935.arg0; s1 = mr_7935.arg1; s0 = mr_7935.arg2; } } s1 = (s1 & check_round_mask); s0 = ((u32)(0U)); if ((s2 & ((mask28 << ((u32)(1U))))) != 0U) { multi_return_u32_u32_u32 mr_8142 = strconv__lsr96(s2, s1, s0); q2 = mr_8142.arg0; q1 = mr_8142.arg1; q0 = mr_8142.arg2; binexp++; s2 = q2; s1 = q1; s0 = q0; } } binexp += 1023; if (binexp > 2046) { if (pn->negative) { result = _const_strconv__double_minus_infinity; } else { result = _const_strconv__double_plus_infinity; } } else if (binexp < 1) { if (pn->negative) { result = _const_strconv__double_minus_zero; } else { result = _const_strconv__double_plus_zero; } } else if (s2 != 0U) { u64 q = ((u64)(0U)); u64 binexs2 = (((u64)(binexp)) << 52U); q = ((((((u64)((s2 & ~mask28))) << 24U)) | ((((u64)(((u64)(s1)) + ((u64)(128U)))) >> 8U))) | binexs2); if (pn->negative) { q |= ((((u64)(1U)) << 63U)); } result = q; } return result; } _result_f64 strconv__atof64(string s) { if (s.len == 0) { return (_result_f64){ .is_error=true, .err=_v_error(_SLIT("expected a number found an empty string")), .data={EMPTY_STRUCT_INITIALIZATION} }; } strconv__Float64u res = ((strconv__Float64u){0}); multi_return_strconv__ParserState_strconv__PrepNumber mr_9233 = strconv__parser(s); strconv__ParserState res_parsing = mr_9233.arg0; strconv__PrepNumber pn = mr_9233.arg1; switch (res_parsing) { case strconv__ParserState__ok: { res.u = strconv__converter((voidptr)&/*qq*/pn); break; } case strconv__ParserState__pzero: { res.u = _const_strconv__double_plus_zero; break; } case strconv__ParserState__mzero: { res.u = _const_strconv__double_minus_zero; break; } case strconv__ParserState__pinf: { res.u = _const_strconv__double_plus_infinity; break; } case strconv__ParserState__minf: { res.u = _const_strconv__double_minus_infinity; break; } case strconv__ParserState__invalid_number: { return (_result_f64){ .is_error=true, .err=_v_error(_SLIT("not a number")), .data={EMPTY_STRUCT_INITIALIZATION} }; } } _result_f64 _t3; _result_ok(&(f64[]) { res.f }, (_result*)(&_t3), sizeof(f64)); return _t3; } // Attr: [direct_array_access] f64 strconv__atof_quick(string s) { strconv__Float64u f = ((strconv__Float64u){0}); f64 sign = ((f64)(1.0)); int i = 0; for (;;) { if (!(i < s.len && s.str[ i] == ' ')) break; i++; } if (i < s.len) { if (s.str[ i] == '-') { sign = -1.0; i++; } else if (s.str[ i] == '+') { i++; } } if (s.str[ i] == 'i' && (int)(i + 2) < s.len && s.str[ (int)(i + 1)] == 'n' && s.str[ (int)(i + 2)] == 'f') { if (sign > ((f64)(0.0))) { f.u = _const_strconv__double_plus_infinity; } else { f.u = _const_strconv__double_minus_infinity; } return f.f; } for (;;) { if (!(i < s.len && s.str[ i] == '0')) break; i++; if (i >= s.len) { if (sign > ((f64)(0.0))) { f.u = _const_strconv__double_plus_zero; } else { f.u = _const_strconv__double_minus_zero; } return f.f; } } for (;;) { if (!(i < s.len && (s.str[ i] >= '0' && s.str[ i] <= '9'))) break; f.f *= ((f64)(10.0)); f.f += ((f64)((rune)(s.str[ i] - '0'))); i++; } if (i < s.len && s.str[ i] == '.') { i++; f64 frac_mul = ((f64)(0.1)); for (;;) { if (!(i < s.len && (s.str[ i] >= '0' && s.str[ i] <= '9'))) break; f.f += (f64)(((f64)((rune)(s.str[ i] - '0'))) * frac_mul); frac_mul *= ((f64)(0.1)); i++; } } if (i < s.len && (s.str[ i] == 'e' || s.str[ i] == 'E')) { i++; int exp = 0; int exp_sign = 1; if (i < s.len) { if (s.str[ i] == '-') { exp_sign = -1; i++; } else if (s.str[ i] == '+') { i++; } } for (;;) { if (!(i < s.len && s.str[ i] == '0')) break; i++; } for (;;) { if (!(i < s.len && (s.str[ i] >= '0' && s.str[ i] <= '9'))) break; exp *= 10; exp += ((int)((rune)(s.str[ i] - '0'))); i++; } if (exp_sign == 1) { if (exp > 309) { if (sign > 0) { f.u = _const_strconv__double_plus_infinity; } else { f.u = _const_strconv__double_minus_infinity; } return f.f; } strconv__Float64u tmp_mul = ((strconv__Float64u){.u = _const_strconv__pos_exp[exp],}); f.f = (f64)(f.f * tmp_mul.f); } else { if (exp > 324) { if (sign > 0) { f.u = _const_strconv__double_plus_zero; } else { f.u = _const_strconv__double_minus_zero; } return f.f; } strconv__Float64u tmp_mul = ((strconv__Float64u){.u = _const_strconv__neg_exp[exp],}); f.f = (f64)(f.f * tmp_mul.f); } } { // Unsafe block f.f = (f64)(f.f * sign); return f.f; } return 0; } // Attr: [inline] inline u8 strconv__byte_to_lower(u8 c) { return (c | 32); } _result_u64 strconv__common_parse_uint(string s, int _base, int _bit_size, bool error_on_non_digit, bool error_on_high_digit) { multi_return_u64_int mr_818 = strconv__common_parse_uint2(s, _base, _bit_size); u64 result = mr_818.arg0; int err = mr_818.arg1; if (err != 0 && (error_on_non_digit || error_on_high_digit)) { switch (err) { case -1: { return (_result_u64){ .is_error=true, .err=_v_error( str_intp(3, _MOV((StrIntpData[]){{_SLIT("common_parse_uint: wrong base "), /*100 &int*/0xfe07, {.d_i32 = _base}}, {_SLIT(" for "), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT0, 0, { .d_c = 0 }}}))), .data={EMPTY_STRUCT_INITIALIZATION} }; } case -2: { return (_result_u64){ .is_error=true, .err=_v_error( str_intp(3, _MOV((StrIntpData[]){{_SLIT("common_parse_uint: wrong bit size "), /*100 &int*/0xfe07, {.d_i32 = _bit_size}}, {_SLIT(" for "), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT0, 0, { .d_c = 0 }}}))), .data={EMPTY_STRUCT_INITIALIZATION} }; } case -3: { return (_result_u64){ .is_error=true, .err=_v_error( str_intp(2, _MOV((StrIntpData[]){{_SLIT("common_parse_uint: integer overflow "), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT0, 0, { .d_c = 0 }}}))), .data={EMPTY_STRUCT_INITIALIZATION} }; } default: { return (_result_u64){ .is_error=true, .err=_v_error( str_intp(2, _MOV((StrIntpData[]){{_SLIT("common_parse_uint: syntax error "), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT0, 0, { .d_c = 0 }}}))), .data={EMPTY_STRUCT_INITIALIZATION} }; } } } _result_u64 _t5; _result_ok(&(u64[]) { result }, (_result*)(&_t5), sizeof(u64)); return _t5; } // Attr: [direct_array_access] multi_return_u64_int strconv__common_parse_uint2(string s, int _base, int _bit_size) { if (s.len < 1) { return (multi_return_u64_int){.arg0=((u64)(0U)), .arg1=1}; } int bit_size = _bit_size; int base = _base; int start_index = 0; if (base == 0) { base = 10; if (s.str[ 0] == '0') { u8 ch = (s.str[ 1] | 32); if (s.len >= 3) { if (ch == 'b') { base = 2; start_index += 2; } else if (ch == 'o') { base = 8; start_index += 2; } else if (ch == 'x') { base = 16; start_index += 2; } if (s.str[ start_index] == '_') { start_index++; } } else if (s.len >= 2 && (s.str[ 1] >= '0' && s.str[ 1] <= '9')) { base = 10; start_index++; } else { base = 8; start_index++; } } } if (bit_size == 0) { bit_size = _const_strconv__int_size; } else if (bit_size < 0 || bit_size > 64) { return (multi_return_u64_int){.arg0=((u64)(0U)), .arg1=-2}; } u64 cutoff = (u64)((u64)(_const_strconv__max_u64 / ((u64)(base))) + ((u64)(1U))); u64 max_val = (bit_size == 64 ? (_const_strconv__max_u64) : ((u64)(((((u64)(1U)) << ((u64)(bit_size)))) - ((u64)(1U))))); int basem1 = (int)(base - 1); u64 n = ((u64)(0U)); for (int i = start_index; i < s.len; ++i) { u8 c = s.str[ i]; if (c == '_') { if (i == start_index || i >= ((int)(s.len - 1))) { return (multi_return_u64_int){.arg0=((u64)(0U)), .arg1=1}; } if (s.str[ (int)(i - 1)] == '_' || s.str[ (int)(i + 1)] == '_') { return (multi_return_u64_int){.arg0=((u64)(0U)), .arg1=1}; } continue; } int sub_count = 0; c -= 48; if (c >= 17) { sub_count++; c -= 7; if (c >= 42) { sub_count++; c -= 32; } } if (c > basem1 || (sub_count == 0 && c > 9)) { return (multi_return_u64_int){.arg0=n, .arg1=(int)(i + 1)}; } if (n >= cutoff) { return (multi_return_u64_int){.arg0=max_val, .arg1=-3}; } n *= ((u64)(base)); u64 n1 = (u64)(n + ((u64)(c))); if (n1 < n || n1 > max_val) { return (multi_return_u64_int){.arg0=max_val, .arg1=-3}; } n = n1; } return (multi_return_u64_int){.arg0=n, .arg1=0}; } _result_u64 strconv__parse_uint(string s, int _base, int _bit_size) { _result_u64 _t1 = strconv__common_parse_uint(s, _base, _bit_size, true, true); return _t1; } // Attr: [direct_array_access] _result_i64 strconv__common_parse_int(string _s, int base, int _bit_size, bool error_on_non_digit, bool error_on_high_digit) { if (_s.len < 1) { _result_i64 _t1; _result_ok(&(i64[]) { ((i64)(0)) }, (_result*)(&_t1), sizeof(i64)); return _t1; } int bit_size = _bit_size; if (bit_size == 0) { bit_size = _const_strconv__int_size; } string s = _s; bool neg = false; if (s.str[ 0] == '+') { { // Unsafe block s = tos(s.str + 1, (int)(s.len - 1)); } } else if (s.str[ 0] == '-') { neg = true; { // Unsafe block s = tos(s.str + 1, (int)(s.len - 1)); } } _result_u64 _t2 = strconv__common_parse_uint(s, base, bit_size, error_on_non_digit, error_on_high_digit); if (_t2.is_error) { _result_i64 _t3; memcpy(&_t3, &_t2, sizeof(_result)); return _t3; } u64 un = (*(u64*)_t2.data); if (un == 0U) { _result_i64 _t4; _result_ok(&(i64[]) { ((i64)(0)) }, (_result*)(&_t4), sizeof(i64)); return _t4; } u64 cutoff = (((u64)(1U)) << ((u64)((int)(bit_size - 1)))); if (!neg && un >= cutoff) { _result_i64 _t5; _result_ok(&(i64[]) { ((i64)((u64)(cutoff - ((u64)(1U))))) }, (_result*)(&_t5), sizeof(i64)); return _t5; } if (neg && un > cutoff) { _result_i64 _t6; _result_ok(&(i64[]) { -((i64)(cutoff)) }, (_result*)(&_t6), sizeof(i64)); return _t6; } _result_i64 _t8; /* if prepend */ if (neg) { _result_ok(&(i64[]) { -((i64)(un)) }, (_result*)(&_t8), sizeof(i64)); } else { _result_ok(&(i64[]) { ((i64)(un)) }, (_result*)(&_t8), sizeof(i64)); } return _t8; } _result_i64 strconv__parse_int(string _s, int base, int _bit_size) { _result_i64 _t1 = strconv__common_parse_int(_s, base, _bit_size, true, true); return _t1; } // Attr: [direct_array_access] _result_int strconv__atoi(string s) { if ((s).len == 0) { return (_result_int){ .is_error=true, .err=_v_error(_SLIT("strconv.atoi: parsing \"\": invalid syntax")), .data={EMPTY_STRUCT_INITIALIZATION} }; } if ((_const_strconv__int_size == 32 && (0 < s.len && s.len < 10)) || (_const_strconv__int_size == 64 && (0 < s.len && s.len < 19))) { int start_idx = 0; if (s.str[ 0] == '-' || s.str[ 0] == '+') { start_idx++; if ((int)(s.len - start_idx) < 1) { return (_result_int){ .is_error=true, .err=_v_error( str_intp(2, _MOV((StrIntpData[]){{_SLIT("strconv.atoi: parsing \""), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT("\": invalid syntax"), 0, { .d_c = 0 }}}))), .data={EMPTY_STRUCT_INITIALIZATION} }; } } int n = 0; for (int i = start_idx; i < s.len; ++i) { rune ch = (rune)(s.str[ i] - '0'); if (ch > 9) { return (_result_int){ .is_error=true, .err=_v_error( str_intp(2, _MOV((StrIntpData[]){{_SLIT("strconv.atoi: parsing \""), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT("\": invalid syntax"), 0, { .d_c = 0 }}}))), .data={EMPTY_STRUCT_INITIALIZATION} }; } n = (int)((int)(n * 10) + ((int)(ch))); } _result_int _t5; /* if prepend */ if (s.str[ 0] == '-') { _result_ok(&(int[]) { -n }, (_result*)(&_t5), sizeof(int)); } else { _result_ok(&(int[]) { n }, (_result*)(&_t5), sizeof(int)); } return _t5; } _result_i64 _t6 = strconv__parse_int(s, 10, 0); if (_t6.is_error) { _result_int _t7; memcpy(&_t7, &_t6, sizeof(_result)); return _t7; } i64 int64 = (*(i64*)_t6.data); _result_int _t8; _result_ok(&(int[]) { ((int)(int64)) }, (_result*)(&_t8), sizeof(int)); return _t8; } // Attr: [direct_array_access] string strconv__Dec32_get_string_32(strconv__Dec32 d, bool neg, int i_n_digit, int i_pad_digit) { int n_digit = (int)(i_n_digit + 1); int pad_digit = (int)(i_pad_digit + 1); u32 out = d.m; int out_len = strconv__dec_digits(out); int out_len_original = out_len; int fw_zeros = 0; if (pad_digit > out_len) { fw_zeros = (int)(pad_digit - out_len); } Array_u8 buf = __new_array_with_default(((int)((int)((int)((int)(out_len + 5) + 1) + 1))), 0, sizeof(u8), 0); int i = 0; if (neg) { if (buf.data != 0) { ((u8*)buf.data)[i] = '-'; } i++; } int disp = 0; if (out_len <= 1) { disp = 1; } if (n_digit < out_len) { out += (u32)(_const_strconv__ten_pow_table_32[(int)((int)(out_len - n_digit) - 1)] * 5U); out /= _const_strconv__ten_pow_table_32[(int)(out_len - n_digit)]; out_len = n_digit; } int y = (int)(i + out_len); int x = 0; for (;;) { if (!(x < ((int)((int)(out_len - disp) - 1)))) break; ((u8*)buf.data)[(int)(y - x)] = (rune)('0' + ((u8)((u32)(out % 10U)))); out /= 10U; i++; x++; } if (i_n_digit == 0) { { // Unsafe block ((u8*)buf.data)[i] = 0; return tos(((u8*)(&((u8*)buf.data)[0])), i); } } if (out_len >= 1) { ((u8*)buf.data)[(int)(y - x)] = '.'; x++; i++; } if ((int)(y - x) >= 0) { ((u8*)buf.data)[(int)(y - x)] = (rune)('0' + ((u8)((u32)(out % 10U)))); i++; } for (;;) { if (!(fw_zeros > 0)) break; ((u8*)buf.data)[i] = '0'; i++; fw_zeros--; } ((u8*)buf.data)[i] = 'e'; i++; int exp = (int)((int)(d.e + out_len_original) - 1); if (exp < 0) { ((u8*)buf.data)[i] = '-'; i++; exp = -exp; } else { ((u8*)buf.data)[i] = '+'; i++; } int d1 = (int)(exp % 10); int d0 = (int)(exp / 10); ((u8*)buf.data)[i] = (rune)('0' + ((u8)(d0))); i++; ((u8*)buf.data)[i] = (rune)('0' + ((u8)(d1))); i++; ((u8*)buf.data)[i] = 0; return tos(((u8*)(&((u8*)buf.data)[0])), i); } VV_LOCAL_SYMBOL multi_return_strconv__Dec32_bool strconv__f32_to_decimal_exact_int(u32 i_mant, u32 exp) { strconv__Dec32 d = ((strconv__Dec32){.m = 0,.e = 0,}); u32 e = (u32)(exp - _const_strconv__bias32); if (e > _const_strconv__mantbits32) { return (multi_return_strconv__Dec32_bool){.arg0=d, .arg1=false}; } u32 shift = (u32)(_const_strconv__mantbits32 - e); u32 mant = (i_mant | 0x00800000U); d.m = (mant >> shift); if (((d.m << shift)) != mant) { return (multi_return_strconv__Dec32_bool){.arg0=d, .arg1=false}; } for (;;) { if (!(((u32)(d.m % 10U)) == 0U)) break; d.m /= 10U; d.e++; } return (multi_return_strconv__Dec32_bool){.arg0=d, .arg1=true}; } VV_LOCAL_SYMBOL strconv__Dec32 strconv__f32_to_decimal(u32 mant, u32 exp) { int e2 = 0; u32 m2 = ((u32)(0U)); if (exp == 0U) { e2 = (int)((int)((int_literal)(1 - _const_strconv__bias32) - ((int)(_const_strconv__mantbits32))) - 2); m2 = mant; } else { e2 = (int)((int)((int)(((int)(exp)) - _const_strconv__bias32) - ((int)(_const_strconv__mantbits32))) - 2); m2 = (((((u32)(1U)) << _const_strconv__mantbits32)) | mant); } bool even = ((m2 & 1U)) == 0U; bool accept_bounds = even; u32 mv = ((u32)((u32)(4 * m2))); u32 mp = ((u32)((u32)((u32)(4 * m2) + 2U))); u32 mm_shift = strconv__bool_to_u32(mant != 0U || exp <= 1U); u32 mm = ((u32)((u32)((u32)((u32)(4 * m2) - 1U) - mm_shift))); u32 vr = ((u32)(0U)); u32 vp = ((u32)(0U)); u32 vm = ((u32)(0U)); int e10 = 0; bool vm_is_trailing_zeros = false; bool vr_is_trailing_zeros = false; u8 last_removed_digit = ((u8)(0)); if (e2 >= 0) { u32 q = strconv__log10_pow2(e2); e10 = ((int)(q)); int k = (int)((int)(_const_strconv__pow5_inv_num_bits_32 + strconv__pow5_bits(((int)(q)))) - 1); int i = (int)((int)(-e2 + ((int)(q))) + k); vr = strconv__mul_pow5_invdiv_pow2(mv, q, i); vp = strconv__mul_pow5_invdiv_pow2(mp, q, i); vm = strconv__mul_pow5_invdiv_pow2(mm, q, i); if (q != 0U && (u32)(((u32)(vp - 1U)) / 10U) <= (u32)(vm / 10U)) { int l = (int)((int)(_const_strconv__pow5_inv_num_bits_32 + strconv__pow5_bits(((int)((u32)(q - 1U))))) - 1); last_removed_digit = ((u8)((u32)(strconv__mul_pow5_invdiv_pow2(mv, (u32)(q - 1U), (int)((int)(-e2 + ((int)((u32)(q - 1U)))) + l)) % 10U))); } if (q <= 9U) { if ((u32)(mv % 5U) == 0U) { vr_is_trailing_zeros = strconv__multiple_of_power_of_five_32(mv, q); } else if (accept_bounds) { vm_is_trailing_zeros = strconv__multiple_of_power_of_five_32(mm, q); } else if (strconv__multiple_of_power_of_five_32(mp, q)) { vp--; } } } else { u32 q = strconv__log10_pow5(-e2); e10 = (int)(((int)(q)) + e2); int i = (int)(-e2 - ((int)(q))); int k = (int)(strconv__pow5_bits(i) - _const_strconv__pow5_num_bits_32); int j = (int)(((int)(q)) - k); vr = strconv__mul_pow5_div_pow2(mv, ((u32)(i)), j); vp = strconv__mul_pow5_div_pow2(mp, ((u32)(i)), j); vm = strconv__mul_pow5_div_pow2(mm, ((u32)(i)), j); if (q != 0U && ((u32)(((u32)(vp - 1U)) / 10U)) <= (u32)(vm / 10U)) { j = (int)((int)(((int)(q)) - 1) - ((int)(strconv__pow5_bits((int)(i + 1)) - _const_strconv__pow5_num_bits_32))); last_removed_digit = ((u8)((u32)(strconv__mul_pow5_div_pow2(mv, ((u32)((int)(i + 1))), j) % 10U))); } if (q <= 1U) { vr_is_trailing_zeros = true; if (accept_bounds) { vm_is_trailing_zeros = mm_shift == 1U; } else { vp--; } } else if (q < 31U) { vr_is_trailing_zeros = strconv__multiple_of_power_of_two_32(mv, (u32)(q - 1U)); } } int removed = 0; u32 out = ((u32)(0U)); if (vm_is_trailing_zeros || vr_is_trailing_zeros) { for (;;) { if (!((u32)(vp / 10U) > (u32)(vm / 10U))) break; vm_is_trailing_zeros = vm_is_trailing_zeros && ((u32)(vm % 10U)) == 0U; vr_is_trailing_zeros = vr_is_trailing_zeros && last_removed_digit == 0; last_removed_digit = ((u8)((u32)(vr % 10U))); vr /= 10U; vp /= 10U; vm /= 10U; removed++; } if (vm_is_trailing_zeros) { for (;;) { if (!((u32)(vm % 10U) == 0U)) break; vr_is_trailing_zeros = vr_is_trailing_zeros && last_removed_digit == 0; last_removed_digit = ((u8)((u32)(vr % 10U))); vr /= 10U; vp /= 10U; vm /= 10U; removed++; } } if (vr_is_trailing_zeros && last_removed_digit == 5 && ((u32)(vr % 2U)) == 0U) { last_removed_digit = 4; } out = vr; if ((vr == vm && (!accept_bounds || !vm_is_trailing_zeros)) || last_removed_digit >= 5) { out++; } } else { for (;;) { if (!((u32)(vp / 10U) > (u32)(vm / 10U))) break; last_removed_digit = ((u8)((u32)(vr % 10U))); vr /= 10U; vp /= 10U; vm /= 10U; removed++; } out = (u32)(vr + strconv__bool_to_u32(vr == vm || last_removed_digit >= 5)); } return ((strconv__Dec32){.m = out,.e = (int)(e10 + removed),}); } string strconv__f32_to_str(f32 f, int n_digit) { strconv__Uf32 u1 = ((strconv__Uf32){0}); u1.f = f; u32 u = u1.u; bool neg = ((u >> ((u32)(_const_strconv__mantbits32 + _const_strconv__expbits32)))) != 0U; u32 mant = (u & ((u32)(((((u32)(1U)) << _const_strconv__mantbits32)) - ((u32)(1U))))); u32 exp = (((u >> _const_strconv__mantbits32)) & ((u32)(((((u32)(1U)) << _const_strconv__expbits32)) - ((u32)(1U))))); if (exp == _const_strconv__maxexp32 || (exp == 0U && mant == 0U)) { return strconv__get_string_special(neg, exp == 0U, mant == 0U); } multi_return_strconv__Dec32_bool mr_8746 = strconv__f32_to_decimal_exact_int(mant, exp); strconv__Dec32 d = mr_8746.arg0; bool ok = mr_8746.arg1; if (!ok) { d = strconv__f32_to_decimal(mant, exp); } return strconv__Dec32_get_string_32(d, neg, n_digit, 0); } string strconv__f32_to_str_pad(f32 f, int n_digit) { strconv__Uf32 u1 = ((strconv__Uf32){0}); u1.f = f; u32 u = u1.u; bool neg = ((u >> ((u32)(_const_strconv__mantbits32 + _const_strconv__expbits32)))) != 0U; u32 mant = (u & ((u32)(((((u32)(1U)) << _const_strconv__mantbits32)) - ((u32)(1U))))); u32 exp = (((u >> _const_strconv__mantbits32)) & ((u32)(((((u32)(1U)) << _const_strconv__expbits32)) - ((u32)(1U))))); if (exp == _const_strconv__maxexp32 || (exp == 0U && mant == 0U)) { return strconv__get_string_special(neg, exp == 0U, mant == 0U); } multi_return_strconv__Dec32_bool mr_9528 = strconv__f32_to_decimal_exact_int(mant, exp); strconv__Dec32 d = mr_9528.arg0; bool ok = mr_9528.arg1; if (!ok) { d = strconv__f32_to_decimal(mant, exp); } return strconv__Dec32_get_string_32(d, neg, n_digit, n_digit); } // Attr: [direct_array_access] VV_LOCAL_SYMBOL string strconv__Dec64_get_string_64(strconv__Dec64 d, bool neg, int i_n_digit, int i_pad_digit) { int n_digit = (int)(i_n_digit + 1); int pad_digit = (int)(i_pad_digit + 1); u64 out = d.m; int d_exp = d.e; int out_len = strconv__dec_digits(out); int out_len_original = out_len; int fw_zeros = 0; if (pad_digit > out_len) { fw_zeros = (int)(pad_digit - out_len); } Array_u8 buf = __new_array_with_default(((int)((int)((int)((int)(out_len + 6) + 1) + 1) + fw_zeros)), 0, sizeof(u8), 0); int i = 0; if (neg) { ((u8*)buf.data)[i] = '-'; i++; } int disp = 0; if (out_len <= 1) { disp = 1; } if (n_digit < out_len) { out += (u64)(_const_strconv__ten_pow_table_64[(int)((int)(out_len - n_digit) - 1)] * 5U); out /= _const_strconv__ten_pow_table_64[(int)(out_len - n_digit)]; if ((u64)(d.m / _const_strconv__ten_pow_table_64[(int)(out_len - n_digit)]) < out) { d_exp++; n_digit++; } out_len = n_digit; } int y = (int)(i + out_len); int x = 0; for (;;) { if (!(x < ((int)((int)(out_len - disp) - 1)))) break; ((u8*)buf.data)[(int)(y - x)] = (rune)('0' + ((u8)((u64)(out % 10U)))); out /= 10U; i++; x++; } if (i_n_digit == 0) { { // Unsafe block ((u8*)buf.data)[i] = 0; return tos(((u8*)(&((u8*)buf.data)[0])), i); } } if (out_len >= 1) { ((u8*)buf.data)[(int)(y - x)] = '.'; x++; i++; } if ((int)(y - x) >= 0) { ((u8*)buf.data)[(int)(y - x)] = (rune)('0' + ((u8)((u64)(out % 10U)))); i++; } for (;;) { if (!(fw_zeros > 0)) break; ((u8*)buf.data)[i] = '0'; i++; fw_zeros--; } ((u8*)buf.data)[i] = 'e'; i++; int exp = (int)((int)(d_exp + out_len_original) - 1); if (exp < 0) { ((u8*)buf.data)[i] = '-'; i++; exp = -exp; } else { ((u8*)buf.data)[i] = '+'; i++; } int d2 = (int)(exp % 10); exp /= 10; int d1 = (int)(exp % 10); int d0 = (int)(exp / 10); if (d0 > 0) { ((u8*)buf.data)[i] = (rune)('0' + ((u8)(d0))); i++; } ((u8*)buf.data)[i] = (rune)('0' + ((u8)(d1))); i++; ((u8*)buf.data)[i] = (rune)('0' + ((u8)(d2))); i++; ((u8*)buf.data)[i] = 0; return tos(((u8*)(&((u8*)buf.data)[0])), i); } VV_LOCAL_SYMBOL multi_return_strconv__Dec64_bool strconv__f64_to_decimal_exact_int(u64 i_mant, u64 exp) { strconv__Dec64 d = ((strconv__Dec64){.m = 0,.e = 0,}); u64 e = (u64)(exp - _const_strconv__bias64); if (e > _const_strconv__mantbits64) { return (multi_return_strconv__Dec64_bool){.arg0=d, .arg1=false}; } u64 shift = (u64)(_const_strconv__mantbits64 - e); u64 mant = (i_mant | ((u64)(0x0010000000000000U))); d.m = (mant >> shift); if (((d.m << shift)) != mant) { return (multi_return_strconv__Dec64_bool){.arg0=d, .arg1=false}; } for (;;) { if (!(((u64)(d.m % 10U)) == 0U)) break; d.m /= 10U; d.e++; } return (multi_return_strconv__Dec64_bool){.arg0=d, .arg1=true}; } VV_LOCAL_SYMBOL strconv__Dec64 strconv__f64_to_decimal(u64 mant, u64 exp) { int e2 = 0; u64 m2 = ((u64)(0U)); if (exp == 0U) { e2 = (int)((int)((int_literal)(1 - _const_strconv__bias64) - ((int)(_const_strconv__mantbits64))) - 2); m2 = mant; } else { e2 = (int)((int)((int)(((int)(exp)) - _const_strconv__bias64) - ((int)(_const_strconv__mantbits64))) - 2); m2 = (((((u64)(1U)) << _const_strconv__mantbits64)) | mant); } bool even = ((m2 & 1U)) == 0U; bool accept_bounds = even; u64 mv = ((u64)((u64)(4 * m2))); u64 mm_shift = strconv__bool_to_u64(mant != 0U || exp <= 1U); u64 vr = ((u64)(0U)); u64 vp = ((u64)(0U)); u64 vm = ((u64)(0U)); int e10 = 0; bool vm_is_trailing_zeros = false; bool vr_is_trailing_zeros = false; if (e2 >= 0) { u32 q = (u32)(strconv__log10_pow2(e2) - strconv__bool_to_u32(e2 > 3)); e10 = ((int)(q)); int k = (int)((int)(_const_strconv__pow5_inv_num_bits_64 + strconv__pow5_bits(((int)(q)))) - 1); int i = (int)((int)(-e2 + ((int)(q))) + k); strconv__Uint128 mul = *(((strconv__Uint128*)(&_const_strconv__pow5_inv_split_64_x[v_fixed_index((u32)(q * 2U), 584)]))); vr = strconv__mul_shift_64((u64)(((u64)(4U)) * m2), mul, i); vp = strconv__mul_shift_64((u64)((u64)(((u64)(4U)) * m2) + ((u64)(2U))), mul, i); vm = strconv__mul_shift_64((u64)((u64)((u64)(((u64)(4U)) * m2) - ((u64)(1U))) - mm_shift), mul, i); if (q <= 21U) { if ((u64)(mv % 5U) == 0U) { vr_is_trailing_zeros = strconv__multiple_of_power_of_five_64(mv, q); } else if (accept_bounds) { vm_is_trailing_zeros = strconv__multiple_of_power_of_five_64((u64)((u64)(mv - 1U) - mm_shift), q); } else if (strconv__multiple_of_power_of_five_64((u64)(mv + 2U), q)) { vp--; } } } else { u32 q = (u32)(strconv__log10_pow5(-e2) - strconv__bool_to_u32(-e2 > 1)); e10 = (int)(((int)(q)) + e2); int i = (int)(-e2 - ((int)(q))); int k = (int)(strconv__pow5_bits(i) - _const_strconv__pow5_num_bits_64); int j = (int)(((int)(q)) - k); strconv__Uint128 mul = *(((strconv__Uint128*)(&_const_strconv__pow5_split_64_x[v_fixed_index((int)(i * 2), 652)]))); vr = strconv__mul_shift_64((u64)(((u64)(4U)) * m2), mul, j); vp = strconv__mul_shift_64((u64)((u64)(((u64)(4U)) * m2) + ((u64)(2U))), mul, j); vm = strconv__mul_shift_64((u64)((u64)((u64)(((u64)(4U)) * m2) - ((u64)(1U))) - mm_shift), mul, j); if (q <= 1U) { vr_is_trailing_zeros = true; if (accept_bounds) { vm_is_trailing_zeros = (mm_shift == 1U); } else { vp--; } } else if (q < 63U) { vr_is_trailing_zeros = strconv__multiple_of_power_of_two_64(mv, (u32)(q - 1U)); } } int removed = 0; u8 last_removed_digit = ((u8)(0)); u64 out = ((u64)(0U)); if (vm_is_trailing_zeros || vr_is_trailing_zeros) { for (;;) { u64 vp_div_10 = (u64)(vp / 10U); u64 vm_div_10 = (u64)(vm / 10U); if (vp_div_10 <= vm_div_10) { break; } u64 vm_mod_10 = (u64)(vm % 10U); u64 vr_div_10 = (u64)(vr / 10U); u64 vr_mod_10 = (u64)(vr % 10U); vm_is_trailing_zeros = vm_is_trailing_zeros && vm_mod_10 == 0U; vr_is_trailing_zeros = vr_is_trailing_zeros && last_removed_digit == 0; last_removed_digit = ((u8)(vr_mod_10)); vr = vr_div_10; vp = vp_div_10; vm = vm_div_10; removed++; } if (vm_is_trailing_zeros) { for (;;) { u64 vm_div_10 = (u64)(vm / 10U); u64 vm_mod_10 = (u64)(vm % 10U); if (vm_mod_10 != 0U) { break; } u64 vp_div_10 = (u64)(vp / 10U); u64 vr_div_10 = (u64)(vr / 10U); u64 vr_mod_10 = (u64)(vr % 10U); vr_is_trailing_zeros = vr_is_trailing_zeros && last_removed_digit == 0; last_removed_digit = ((u8)(vr_mod_10)); vr = vr_div_10; vp = vp_div_10; vm = vm_div_10; removed++; } } if (vr_is_trailing_zeros && last_removed_digit == 5 && ((u64)(vr % 2U)) == 0U) { last_removed_digit = 4; } out = vr; if ((vr == vm && (!accept_bounds || !vm_is_trailing_zeros)) || last_removed_digit >= 5) { out++; } } else { bool round_up = false; for (;;) { if (!((u64)(vp / 100U) > (u64)(vm / 100U))) break; round_up = ((u64)(vr % 100U)) >= 50U; vr /= 100U; vp /= 100U; vm /= 100U; removed += 2; } for (;;) { if (!((u64)(vp / 10U) > (u64)(vm / 10U))) break; round_up = ((u64)(vr % 10U)) >= 5U; vr /= 10U; vp /= 10U; vm /= 10U; removed++; } out = (u64)(vr + strconv__bool_to_u64(vr == vm || round_up)); } return ((strconv__Dec64){.m = out,.e = (int)(e10 + removed),}); } string strconv__f64_to_str(f64 f, int n_digit) { strconv__Uf64 u1 = ((strconv__Uf64){0}); u1.f = f; u64 u = u1.u; bool neg = ((u >> ((u32)(_const_strconv__mantbits64 + _const_strconv__expbits64)))) != 0U; u64 mant = (u & ((u64)(((((u64)(1U)) << _const_strconv__mantbits64)) - ((u64)(1U))))); u64 exp = (((u >> _const_strconv__mantbits64)) & ((u64)(((((u64)(1U)) << _const_strconv__expbits64)) - ((u64)(1U))))); if (exp == _const_strconv__maxexp64 || (exp == 0U && mant == 0U)) { return strconv__get_string_special(neg, exp == 0U, mant == 0U); } multi_return_strconv__Dec64_bool mr_9356 = strconv__f64_to_decimal_exact_int(mant, exp); strconv__Dec64 d = mr_9356.arg0; bool ok = mr_9356.arg1; if (!ok) { d = strconv__f64_to_decimal(mant, exp); } return strconv__Dec64_get_string_64(d, neg, n_digit, 0); } string strconv__f64_to_str_pad(f64 f, int n_digit) { strconv__Uf64 u1 = ((strconv__Uf64){0}); u1.f = f; u64 u = u1.u; bool neg = ((u >> ((u32)(_const_strconv__mantbits64 + _const_strconv__expbits64)))) != 0U; u64 mant = (u & ((u64)(((((u64)(1U)) << _const_strconv__mantbits64)) - ((u64)(1U))))); u64 exp = (((u >> _const_strconv__mantbits64)) & ((u64)(((((u64)(1U)) << _const_strconv__expbits64)) - ((u64)(1U))))); if (exp == _const_strconv__maxexp64 || (exp == 0U && mant == 0U)) { return strconv__get_string_special(neg, exp == 0U, mant == 0U); } multi_return_strconv__Dec64_bool mr_10127 = strconv__f64_to_decimal_exact_int(mant, exp); strconv__Dec64 d = mr_10127.arg0; bool ok = mr_10127.arg1; if (!ok) { d = strconv__f64_to_decimal(mant, exp); } return strconv__Dec64_get_string_64(d, neg, n_digit, n_digit); } // Attr: [manualfree] string strconv__format_str(string s, strconv__BF_param p) { bool strconv__format_str_defer_0 = false; strings__Builder res; if (p.len0 <= 0) { return string_clone(s); } int dif = (int)(p.len0 - utf8_str_visible_length(s)); if (dif <= 0) { return string_clone(s); } res = strings__new_builder((int)(s.len + dif)); strconv__format_str_defer_0 = true; if (p.allign == strconv__Align_text__right) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } strings__Builder_write_string(&res, s); if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } string _t3 = strings__Builder_str(&res); // Defer begin if (strconv__format_str_defer_0) { strings__Builder_free(&res); } // Defer end return _t3; } void strconv__format_str_sb(string s, strconv__BF_param p, strings__Builder* sb) { if (p.len0 <= 0) { strings__Builder_write_string(sb, s); return; } int dif = (int)(p.len0 - utf8_str_visible_length(s)); if (dif <= 0) { strings__Builder_write_string(sb, s); return; } if (p.allign == strconv__Align_text__right) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(sb, p.pad_ch); } } strings__Builder_write_string(sb, s); if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(sb, p.pad_ch); } } } // Attr: [direct_array_access] void strconv__format_dec_sb(u64 d, strconv__BF_param p, strings__Builder* res) { int n_char = strconv__dec_digits(d); int sign_len = (!p.positive || p.sign_flag ? (1) : (0)); int number_len = (int)(sign_len + n_char); int dif = (int)(p.len0 - number_len); bool sign_written = false; if (p.allign == strconv__Align_text__right) { if (p.pad_ch == '0') { if (p.positive) { if (p.sign_flag) { strings__Builder_write_u8(res, '+'); sign_written = true; } } else { strings__Builder_write_u8(res, '-'); sign_written = true; } } for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(res, p.pad_ch); } } if (!sign_written) { if (p.positive) { if (p.sign_flag) { strings__Builder_write_u8(res, '+'); } } else { strings__Builder_write_u8(res, '-'); } } Array_fixed_u8_32 buf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int i = 20; u64 n = d; u64 d_i = ((u64)(0U)); if (n > 0U) { for (;;) { if (!(n > 0U)) break; u64 n1 = (u64)(n / 100U); d_i = (((u64)(n - ((u64)(n1 * 100U)))) << 1U); n = n1; { // Unsafe block buf[i] = _const_strconv__digit_pairs.str[d_i]; } i--; d_i++; { // Unsafe block buf[i] = _const_strconv__digit_pairs.str[d_i]; } i--; } i++; if (d_i < 20U) { i++; } strings__Builder_write_ptr(res, &buf[i], n_char); } else { strings__Builder_write_u8(res, '0'); } if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(res, p.pad_ch); } } return; } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__f64_to_str_lnd1(f64 f, int dec_digit) { { // Unsafe block string s = strconv__f64_to_str((f64)(f + _const_strconv__dec_round[dec_digit]), 18); if (s.len > 2 && (s.str[ 0] == 'n' || s.str[ 1] == 'i')) { return s; } bool m_sgn_flag = false; int sgn = 1; Array_fixed_u8_26 b = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int d_pos = 1; int i = 0; int i1 = 0; int exp = 0; int exp_sgn = 1; int dot_res_sp = -1; for (int _t2 = 0; _t2 < s.len; ++_t2) { u8 c = s.str[_t2]; if (c == ('-')) { sgn = -1; i++; } else if (c == ('+')) { sgn = 1; i++; } else if ((c >= '0' && c <= '9')) { b[i1] = c; i1++; i++; } else if (c == ('.')) { if (sgn > 0) { d_pos = i; } else { d_pos = (int)(i - 1); } i++; } else if (c == ('e')) { i++; break; } else { string_free(&s); return _SLIT("[Float conversion error!!]"); } } b[i1] = 0; if (s.str[ i] == '-') { exp_sgn = -1; i++; } else if (s.str[ i] == '+') { exp_sgn = 1; i++; } int c = i; for (;;) { if (!(c < s.len)) break; exp = (int)((int)(exp * 10) + ((int)((rune)(s.str[ c] - '0')))); c++; } Array_u8 res = __new_array_with_default((int)(exp + 32), 0, sizeof(u8), &(u8[]){0}); int r_i = 0; string_free(&s); if (sgn == 1) { if (m_sgn_flag) { ((u8*)res.data)[r_i] = '+'; r_i++; } } else { ((u8*)res.data)[r_i] = '-'; r_i++; } i = 0; if (exp_sgn >= 0) { for (;;) { if (!(b[i] != 0)) break; ((u8*)res.data)[r_i] = b[i]; r_i++; i++; if (i >= d_pos && exp >= 0) { if (exp == 0) { dot_res_sp = r_i; ((u8*)res.data)[r_i] = '.'; r_i++; } exp--; } } for (;;) { if (!(exp >= 0)) break; ((u8*)res.data)[r_i] = '0'; r_i++; exp--; } } else { bool dot_p = true; for (;;) { if (!(exp > 0)) break; ((u8*)res.data)[r_i] = '0'; r_i++; exp--; if (dot_p) { dot_res_sp = r_i; ((u8*)res.data)[r_i] = '.'; r_i++; dot_p = false; } } for (;;) { if (!(b[i] != 0)) break; ((u8*)res.data)[r_i] = b[i]; r_i++; i++; } } if (dec_digit <= 0) { if (dot_res_sp < 0) { dot_res_sp = (int)(i + 1); } string tmp_res = string_clone(tos(res.data, dot_res_sp)); array_free(&res); return tmp_res; } if (dot_res_sp >= 0) { r_i = (int)((int)(dot_res_sp + dec_digit) + 1); ((u8*)res.data)[r_i] = 0; for (int c1 = 1; c1 < (int)(dec_digit + 1); ++c1) { if (((u8*)res.data)[(int)(r_i - c1)] == 0) { ((u8*)res.data)[(int)(r_i - c1)] = '0'; } } string tmp_res = string_clone(tos(res.data, r_i)); array_free(&res); return tmp_res; } else { if (dec_digit > 0) { int c1 = 0; ((u8*)res.data)[r_i] = '.'; r_i++; for (;;) { if (!(c1 < dec_digit)) break; ((u8*)res.data)[r_i] = '0'; r_i++; c1++; } ((u8*)res.data)[r_i] = 0; } string tmp_res = string_clone(tos(res.data, r_i)); array_free(&res); return tmp_res; } } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__format_fl(f64 f, strconv__BF_param p) { { // Unsafe block string fs = strconv__f64_to_str_lnd1((f >= ((f64)(0.0)) ? (f) : (-f)), p.len1); if (fs.str[ 0] == '[') { return fs; } if (p.rm_tail_zero) { string tmp = fs; fs = strconv__remove_tail_zeros(fs); string_free(&tmp); } Array_fixed_u8_32 buf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Array_fixed_u8_32 out = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int buf_i = 0; int out_i = 0; int sign_len_diff = 0; if (p.pad_ch == '0') { if (p.positive) { if (p.sign_flag) { out[out_i] = '+'; out_i++; sign_len_diff = -1; } } else { out[out_i] = '-'; out_i++; sign_len_diff = -1; } } else { if (p.positive) { if (p.sign_flag) { buf[buf_i] = '+'; buf_i++; } } else { buf[buf_i] = '-'; buf_i++; } } vmemcpy(&buf[buf_i], fs.str, fs.len); buf_i += fs.len; int dif = (int)((int)(p.len0 - buf_i) + sign_len_diff); if (p.allign == strconv__Align_text__right) { for (int i1 = 0; i1 < dif; i1++) { out[out_i] = p.pad_ch; out_i++; } } vmemcpy(&out[out_i], &buf[0], buf_i); out_i += buf_i; if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { out[out_i] = p.pad_ch; out_i++; } } out[out_i] = 0; string tmp = fs; fs = tos_clone(&out[0]); string_free(&tmp); return fs; } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__format_es(f64 f, strconv__BF_param p) { { // Unsafe block string fs = strconv__f64_to_str_pad((f > 0 ? (f) : (-f)), p.len1); if (p.rm_tail_zero) { string tmp = fs; fs = strconv__remove_tail_zeros(fs); string_free(&tmp); } Array_fixed_u8_32 buf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Array_fixed_u8_32 out = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int buf_i = 0; int out_i = 0; int sign_len_diff = 0; if (p.pad_ch == '0') { if (p.positive) { if (p.sign_flag) { out[out_i] = '+'; out_i++; sign_len_diff = -1; } } else { out[out_i] = '-'; out_i++; sign_len_diff = -1; } } else { if (p.positive) { if (p.sign_flag) { buf[buf_i] = '+'; buf_i++; } } else { buf[buf_i] = '-'; buf_i++; } } vmemcpy(&buf[buf_i], fs.str, fs.len); buf_i += fs.len; int dif = (int)((int)(p.len0 - buf_i) + sign_len_diff); if (p.allign == strconv__Align_text__right) { for (int i1 = 0; i1 < dif; i1++) { out[out_i] = p.pad_ch; out_i++; } } vmemcpy(&out[out_i], &buf[0], buf_i); out_i += buf_i; if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { out[out_i] = p.pad_ch; out_i++; } } out[out_i] = 0; string tmp = fs; fs = tos_clone(&out[0]); string_free(&tmp); return fs; } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] string strconv__remove_tail_zeros(string s) { { // Unsafe block u8* buf = malloc_noscan((int)(s.len + 1)); int i_d = 0; int i_s = 0; for (;;) { if (!(i_s < s.len && !(s.str[ i_s] == '-' || s.str[ i_s] == '+') && (s.str[ i_s] > '9' || s.str[ i_s] < '0'))) break; buf[i_d] = s.str[ i_s]; i_s++; i_d++; } if (i_s < s.len && (s.str[ i_s] == '-' || s.str[ i_s] == '+')) { buf[i_d] = s.str[ i_s]; i_s++; i_d++; } for (;;) { if (!(i_s < s.len && s.str[ i_s] >= '0' && s.str[ i_s] <= '9')) break; buf[i_d] = s.str[ i_s]; i_s++; i_d++; } if (i_s < s.len && s.str[ i_s] == '.') { int i_s1 = (int)(i_s + 1); int sum = 0; for (;;) { if (!(i_s1 < s.len && s.str[ i_s1] >= '0' && s.str[ i_s1] <= '9')) break; sum += (u8)(s.str[ i_s1] - ((u8)('0'))); i_s1++; } if (sum > 0) { for (int c_i = i_s; c_i < i_s1; ++c_i) { buf[i_d] = s.str[ c_i]; i_d++; } } i_s = i_s1; } if (i_s < s.len && s.str[ i_s] != '.') { for (;;) { buf[i_d] = s.str[ i_s]; i_s++; i_d++; if (i_s >= s.len) { break; } } } buf[i_d] = 0; return tos(buf, i_d); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [inline] inline string strconv__ftoa_64(f64 f) { return strconv__f64_to_str(f, 17); } // Attr: [inline] inline string strconv__ftoa_long_64(f64 f) { return strconv__f64_to_str_l(f); } // Attr: [inline] inline string strconv__ftoa_32(f32 f) { return strconv__f32_to_str(f, 8); } // Attr: [inline] inline string strconv__ftoa_long_32(f32 f) { return strconv__f32_to_str_l(f); } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__format_int(i64 n, int radix) { { // Unsafe block if (radix < 2 || radix > 36) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("invalid radix: "), /*100 &int*/0xfe07, {.d_i32 = radix}}, {_SLIT(" . It should be => 2 and <= 36"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } if (n == 0) { return _SLIT("0"); } i64 n_copy = n; bool have_minus = false; if (n < 0) { have_minus = true; n_copy = -n_copy; } string res = _SLIT(""); for (;;) { if (!(n_copy != 0)) break; string tmp_0 = res; int bdx = ((int)((i64)(n_copy % radix))); string tmp_1 = u8_ascii_str(_const_strconv__base_digits.str[ bdx]); res = string__plus(tmp_1, res); string_free(&tmp_0); string_free(&tmp_1); n_copy /= radix; } if (have_minus) { string final_res = string__plus(_SLIT("-"), res); string_free(&res); return final_res; } return res; } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__format_uint(u64 n, int radix) { { // Unsafe block if (radix < 2 || radix > 36) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("invalid radix: "), /*100 &int*/0xfe07, {.d_i32 = radix}}, {_SLIT(" . It should be => 2 and <= 36"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } if (n == 0U) { return _SLIT("0"); } u64 n_copy = n; string res = _SLIT(""); u64 uradix = ((u64)(radix)); for (;;) { if (!(n_copy != 0U)) break; string tmp_0 = res; string tmp_1 = u8_ascii_str(_const_strconv__base_digits.str[ (u64)(n_copy % uradix)]); res = string__plus(tmp_1, res); string_free(&tmp_0); string_free(&tmp_1); n_copy /= uradix; } return res; } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [manualfree] string strconv__f32_to_str_l(f32 f) { string s = strconv__f32_to_str(f, 6); string res = strconv__fxx_to_str_l_parse(s); string_free(&s); return res; } // Attr: [manualfree] string strconv__f32_to_str_l_with_dot(f32 f) { string s = strconv__f32_to_str(f, 6); string res = strconv__fxx_to_str_l_parse_with_dot(s); string_free(&s); return res; } // Attr: [manualfree] string strconv__f64_to_str_l(f64 f) { string s = strconv__f64_to_str(f, 18); string res = strconv__fxx_to_str_l_parse(s); string_free(&s); return res; } // Attr: [manualfree] string strconv__f64_to_str_l_with_dot(f64 f) { string s = strconv__f64_to_str(f, 18); string res = strconv__fxx_to_str_l_parse_with_dot(s); string_free(&s); return res; } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__fxx_to_str_l_parse(string s) { if (s.len > 2 && (s.str[ 0] == 'n' || s.str[ 1] == 'i')) { return string_clone(s); } bool m_sgn_flag = false; int sgn = 1; Array_fixed_u8_26 b = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int d_pos = 1; int i = 0; int i1 = 0; int exp = 0; int exp_sgn = 1; for (int _t2 = 0; _t2 < s.len; ++_t2) { u8 c = s.str[_t2]; if (c == '-') { sgn = -1; i++; } else if (c == '+') { sgn = 1; i++; } else if (c >= '0' && c <= '9') { b[i1] = c; i1++; i++; } else if (c == '.') { if (sgn > 0) { d_pos = i; } else { d_pos = (int)(i - 1); } i++; } else if (c == 'e') { i++; break; } else { return _SLIT("Float conversion error!!"); } } b[i1] = 0; if (s.str[ i] == '-') { exp_sgn = -1; i++; } else if (s.str[ i] == '+') { exp_sgn = 1; i++; } int c = i; for (;;) { if (!(c < s.len)) break; exp = (int)((int)(exp * 10) + ((int)((rune)(s.str[ c] - '0')))); c++; } Array_u8 res = __new_array_with_default((int)(exp + 32), 0, sizeof(u8), &(u8[]){0}); int r_i = 0; if (sgn == 1) { if (m_sgn_flag) { ((u8*)res.data)[r_i] = '+'; r_i++; } } else { ((u8*)res.data)[r_i] = '-'; r_i++; } i = 0; if (exp_sgn >= 0) { for (;;) { if (!(b[i] != 0)) break; ((u8*)res.data)[r_i] = b[i]; r_i++; i++; if (i >= d_pos && exp >= 0) { if (exp == 0) { ((u8*)res.data)[r_i] = '.'; r_i++; } exp--; } } for (;;) { if (!(exp >= 0)) break; ((u8*)res.data)[r_i] = '0'; r_i++; exp--; } } else { bool dot_p = true; for (;;) { if (!(exp > 0)) break; ((u8*)res.data)[r_i] = '0'; r_i++; exp--; if (dot_p) { ((u8*)res.data)[r_i] = '.'; r_i++; dot_p = false; } } for (;;) { if (!(b[i] != 0)) break; ((u8*)res.data)[r_i] = b[i]; r_i++; i++; } } if (r_i > 1 && ((u8*)res.data)[(int)(r_i - 1)] == '.') { ((u8*)res.data)[r_i] = '0'; r_i++; } else if (!Array_u8_contains(res, '.')) { ((u8*)res.data)[r_i] = '.'; r_i++; ((u8*)res.data)[r_i] = '0'; r_i++; } ((u8*)res.data)[r_i] = 0; return tos(res.data, r_i); } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__fxx_to_str_l_parse_with_dot(string s) { if (s.len > 2 && (s.str[ 0] == 'n' || s.str[ 1] == 'i')) { return string_clone(s); } bool m_sgn_flag = false; int sgn = 1; Array_fixed_u8_26 b = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int d_pos = 1; int i = 0; int i1 = 0; int exp = 0; int exp_sgn = 1; for (int _t2 = 0; _t2 < s.len; ++_t2) { u8 c = s.str[_t2]; if (c == '-') { sgn = -1; i++; } else if (c == '+') { sgn = 1; i++; } else if (c >= '0' && c <= '9') { b[i1] = c; i1++; i++; } else if (c == '.') { if (sgn > 0) { d_pos = i; } else { d_pos = (int)(i - 1); } i++; } else if (c == 'e') { i++; break; } else { return _SLIT("Float conversion error!!"); } } b[i1] = 0; if (s.str[ i] == '-') { exp_sgn = -1; i++; } else if (s.str[ i] == '+') { exp_sgn = 1; i++; } int c = i; for (;;) { if (!(c < s.len)) break; exp = (int)((int)(exp * 10) + ((int)((rune)(s.str[ c] - '0')))); c++; } Array_u8 res = __new_array_with_default((int)(exp + 32), 0, sizeof(u8), &(u8[]){0}); int r_i = 0; if (sgn == 1) { if (m_sgn_flag) { ((u8*)res.data)[r_i] = '+'; r_i++; } } else { ((u8*)res.data)[r_i] = '-'; r_i++; } i = 0; if (exp_sgn >= 0) { for (;;) { if (!(b[i] != 0)) break; ((u8*)res.data)[r_i] = b[i]; r_i++; i++; if (i >= d_pos && exp >= 0) { if (exp == 0) { ((u8*)res.data)[r_i] = '.'; r_i++; } exp--; } } for (;;) { if (!(exp >= 0)) break; ((u8*)res.data)[r_i] = '0'; r_i++; exp--; } } else { bool dot_p = true; for (;;) { if (!(exp > 0)) break; ((u8*)res.data)[r_i] = '0'; r_i++; exp--; if (dot_p) { ((u8*)res.data)[r_i] = '.'; r_i++; dot_p = false; } } for (;;) { if (!(b[i] != 0)) break; ((u8*)res.data)[r_i] = b[i]; r_i++; i++; } } if (r_i > 1 && ((u8*)res.data)[(int)(r_i - 1)] == '.') { ((u8*)res.data)[r_i] = '0'; r_i++; } else if (!Array_u8_contains(res, '.')) { ((u8*)res.data)[r_i] = '.'; r_i++; ((u8*)res.data)[r_i] = '0'; r_i++; } ((u8*)res.data)[r_i] = 0; return tos(res.data, r_i); } // Attr: [inline] inline VV_LOCAL_SYMBOL int strconv__bool_to_int(bool b) { if (b) { return 1; } return 0; } // Attr: [inline] inline VV_LOCAL_SYMBOL u32 strconv__bool_to_u32(bool b) { if (b) { return ((u32)(1U)); } return ((u32)(0U)); } // Attr: [inline] inline VV_LOCAL_SYMBOL u64 strconv__bool_to_u64(bool b) { if (b) { return ((u64)(1U)); } return ((u64)(0U)); } VV_LOCAL_SYMBOL string strconv__get_string_special(bool neg, bool expZero, bool mantZero) { if (!mantZero) { return _SLIT("nan"); } if (!expZero) { if (neg) { return _SLIT("-inf"); } else { return _SLIT("+inf"); } } if (neg) { return _SLIT("-0e+00"); } return _SLIT("0e+00"); } VV_LOCAL_SYMBOL u32 strconv__mul_shift_32(u32 m, u64 mul, int ishift) { multi_return_u64_u64 mr_746 = math__bits__mul_64(((u64)(m)), mul); u64 hi = mr_746.arg0; u64 lo = mr_746.arg1; u64 shifted_sum = (u64)(((lo >> ((u64)(ishift)))) + ((hi << ((u64)((int)(64 - ishift)))))); ; return ((u32)(shifted_sum)); } VV_LOCAL_SYMBOL u32 strconv__mul_pow5_invdiv_pow2(u32 m, u32 q, int j) { return strconv__mul_shift_32(m, _const_strconv__pow5_inv_split_32[v_fixed_index(q, 31)], j); } VV_LOCAL_SYMBOL u32 strconv__mul_pow5_div_pow2(u32 m, u32 i, int j) { return strconv__mul_shift_32(m, _const_strconv__pow5_split_32[v_fixed_index(i, 47)], j); } VV_LOCAL_SYMBOL u32 strconv__pow5_factor_32(u32 i_v) { u32 v = i_v; for (u32 n = ((u32)(0U)); true; n++) { u32 q = (u32)(v / 5U); u32 r = (u32)(v % 5U); if (r != 0U) { return n; } v = q; } return v; } VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_five_32(u32 v, u32 p) { return strconv__pow5_factor_32(v) >= p; } VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_two_32(u32 v, u32 p) { return ((u32)(math__bits__trailing_zeros_32(v))) >= p; } VV_LOCAL_SYMBOL u32 strconv__log10_pow2(int e) { ; ; return (((u32)(((u32)(e)) * 78913U)) >> 18U); } VV_LOCAL_SYMBOL u32 strconv__log10_pow5(int e) { ; ; return (((u32)(((u32)(e)) * 732923U)) >> 20U); } VV_LOCAL_SYMBOL int strconv__pow5_bits(int e) { ; ; return ((int)((u32)(((((u32)(((u32)(e)) * 1217359U)) >> 19U)) + 1U))); } VV_LOCAL_SYMBOL u64 strconv__shift_right_128(strconv__Uint128 v, int shift) { ; return (((v.hi << ((u64)((int)(64 - shift))))) | ((v.lo >> ((u32)(shift))))); } VV_LOCAL_SYMBOL u64 strconv__mul_shift_64(u64 m, strconv__Uint128 mul, int shift) { multi_return_u64_u64 mr_3065 = math__bits__mul_64(m, mul.hi); u64 hihi = mr_3065.arg0; u64 hilo = mr_3065.arg1; multi_return_u64_u64 mr_3100 = math__bits__mul_64(m, mul.lo); u64 lohi = mr_3100.arg0; strconv__Uint128 sum = ((strconv__Uint128){.lo = (u64)(lohi + hilo),.hi = hihi,}); if (sum.lo < lohi) { sum.hi++; } return strconv__shift_right_128(sum, (int)(shift - 64)); } VV_LOCAL_SYMBOL u32 strconv__pow5_factor_64(u64 v_i) { u64 v = v_i; for (u32 n = ((u32)(0U)); true; n++) { u64 q = (u64)(v / 5U); u64 r = (u64)(v % 5U); if (r != 0U) { return n; } v = q; } return ((u32)(0U)); } VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_five_64(u64 v, u32 p) { return strconv__pow5_factor_64(v) >= p; } VV_LOCAL_SYMBOL bool strconv__multiple_of_power_of_two_64(u64 v, u32 p) { return ((u32)(math__bits__trailing_zeros_64(v))) >= p; } int strconv__dec_digits(u64 n) { if (n <= 9999999999U) { if (n <= 99999U) { if (n <= 99U) { if (n <= 9U) { return 1; } else { return 2; } } else { if (n <= 999U) { return 3; } else { if (n <= 9999U) { return 4; } else { return 5; } } } } else { if (n <= 9999999U) { if (n <= 999999U) { return 6; } else { return 7; } } else { if (n <= 99999999U) { return 8; } else { if (n <= 999999999U) { return 9; } return 10; } } } } else { if (n <= 999999999999999U) { if (n <= 999999999999U) { if (n <= 99999999999U) { return 11; } else { return 12; } } else { if (n <= 9999999999999U) { return 13; } else { if (n <= 99999999999999U) { return 14; } else { return 15; } } } } else { if (n <= 99999999999999999U) { if (n <= 9999999999999999U) { return 16; } else { return 17; } } else { if (n <= 999999999999999999U) { return 18; } else { if (n <= 9999999999999999999U) { return 19; } return 20; } } } } return 0; } // Attr: [unsafe] void strconv__v_printf(string str, Array_voidptr pt) { print(strconv__v_sprintf(str, pt)); } // Attr: [direct_array_access] // Attr: [manualfree] // Attr: [unsafe] string strconv__v_sprintf(string str, Array_voidptr pt) { bool strconv__v_sprintf_defer_0 = false; strings__Builder res; res = strings__new_builder((int)(pt.len * 16)); strconv__v_sprintf_defer_0 = true; int i = 0; int p_index = 0; bool sign = false; strconv__Align_text allign = strconv__Align_text__right; int len0 = -1; int len1 = -1; int def_len1 = 6; u8 pad_ch = ((u8)(' ')); rune ch1 = '0'; rune ch2 = '0'; strconv__Char_parse_state status = strconv__Char_parse_state__norm_char; for (;;) { if (!(i < str.len)) break; if (status == strconv__Char_parse_state__reset_params) { sign = false; allign = strconv__Align_text__right; len0 = -1; len1 = -1; pad_ch = ' '; status = strconv__Char_parse_state__norm_char; ch1 = '0'; ch2 = '0'; continue; } u8 ch = str.str[ i]; if (ch != '%' && status == strconv__Char_parse_state__norm_char) { strings__Builder_write_u8(&res, ch); i++; continue; } if (ch == '%' && status == strconv__Char_parse_state__field_char) { status = strconv__Char_parse_state__norm_char; strings__Builder_write_u8(&res, ch); i++; continue; } if (ch == '%' && status == strconv__Char_parse_state__norm_char) { status = strconv__Char_parse_state__field_char; i++; continue; } if (ch == 'c' && status == strconv__Char_parse_state__field_char) { strconv__v_sprintf_panic(p_index, pt.len); u8 d1 = *(((u8*)(((voidptr*)pt.data)[p_index]))); strings__Builder_write_u8(&res, d1); status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } if (ch == 'p' && status == strconv__Char_parse_state__field_char) { strconv__v_sprintf_panic(p_index, pt.len); strings__Builder_write_string(&res, _SLIT("0x")); strings__Builder_write_string(&res, ptr_str(((voidptr*)pt.data)[p_index])); status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } if (status == strconv__Char_parse_state__field_char) { rune fc_ch1 = '0'; rune fc_ch2 = '0'; if (((int)(i + 1)) < str.len) { fc_ch1 = str.str[ (int)(i + 1)]; if (((int)(i + 2)) < str.len) { fc_ch2 = str.str[ (int)(i + 2)]; } } if (ch == '+') { sign = true; i++; continue; } else if (ch == '-') { allign = strconv__Align_text__left; i++; continue; } else if (ch == '0' || ch == ' ') { if (allign == strconv__Align_text__right) { pad_ch = ch; } i++; continue; } else if (ch == '\'') { i++; continue; } else if (ch == '.' && fc_ch1 >= '1' && fc_ch1 <= '9') { status = strconv__Char_parse_state__check_float; i++; continue; } else if (ch == '.' && fc_ch1 == '*' && fc_ch2 == 's') { strconv__v_sprintf_panic(p_index, pt.len); int len = *(((int*)(((voidptr*)pt.data)[p_index]))); p_index++; strconv__v_sprintf_panic(p_index, pt.len); string s = *(((string*)(((voidptr*)pt.data)[p_index]))); s = string_substr(s, 0, len); p_index++; strings__Builder_write_string(&res, s); status = strconv__Char_parse_state__reset_params; i += 3; continue; } status = strconv__Char_parse_state__len_set_start; continue; } if (status == strconv__Char_parse_state__len_set_start) { if (ch >= '1' && ch <= '9') { len0 = ((int)((rune)(ch - '0'))); status = strconv__Char_parse_state__len_set_in; i++; continue; } if (ch == '.') { status = strconv__Char_parse_state__check_float; i++; continue; } status = strconv__Char_parse_state__check_type; continue; } if (status == strconv__Char_parse_state__len_set_in) { if (ch >= '0' && ch <= '9') { len0 *= 10; len0 += ((int)((rune)(ch - '0'))); i++; continue; } if (ch == '.') { status = strconv__Char_parse_state__check_float; i++; continue; } status = strconv__Char_parse_state__check_type; continue; } if (status == strconv__Char_parse_state__check_float) { if (ch >= '0' && ch <= '9') { len1 = ((int)((rune)(ch - '0'))); status = strconv__Char_parse_state__check_float_in; i++; continue; } status = strconv__Char_parse_state__check_type; continue; } if (status == strconv__Char_parse_state__check_float_in) { if (ch >= '0' && ch <= '9') { len1 *= 10; len1 += ((int)((rune)(ch - '0'))); i++; continue; } status = strconv__Char_parse_state__check_type; continue; } if (status == strconv__Char_parse_state__check_type) { if (ch == 'l') { if (ch1 == '0') { ch1 = 'l'; i++; continue; } else { ch2 = 'l'; i++; continue; } } else if (ch == 'h') { if (ch1 == '0') { ch1 = 'h'; i++; continue; } else { ch2 = 'h'; i++; continue; } } else if (ch == 'd' || ch == 'i') { u64 d1 = ((u64)(0U)); bool positive = true; if (ch1 == ('h')) { if (ch2 == 'h') { strconv__v_sprintf_panic(p_index, pt.len); i8 x = *(((i8*)(((voidptr*)pt.data)[p_index]))); positive = (x >= 0 ? (true) : (false)); d1 = (positive ? (((u64)(x))) : (((u64)(-x)))); } else { i16 x = *(((i16*)(((voidptr*)pt.data)[p_index]))); positive = (x >= 0 ? (true) : (false)); d1 = (positive ? (((u64)(x))) : (((u64)(-x)))); } } else if (ch1 == ('l')) { strconv__v_sprintf_panic(p_index, pt.len); i64 x = *(((i64*)(((voidptr*)pt.data)[p_index]))); positive = (x >= 0 ? (true) : (false)); d1 = (positive ? (((u64)(x))) : (((u64)(-x)))); } else { strconv__v_sprintf_panic(p_index, pt.len); int x = *(((int*)(((voidptr*)pt.data)[p_index]))); positive = (x >= 0 ? (true) : (false)); d1 = (positive ? (((u64)(x))) : (((u64)(-x)))); } string tmp = strconv__format_dec_old(d1, ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = 0, .positive = positive, .sign_flag = sign, .allign = allign, .rm_tail_zero = 0, })); strings__Builder_write_string(&res, tmp); string_free(&tmp); status = strconv__Char_parse_state__reset_params; p_index++; i++; ch1 = '0'; ch2 = '0'; continue; } else if (ch == 'u') { u64 d1 = ((u64)(0U)); bool positive = true; strconv__v_sprintf_panic(p_index, pt.len); if (ch1 == ('h')) { if (ch2 == 'h') { d1 = ((u64)(*(((u8*)(((voidptr*)pt.data)[p_index]))))); } else { d1 = ((u64)(*(((u16*)(((voidptr*)pt.data)[p_index]))))); } } else if (ch1 == ('l')) { d1 = ((u64)(*(((u64*)(((voidptr*)pt.data)[p_index]))))); } else { d1 = ((u64)(*(((u32*)(((voidptr*)pt.data)[p_index]))))); } string tmp = strconv__format_dec_old(d1, ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = 0, .positive = positive, .sign_flag = sign, .allign = allign, .rm_tail_zero = 0, })); strings__Builder_write_string(&res, tmp); string_free(&tmp); status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } else if (ch == 'x' || ch == 'X') { strconv__v_sprintf_panic(p_index, pt.len); string s = _SLIT(""); if (ch1 == ('h')) { if (ch2 == 'h') { i8 x = *(((i8*)(((voidptr*)pt.data)[p_index]))); s = i8_hex(x); } else { i16 x = *(((i16*)(((voidptr*)pt.data)[p_index]))); s = i16_hex(x); } } else if (ch1 == ('l')) { i64 x = *(((i64*)(((voidptr*)pt.data)[p_index]))); s = i64_hex(x); } else { int x = *(((int*)(((voidptr*)pt.data)[p_index]))); s = int_hex(x); } if (ch == 'X') { string tmp = s; s = string_to_upper(s); string_free(&tmp); } string tmp = strconv__format_str(s, ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = 0, .positive = true, .sign_flag = false, .allign = allign, .rm_tail_zero = 0, })); strings__Builder_write_string(&res, tmp); string_free(&tmp); string_free(&s); status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } if (ch == 'f' || ch == 'F') { #if !defined(CUSTOM_DEFINE_nofloat) { strconv__v_sprintf_panic(p_index, pt.len); f64 x = *(((f64*)(((voidptr*)pt.data)[p_index]))); bool positive = x >= ((f64)(0.0)); len1 = (len1 >= 0 ? (len1) : (def_len1)); string s = strconv__format_fl_old(((f64)(x)), ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = len1, .positive = positive, .sign_flag = sign, .allign = allign, .rm_tail_zero = 0, })); if (ch == 'F') { string tmp = string_to_upper(s); strings__Builder_write_string(&res, tmp); string_free(&tmp); } else { strings__Builder_write_string(&res, s); } string_free(&s); } #endif status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } else if (ch == 'e' || ch == 'E') { #if !defined(CUSTOM_DEFINE_nofloat) { strconv__v_sprintf_panic(p_index, pt.len); f64 x = *(((f64*)(((voidptr*)pt.data)[p_index]))); bool positive = x >= ((f64)(0.0)); len1 = (len1 >= 0 ? (len1) : (def_len1)); string s = strconv__format_es_old(((f64)(x)), ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = len1, .positive = positive, .sign_flag = sign, .allign = allign, .rm_tail_zero = 0, })); if (ch == 'E') { string tmp = string_to_upper(s); strings__Builder_write_string(&res, tmp); string_free(&tmp); } else { strings__Builder_write_string(&res, s); } string_free(&s); } #endif status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } else if (ch == 'g' || ch == 'G') { #if !defined(CUSTOM_DEFINE_nofloat) { strconv__v_sprintf_panic(p_index, pt.len); f64 x = *(((f64*)(((voidptr*)pt.data)[p_index]))); bool positive = x >= ((f64)(0.0)); string s = _SLIT(""); f64 tx = strconv__fabs(x); if (tx < ((f64)(999999.0)) && tx >= ((f64)(0.00001))) { len1 = (len1 >= 0 ? ((int)(len1 + 1)) : (def_len1)); string tmp = s; s = strconv__format_fl_old(x, ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = len1, .positive = positive, .sign_flag = sign, .allign = allign, .rm_tail_zero = true, })); string_free(&tmp); } else { len1 = (len1 >= 0 ? ((int)(len1 + 1)) : (def_len1)); string tmp = s; s = strconv__format_es_old(x, ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = len1, .positive = positive, .sign_flag = sign, .allign = allign, .rm_tail_zero = true, })); string_free(&tmp); } if (ch == 'G') { string tmp = string_to_upper(s); strings__Builder_write_string(&res, tmp); string_free(&tmp); } else { strings__Builder_write_string(&res, s); } string_free(&s); } #endif status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } else if (ch == 's') { strconv__v_sprintf_panic(p_index, pt.len); string s1 = *(((string*)(((voidptr*)pt.data)[p_index]))); pad_ch = ' '; string tmp = strconv__format_str(s1, ((strconv__BF_param){ .pad_ch = pad_ch, .len0 = len0, .len1 = 0, .positive = true, .sign_flag = false, .allign = allign, .rm_tail_zero = 0, })); strings__Builder_write_string(&res, tmp); string_free(&tmp); status = strconv__Char_parse_state__reset_params; p_index++; i++; continue; } } status = strconv__Char_parse_state__reset_params; p_index++; i++; } if (p_index != pt.len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT0, /*100 &int*/0xfe07, {.d_i32 = p_index}}, {_SLIT(" % conversion specifiers, but given "), /*100 &int*/0xfe07, {.d_i32 = pt.len}}, {_SLIT(" args"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } string _t4 = strings__Builder_str(&res); // Defer begin if (strconv__v_sprintf_defer_0) { strings__Builder_free(&res); } // Defer end return _t4; } // Attr: [inline] inline VV_LOCAL_SYMBOL void strconv__v_sprintf_panic(int idx, int len) { if (idx >= len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT0, /*100 &int*/0xfe07, {.d_i32 = (int)(idx + 1)}}, {_SLIT(" % conversion specifiers, but given only "), /*100 &int*/0xfe07, {.d_i32 = len}}, {_SLIT(" args"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } VV_LOCAL_SYMBOL f64 strconv__fabs(f64 x) { if (x < ((f64)(0.0))) { return -x; } return x; } // Attr: [direct_array_access] // Attr: [manualfree] string strconv__format_fl_old(f64 f, strconv__BF_param p) { bool strconv__format_fl_old_defer_0 = false; strings__Builder res; { // Unsafe block string s = _SLIT(""); string fs = strconv__f64_to_str_lnd1((f >= ((f64)(0.0)) ? (f) : (-f)), p.len1); if (fs.str[ 0] == '[') { string_free(&s); return fs; } if (p.rm_tail_zero) { string tmp = fs; fs = strconv__remove_tail_zeros_old(fs); string_free(&tmp); } res = strings__new_builder((p.len0 > fs.len ? (p.len0) : (fs.len))); strconv__format_fl_old_defer_0 = true; int sign_len_diff = 0; if (p.pad_ch == '0') { if (p.positive) { if (p.sign_flag) { strings__Builder_write_u8(&res, '+'); sign_len_diff = -1; } } else { strings__Builder_write_u8(&res, '-'); sign_len_diff = -1; } string tmp = s; s = string_clone(fs); string_free(&tmp); } else { if (p.positive) { if (p.sign_flag) { string tmp = s; s = string__plus(_SLIT("+"), fs); string_free(&tmp); } else { string tmp = s; s = string_clone(fs); string_free(&tmp); } } else { string tmp = s; s = string__plus(_SLIT("-"), fs); string_free(&tmp); } } int dif = (int)((int)(p.len0 - s.len) + sign_len_diff); if (p.allign == strconv__Align_text__right) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } strings__Builder_write_string(&res, s); if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } string_free(&s); string_free(&fs); string _t2 = strings__Builder_str(&res); // Defer begin if (strconv__format_fl_old_defer_0) { strings__Builder_free(&res); } // Defer end return _t2; } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [manualfree] VV_LOCAL_SYMBOL string strconv__format_es_old(f64 f, strconv__BF_param p) { bool strconv__format_es_old_defer_0 = false; strings__Builder res; string fs; string s; { // Unsafe block s = _SLIT(""); fs = strconv__f64_to_str_pad((f > 0 ? (f) : (-f)), p.len1); if (p.rm_tail_zero) { string tmp = fs; fs = strconv__remove_tail_zeros_old(fs); string_free(&tmp); } res = strings__new_builder((p.len0 > fs.len ? (p.len0) : (fs.len))); strconv__format_es_old_defer_0 = true; int sign_len_diff = 0; if (p.pad_ch == '0') { if (p.positive) { if (p.sign_flag) { strings__Builder_write_u8(&res, '+'); sign_len_diff = -1; } } else { strings__Builder_write_u8(&res, '-'); sign_len_diff = -1; } string tmp = s; s = string_clone(fs); string_free(&tmp); } else { if (p.positive) { if (p.sign_flag) { string tmp = s; s = string__plus(_SLIT("+"), fs); string_free(&tmp); } else { string tmp = s; s = string_clone(fs); string_free(&tmp); } } else { string tmp = s; s = string__plus(_SLIT("-"), fs); string_free(&tmp); } } int dif = (int)((int)(p.len0 - s.len) + sign_len_diff); if (p.allign == strconv__Align_text__right) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } strings__Builder_write_string(&res, s); if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } string _t1 = strings__Builder_str(&res); // Defer begin if (strconv__format_es_old_defer_0) { strings__Builder_free(&res); string_free(&fs); string_free(&s); } // Defer end return _t1; } return (string){.str=(byteptr)"", .is_lit=1}; } VV_LOCAL_SYMBOL string strconv__remove_tail_zeros_old(string s) { int i = 0; int last_zero_start = -1; int dot_pos = -1; bool in_decimal = false; u8 prev_ch = ((u8)(0)); for (;;) { if (!(i < s.len)) break; u8 ch = s.str[i]; if (ch == '.') { in_decimal = true; dot_pos = i; } else if (in_decimal) { if (ch == '0' && prev_ch != '0') { last_zero_start = i; } else if (ch >= '1' && ch <= '9') { last_zero_start = -1; } else if (ch == 'e') { break; } } prev_ch = ch; i++; } string tmp = _SLIT(""); if (last_zero_start > 0) { if (last_zero_start == (int)(dot_pos + 1)) { tmp = string__plus(string_substr(s, 0, dot_pos), string_substr(s, i, (s).len)); } else { tmp = string__plus(string_substr(s, 0, last_zero_start), string_substr(s, i, (s).len)); } } else { tmp = string_clone(s); } if (tmp.str[(int)(tmp.len - 1)] == '.') { return string_substr(tmp, 0, (int)(tmp.len - 1)); } return tmp; } // Attr: [manualfree] string strconv__format_dec_old(u64 d, strconv__BF_param p) { bool strconv__format_dec_old_defer_0 = false; strings__Builder res; string s; s = _SLIT(""); res = strings__new_builder(20); strconv__format_dec_old_defer_0 = true; int sign_len_diff = 0; if (p.pad_ch == '0') { if (p.positive) { if (p.sign_flag) { strings__Builder_write_u8(&res, '+'); sign_len_diff = -1; } } else { strings__Builder_write_u8(&res, '-'); sign_len_diff = -1; } string tmp = s; s = u64_str(d); string_free(&tmp); } else { if (p.positive) { if (p.sign_flag) { string tmp = s; s = string__plus(_SLIT("+"), u64_str(d)); string_free(&tmp); } else { string tmp = s; s = u64_str(d); string_free(&tmp); } } else { string tmp = s; s = string__plus(_SLIT("-"), u64_str(d)); string_free(&tmp); } } int dif = (int)((int)(p.len0 - s.len) + sign_len_diff); if (p.allign == strconv__Align_text__right) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } strings__Builder_write_string(&res, s); if (p.allign == strconv__Align_text__left) { for (int i1 = 0; i1 < dif; i1++) { strings__Builder_write_u8(&res, p.pad_ch); } } string _t1 = strings__Builder_str(&res); // Defer begin if (strconv__format_dec_old_defer_0) { strings__Builder_free(&res); string_free(&s); } // Defer end return _t1; } VV_LOCAL_SYMBOL array __new_array(int mylen, int cap, int elm_size) { int cap_ = (cap < mylen ? (mylen) : (cap)); array arr = ((array){.data = vcalloc((u64)(((u64)(cap_)) * ((u64)(elm_size)))),.offset = 0,.len = mylen,.cap = cap_,.flags = 0,.element_size = elm_size,}); return arr; } VV_LOCAL_SYMBOL array __new_array_with_default(int mylen, int cap, int elm_size, voidptr val) { int cap_ = (cap < mylen ? (mylen) : (cap)); array arr = ((array){.data = 0,.offset = 0,.len = mylen,.cap = cap_,.flags = 0,.element_size = elm_size,}); u64 total_size = (u64)(((u64)(cap_)) * ((u64)(elm_size))); if (cap_ > 0 && mylen == 0) { arr.data = _v_malloc(__at_least_one(total_size)); } else { arr.data = vcalloc(total_size); } if (val != 0) { u8* eptr = ((u8*)(arr.data)); { // Unsafe block if (eptr != ((void*)0)) { if (arr.element_size == 1) { u8 byte_value = *(((u8*)(val))); for (int i = 0; i < arr.len; ++i) { eptr[i] = byte_value; } } else { for (int _t1 = 0; _t1 < arr.len; ++_t1) { vmemcpy(eptr, val, arr.element_size); eptr += arr.element_size; } } } } } return arr; } VV_LOCAL_SYMBOL array __new_array_with_multi_default(int mylen, int cap, int elm_size, voidptr val) { int cap_ = (cap < mylen ? (mylen) : (cap)); array arr = ((array){.data = 0,.offset = 0,.len = mylen,.cap = cap_,.flags = 0,.element_size = elm_size,}); u64 total_size = (u64)(((u64)(cap_)) * ((u64)(elm_size))); arr.data = vcalloc(__at_least_one(total_size)); if (val != 0) { u8* eptr = ((u8*)(arr.data)); { // Unsafe block if (eptr != ((void*)0)) { for (int i = 0; i < arr.len; ++i) { vmemcpy(eptr, ((charptr)(val)) + (int)(i * arr.element_size), arr.element_size); eptr += arr.element_size; } } } } return arr; } VV_LOCAL_SYMBOL array __new_array_with_array_default(int mylen, int cap, int elm_size, array val, int depth) { int cap_ = (cap < mylen ? (mylen) : (cap)); array arr = ((array){.data = _v_malloc(__at_least_one((u64)(((u64)(cap_)) * ((u64)(elm_size))))),.offset = 0,.len = mylen,.cap = cap_,.flags = 0,.element_size = elm_size,}); u8* eptr = ((u8*)(arr.data)); { // Unsafe block if (eptr != ((void*)0)) { for (int _t1 = 0; _t1 < arr.len; ++_t1) { array val_clone = array_clone_to_depth(&val, depth); vmemcpy(eptr, &val_clone, arr.element_size); eptr += arr.element_size; } } } return arr; } VV_LOCAL_SYMBOL array __new_array_with_map_default(int mylen, int cap, int elm_size, map val) { int cap_ = (cap < mylen ? (mylen) : (cap)); array arr = ((array){.data = _v_malloc(__at_least_one((u64)(((u64)(cap_)) * ((u64)(elm_size))))),.offset = 0,.len = mylen,.cap = cap_,.flags = 0,.element_size = elm_size,}); u8* eptr = ((u8*)(arr.data)); { // Unsafe block if (eptr != ((void*)0)) { for (int _t1 = 0; _t1 < arr.len; ++_t1) { map val_clone = map_clone(&val); vmemcpy(eptr, &val_clone, arr.element_size); eptr += arr.element_size; } } } return arr; } VV_LOCAL_SYMBOL array new_array_from_c_array(int len, int cap, int elm_size, voidptr c_array) { int cap_ = (cap < len ? (len) : (cap)); array arr = ((array){.data = vcalloc((u64)(((u64)(cap_)) * ((u64)(elm_size)))),.offset = 0,.len = len,.cap = cap_,.flags = 0,.element_size = elm_size,}); vmemcpy(arr.data, c_array, (u64)(((u64)(len)) * ((u64)(elm_size)))); return arr; } VV_LOCAL_SYMBOL array new_array_from_c_array_no_alloc(int len, int cap, int elm_size, voidptr c_array) { array arr = ((array){.data = c_array,.offset = 0,.len = len,.cap = cap,.flags = 0,.element_size = elm_size,}); return arr; } VV_LOCAL_SYMBOL void array_ensure_cap(array* a, int required) { if (required <= a->cap) { return; } if (ArrayFlags_has(&a->flags, ArrayFlags__nogrow)) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("array.ensure_cap: array with the flag `.nogrow` cannot grow in size, array required new size: "), /*100 &int*/0xfe07, {.d_i32 = required}}, {_SLIT0, 0, { .d_c = 0 }}}))); VUNREACHABLE(); } int cap = (a->cap > 0 ? (a->cap) : (2)); for (;;) { if (!(required > cap)) break; cap *= 2; } u64 new_size = (u64)(((u64)(cap)) * ((u64)(a->element_size))); u8* new_data = _v_malloc(__at_least_one(new_size)); if (a->data != ((void*)0)) { vmemcpy(new_data, a->data, (u64)(((u64)(a->len)) * ((u64)(a->element_size)))); if (ArrayFlags_has(&a->flags, ArrayFlags__noslices)) { _v_free(a->data); } } a->data = new_data; a->offset = 0; a->cap = cap; } array array_repeat(array a, int count) { return array_repeat_to_depth(a, count, 0); } // Attr: [direct_array_access] // Attr: [unsafe] array array_repeat_to_depth(array a, int count, int depth) { if (count < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("array.repeat: count is negative: "), /*100 &int*/0xfe07, {.d_i32 = count}}, {_SLIT0, 0, { .d_c = 0 }}}))); VUNREACHABLE(); } u64 size = (u64)((u64)(((u64)(count)) * ((u64)(a.len))) * ((u64)(a.element_size))); if (size == 0U) { size = ((u64)(a.element_size)); } array arr = ((array){.data = vcalloc(size),.offset = 0,.len = (int)(count * a.len),.cap = (int)(count * a.len),.flags = 0,.element_size = a.element_size,}); if (a.len > 0) { u64 a_total_size = (u64)(((u64)(a.len)) * ((u64)(a.element_size))); u64 arr_step_size = (u64)(((u64)(a.len)) * ((u64)(arr.element_size))); u8* eptr = ((u8*)(arr.data)); { // Unsafe block if (eptr != ((void*)0)) { for (int _t1 = 0; _t1 < count; ++_t1) { if (depth > 0) { array ary_clone = array_clone_to_depth(&a, depth); vmemcpy(eptr, ((u8*)(ary_clone.data)), a_total_size); } else { vmemcpy(eptr, ((u8*)(a.data)), a_total_size); } eptr += arr_step_size; } } } } return arr; } void array_insert(array* a, int i, voidptr val) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (i < 0 || i > a->len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("array.insert: index out of range (i == "), /*100 &int*/0xfe07, {.d_i32 = i}}, {_SLIT(", a.len == "), /*100 &int*/0xfe07, {.d_i32 = a->len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif if (a->len >= a->cap) { array_ensure_cap(a, (int)(a->len + 1)); } { // Unsafe block vmemmove(array_get_unsafe(/*rec*/*a, (int)(i + 1)), array_get_unsafe(/*rec*/*a, i), (u64)(((u64)(((int)(a->len - i)))) * ((u64)(a->element_size)))); array_set_unsafe(a, i, val); } a->len++; } // Attr: [unsafe] VV_LOCAL_SYMBOL void array_insert_many(array* a, int i, voidptr val, int size) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (i < 0 || i > a->len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("array.insert_many: index out of range (i == "), /*100 &int*/0xfe07, {.d_i32 = i}}, {_SLIT(", a.len == "), /*100 &int*/0xfe07, {.d_i32 = a->len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif array_ensure_cap(a, (int)(a->len + size)); int elem_size = a->element_size; { // Unsafe block voidptr iptr = array_get_unsafe(/*rec*/*a, i); vmemmove(array_get_unsafe(/*rec*/*a, (int)(i + size)), iptr, (u64)(((u64)((int)(a->len - i))) * ((u64)(elem_size)))); vmemcpy(iptr, val, (u64)(((u64)(size)) * ((u64)(elem_size)))); } a->len += size; } void array_prepend(array* a, voidptr val) { array_insert(a, 0, val); } // Attr: [unsafe] VV_LOCAL_SYMBOL void array_prepend_many(array* a, voidptr val, int size) { array_insert_many(a, 0, val, size); } void array_delete(array* a, int i) { array_delete_many(a, i, 1); } void array_delete_many(array* a, int i, int size) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (i < 0 || (int)(i + size) > a->len) { string endidx = (size > 1 ? ( str_intp(2, _MOV((StrIntpData[]){{_SLIT(".."), /*100 &int*/0xfe07, {.d_i32 = (int)(i + size)}}, {_SLIT0, 0, { .d_c = 0 }}}))) : (_SLIT(""))); _v_panic( str_intp(4, _MOV((StrIntpData[]){{_SLIT("array.delete: index out of range (i == "), /*100 &int*/0xfe07, {.d_i32 = i}}, {_SLIT0, /*115 &string*/0xfe10, {.d_s = endidx}}, {_SLIT(", a.len == "), /*100 &int*/0xfe07, {.d_i32 = a->len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif if (ArrayFlags_all(&a->flags, (ArrayFlags__noshrink | ArrayFlags__noslices))) { vmemmove(((u8*)(a->data)) + (u64)(((u64)(i)) * ((u64)(a->element_size))), ((u8*)(a->data)) + (u64)(((u64)((int)(i + size))) * ((u64)(a->element_size))), (u64)(((u64)((int)((int)(a->len - i) - size))) * ((u64)(a->element_size)))); a->len -= size; return; } voidptr old_data = a->data; int new_size = (int)(a->len - size); int new_cap = (new_size == 0 ? (1) : (new_size)); a->data = vcalloc((u64)(((u64)(new_cap)) * ((u64)(a->element_size)))); vmemcpy(a->data, old_data, (u64)(((u64)(i)) * ((u64)(a->element_size)))); vmemcpy(((u8*)(a->data)) + (u64)(((u64)(i)) * ((u64)(a->element_size))), ((u8*)(old_data)) + (u64)(((u64)((int)(i + size))) * ((u64)(a->element_size))), (u64)(((u64)((int)((int)(a->len - i) - size))) * ((u64)(a->element_size)))); if (ArrayFlags_has(&a->flags, ArrayFlags__noslices)) { _v_free(old_data); } a->len = new_size; a->cap = new_cap; } void array_clear(array* a) { a->len = 0; } void array_trim(array* a, int index) { if (index < a->len) { a->len = index; } } void array_drop(array* a, int num) { if (num <= 0) { return; } int n = (num <= a->len ? (num) : (a->len)); u64 blen = (u64)(((u64)(n)) * ((u64)(a->element_size))); a->data = ((u8*)(a->data)) + blen; a->offset += ((int)(blen)); a->len -= n; a->cap -= n; } // Attr: [inline] // Attr: [unsafe] inline VV_LOCAL_SYMBOL voidptr array_get_unsafe(array a, int i) { { // Unsafe block return ((u8*)(a.data)) + (u64)(((u64)(i)) * ((u64)(a.element_size))); } return 0; } VV_LOCAL_SYMBOL voidptr array_get(array a, int i) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (i < 0 || i >= a.len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("array.get: index out of range (i == "), /*100 &int*/0xfe07, {.d_i32 = i}}, {_SLIT(", a.len == "), /*100 &int*/0xfe07, {.d_i32 = a.len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif { // Unsafe block return ((u8*)(a.data)) + (u64)(((u64)(i)) * ((u64)(a.element_size))); } return 0; } VV_LOCAL_SYMBOL voidptr array_get_with_check(array a, int i) { if (i < 0 || i >= a.len) { return 0; } { // Unsafe block return ((u8*)(a.data)) + (u64)(((u64)(i)) * ((u64)(a.element_size))); } return 0; } voidptr array_first(array a) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (a.len == 0) { _v_panic(_SLIT("array.first: array is empty")); VUNREACHABLE(); } } #endif return a.data; } voidptr array_last(array a) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (a.len == 0) { _v_panic(_SLIT("array.last: array is empty")); VUNREACHABLE(); } } #endif { // Unsafe block return ((u8*)(a.data)) + (u64)(((u64)((int)(a.len - 1))) * ((u64)(a.element_size))); } return 0; } voidptr array_pop(array* a) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (a->len == 0) { _v_panic(_SLIT("array.pop: array is empty")); VUNREACHABLE(); } } #endif int new_len = (int)(a->len - 1); u8* last_elem = ((u8*)(a->data)) + (u64)(((u64)(new_len)) * ((u64)(a->element_size))); a->len = new_len; return last_elem; } void array_delete_last(array* a) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (a->len == 0) { _v_panic(_SLIT("array.pop: array is empty")); VUNREACHABLE(); } } #endif a->len--; } VV_LOCAL_SYMBOL array array_slice(array a, int start, int _end) { int end = _end; #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (start > end) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("array.slice: invalid slice index ("), /*100 &int*/0xfe07, {.d_i32 = start}}, {_SLIT(" > "), /*100 &int*/0xfe07, {.d_i32 = end}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } if (end > a.len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("array.slice: slice bounds out of range ("), /*100 &int*/0xfe07, {.d_i32 = end}}, {_SLIT(" >= "), /*100 &int*/0xfe07, {.d_i32 = a.len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } if (start < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("array.slice: slice bounds out of range ("), /*100 &int*/0xfe07, {.d_i32 = start}}, {_SLIT(" < 0)"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif u64 offset = (u64)(((u64)(start)) * ((u64)(a.element_size))); u8* data = ((u8*)(a.data)) + offset; int l = (int)(end - start); array res = ((array){.data = data,.offset = (int)(a.offset + ((int)(offset))),.len = l,.cap = l,.flags = 0,.element_size = a.element_size,}); return res; } VV_LOCAL_SYMBOL array array_slice_ni(array a, int _start, int _end) { int end = _end; int start = _start; if (start < 0) { start = (int)(a.len + start); if (start < 0) { start = 0; } } if (end < 0) { end = (int)(a.len + end); if (end < 0) { end = 0; } } if (end >= a.len) { end = a.len; } if (start >= a.len || start > end) { array res = ((array){.data = a.data,.offset = 0,.len = 0,.cap = 0,.flags = 0,.element_size = a.element_size,}); return res; } u64 offset = (u64)(((u64)(start)) * ((u64)(a.element_size))); u8* data = ((u8*)(a.data)) + offset; int l = (int)(end - start); array res = ((array){.data = data,.offset = (int)(a.offset + ((int)(offset))),.len = l,.cap = l,.flags = 0,.element_size = a.element_size,}); return res; } VV_LOCAL_SYMBOL array array_slice2(array a, int start, int _end, bool end_max) { int end = (end_max ? (a.len) : (_end)); return array_slice(a, start, end); } VV_LOCAL_SYMBOL array array_clone_static_to_depth(array a, int depth) { return array_clone_to_depth(&a, depth); } array array_clone(array* a) { return array_clone_to_depth(a, 0); } // Attr: [unsafe] array array_clone_to_depth(array* a, int depth) { array arr = ((array){.data = vcalloc((u64)(((u64)(a->cap)) * ((u64)(a->element_size)))),.offset = 0,.len = a->len,.cap = a->cap,.flags = 0,.element_size = a->element_size,}); if (depth > 0 && _us32_eq(sizeof(array),a->element_size) && a->len >= 0 && a->cap >= a->len) { for (int i = 0; i < a->len; ++i) { array ar = ((array){.data = 0,.offset = 0,.len = 0,.cap = 0,.flags = 0,.element_size = 0,}); vmemcpy(&ar, array_get_unsafe(/*rec*/*a, i), ((int)(sizeof(array)))); array ar_clone = array_clone_to_depth(&ar, (int)(depth - 1)); array_set_unsafe(&arr, i, &ar_clone); } return arr; } else { if (a->data != 0) { vmemcpy(((u8*)(arr.data)), a->data, (u64)(((u64)(a->cap)) * ((u64)(a->element_size)))); } return arr; } return (array){.data = 0,.offset = 0,.len = 0,.cap = 0,.element_size = 0,}; } // Attr: [inline] // Attr: [unsafe] inline VV_LOCAL_SYMBOL void array_set_unsafe(array* a, int i, voidptr val) { vmemcpy(((u8*)(a->data)) + (u64)(((u64)(a->element_size)) * ((u64)(i))), val, a->element_size); } VV_LOCAL_SYMBOL void array_set(array* a, int i, voidptr val) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (i < 0 || i >= a->len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("array.set: index out of range (i == "), /*100 &int*/0xfe07, {.d_i32 = i}}, {_SLIT(", a.len == "), /*100 &int*/0xfe07, {.d_i32 = a->len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif vmemcpy(((u8*)(a->data)) + (u64)(((u64)(a->element_size)) * ((u64)(i))), val, a->element_size); } VV_LOCAL_SYMBOL void array_push(array* a, voidptr val) { if (a->len >= a->cap) { array_ensure_cap(a, (int)(a->len + 1)); } vmemcpy(((u8*)(a->data)) + (u64)(((u64)(a->element_size)) * ((u64)(a->len))), val, a->element_size); a->len++; } // Attr: [unsafe] void array_push_many(array* a3, voidptr val, int size) { if (size <= 0 || val == ((void*)0)) { return; } array_ensure_cap(a3, (int)(a3->len + size)); if (a3->data == val && a3->data != 0) { array copy = array_clone(a3); vmemcpy(((u8*)(a3->data)) + (u64)(((u64)(a3->element_size)) * ((u64)(a3->len))), copy.data, (u64)(((u64)(a3->element_size)) * ((u64)(size)))); } else { if (a3->data != 0 && val != 0) { vmemcpy(((u8*)(a3->data)) + (u64)(((u64)(a3->element_size)) * ((u64)(a3->len))), val, (u64)(((u64)(a3->element_size)) * ((u64)(size)))); } } a3->len += size; } void array_reverse_in_place(array* a) { if (a->len < 2 || a->element_size == 0) { return; } { // Unsafe block u8* tmp_value = _v_malloc(a->element_size); for (int i = 0; i < (int)(a->len / 2); ++i) { vmemcpy(tmp_value, ((u8*)(a->data)) + (u64)(((u64)(i)) * ((u64)(a->element_size))), a->element_size); vmemcpy(((u8*)(a->data)) + (u64)(((u64)(i)) * ((u64)(a->element_size))), ((u8*)(a->data)) + (u64)(((u64)((int)((int)(a->len - 1) - i))) * ((u64)(a->element_size))), a->element_size); vmemcpy(((u8*)(a->data)) + (u64)(((u64)((int)((int)(a->len - 1) - i))) * ((u64)(a->element_size))), tmp_value, a->element_size); } _v_free(tmp_value); } } array array_reverse(array a) { if (a.len < 2) { return a; } array arr = ((array){.data = vcalloc((u64)(((u64)(a.cap)) * ((u64)(a.element_size)))),.offset = 0,.len = a.len,.cap = a.cap,.flags = 0,.element_size = a.element_size,}); for (int i = 0; i < a.len; ++i) { array_set_unsafe(&arr, i, array_get_unsafe(a, (int)((int)(a.len - 1) - i))); } return arr; } // Attr: [unsafe] void array_free(array* a) { #if defined(_VPREALLOC) { return; } #endif if (ArrayFlags_has(&a->flags, ArrayFlags__nofree)) { return; } u8* mblock_ptr = ((u8*)((u64)(((u64)(a->data)) - ((u64)(a->offset))))); _v_free(mblock_ptr); { // Unsafe block a->data = ((void*)0); } } array array_filter(array a, bool (*predicate)(voidptr )); bool array_any(array a, bool (*predicate)(voidptr )); bool array_all(array a, bool (*predicate)(voidptr )); array array_map(array a, voidptr (*callback)(voidptr )); void array_sort(array* a, int (*callback)(voidptr , voidptr )); array array_sorted(array* a, int (*callback)(voidptr , voidptr )); void array_sort_with_compare(array* a, int (*callback)(voidptr , voidptr )) { #if defined(_VFREESTANDING) { } #else { vqsort(a->data, ((usize)(a->len)), ((usize)(a->element_size)), (voidptr)callback); } #endif } array array_sorted_with_compare(array* a, int (*callback)(voidptr , voidptr )) { #if defined(_VFREESTANDING) { } #else { array r = array_clone(a); vqsort(r.data, ((usize)(r.len)), ((usize)(r.element_size)), (voidptr)callback); return r; } #endif return ((array){.data = 0,.offset = 0,.len = 0,.cap = 0,.flags = 0,.element_size = 0,}); } bool array_contains(array a, voidptr value); int array_index(array a, voidptr value); // Attr: [direct_array_access] // Attr: [unsafe] void Array_string_free(Array_string* a) { #if defined(_VPREALLOC) { return; } #endif for (int _t2 = 0; _t2 < a->len; ++_t2) { string* s = ((string*)a->data) + _t2; string_free(s); } array_free((((array*)(a)))); } // Attr: [direct_array_access] // Attr: [manualfree] string Array_string_str(Array_string a) { int sb_len = 4; if (a.len > 0) { sb_len += ((string*)a.data)[0].len; sb_len *= a.len; } sb_len += 2; strings__Builder sb = strings__new_builder(sb_len); strings__Builder_write_u8(&sb, '['); for (int i = 0; i < a.len; ++i) { string val = ((string*)a.data)[i]; strings__Builder_write_u8(&sb, '\''); strings__Builder_write_string(&sb, val); strings__Builder_write_u8(&sb, '\''); if (i < (int)(a.len - 1)) { strings__Builder_write_string(&sb, _SLIT(", ")); } } strings__Builder_write_u8(&sb, ']'); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } string Array_u8_hex(Array_u8 b) { u8* hex = malloc_noscan((u64)((u64)(((u64)(b.len)) * 2U) + 1U)); int dst_i = 0; for (int _t1 = 0; _t1 < b.len; ++_t1) { u8 i = ((u8*)b.data)[_t1]; u8 n0 = (i >> 4); { // Unsafe block hex[dst_i] = (n0 < 10 ? ((rune)(n0 + '0')) : ((u8)(n0 + ((u8)(87))))); dst_i++; } u8 n1 = (i & 0xF); { // Unsafe block hex[dst_i] = (n1 < 10 ? ((rune)(n1 + '0')) : ((u8)(n1 + ((u8)(87))))); dst_i++; } } { // Unsafe block hex[dst_i] = 0; return tos(hex, dst_i); } return (string){.str=(byteptr)"", .is_lit=1}; } int copy(Array_u8* dst, Array_u8 src) { int min = (dst->len < src.len ? (dst->len) : (src.len)); if (min > 0) { vmemmove(((u8*)(dst->data)), src.data, min); } return min; } void array_grow_cap(array* a, int amount) { array_ensure_cap(a, (int)(a->cap + amount)); } // Attr: [unsafe] void array_grow_len(array* a, int amount) { array_ensure_cap(a, (int)(a->len + amount)); a->len += amount; } // Attr: [unsafe] Array_voidptr array_pointers(array a) { Array_voidptr res = __new_array_with_default(0, 0, sizeof(voidptr), 0); for (int i = 0; i < a.len; ++i) { array_push((array*)&res, _MOV((voidptr[]){ array_get_unsafe(a, i) })); } return res; } // Attr: [unsafe] Array_u8 voidptr_vbytes(voidptr data, int len) { array res = ((array){.data = data,.offset = 0,.len = len,.cap = len,.flags = 0,.element_size = 1,}); return res; } // Attr: [unsafe] Array_u8 u8_vbytes(u8* data, int len) { return voidptr_vbytes(((voidptr)(data)), len); } VV_LOCAL_SYMBOL array __new_array_noscan(int mylen, int cap, int elm_size) { return __new_array(mylen, cap, elm_size); } VV_LOCAL_SYMBOL array __new_array_with_default_noscan(int mylen, int cap, int elm_size, voidptr val) { return __new_array_with_default(mylen, cap, elm_size, val); } VV_LOCAL_SYMBOL array __new_array_with_multi_default_noscan(int mylen, int cap, int elm_size, voidptr val) { return __new_array_with_multi_default(mylen, cap, elm_size, val); } VV_LOCAL_SYMBOL array __new_array_with_array_default_noscan(int mylen, int cap, int elm_size, array val, int depth) { return __new_array_with_array_default(mylen, cap, elm_size, val, depth); } // TypeDecl // Attr: [noreturn] VNORETURN VV_LOCAL_SYMBOL void vhalt(void) { for (;;) { } while(1); } // Attr: [markused] VV_LOCAL_SYMBOL void v_segmentation_fault_handler(int signal_number) { #if defined(_VFREESTANDING) { } #else { fprintf(stderr, "signal %d: segmentation fault\n", signal_number); } #endif #if defined(CUSTOM_DEFINE_use_libbacktrace) { eprint_libbacktrace(1); } #else { print_backtrace(); } #endif _v_exit((int)(128 + signal_number)); VUNREACHABLE(); } // Attr: [noreturn] VNORETURN void _v_exit(int code) { exit(code); VUNREACHABLE(); while(1); } VV_LOCAL_SYMBOL string vcommithash(void) { return tos5(((char*)(V_CURRENT_COMMIT_HASH))); } // Attr: [noreturn] VNORETURN VV_LOCAL_SYMBOL void panic_debug(int line_no, string file, string mod, string fn_name, string s) { #if defined(_VFREESTANDING) { } #else { eprintln(_SLIT("================ V panic ================")); eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT(" module: "), /*115 &string*/0xfe10, {.d_s = mod}}, {_SLIT0, 0, { .d_c = 0 }}}))); eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT(" function: "), /*115 &string*/0xfe10, {.d_s = fn_name}}, {_SLIT("()"), 0, { .d_c = 0 }}}))); eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT(" message: "), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT0, 0, { .d_c = 0 }}}))); eprintln( str_intp(3, _MOV((StrIntpData[]){{_SLIT(" file: "), /*115 &string*/0xfe10, {.d_s = file}}, {_SLIT(":"), /*100 &int*/0xfe07, {.d_i32 = line_no}}, {_SLIT0, 0, { .d_c = 0 }}}))); eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT(" v hash: "), /*115 &string*/0xfe10, {.d_s = vcommithash()}}, {_SLIT0, 0, { .d_c = 0 }}}))); eprintln(_SLIT("=========================================")); #if defined(CUSTOM_DEFINE_exit_after_panic_message) { exit(1); VUNREACHABLE(); } #elif defined(CUSTOM_DEFINE_no_backtrace) { exit(1); VUNREACHABLE(); } #else { #if defined(__TINYC__) { #if defined(CUSTOM_DEFINE_panics_break_into_debugger) { break_if_debugger_attached(); } #else { tcc_backtrace("Backtrace"); } #endif exit(1); VUNREACHABLE(); } #endif #if defined(CUSTOM_DEFINE_use_libbacktrace) { eprint_libbacktrace(1); } #else { print_backtrace_skipping_top_frames(1); } #endif #if defined(CUSTOM_DEFINE_panics_break_into_debugger) { break_if_debugger_attached(); } #endif exit(1); VUNREACHABLE(); } #endif } #endif vhalt(); VUNREACHABLE(); while(1); } // Attr: [noreturn] VNORETURN void panic_option_not_set(string s) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("option not set ("), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); while(1); } // Attr: [noreturn] VNORETURN void panic_result_not_set(string s) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("result not set ("), /*115 &string*/0xfe10, {.d_s = s}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); while(1); } // Attr: [noreturn] VNORETURN void _v_panic(string s) { #if defined(_VFREESTANDING) { } #else { eprint(_SLIT("V panic: ")); eprintln(s); eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT("v hash: "), /*115 &string*/0xfe10, {.d_s = vcommithash()}}, {_SLIT0, 0, { .d_c = 0 }}}))); #if defined(CUSTOM_DEFINE_exit_after_panic_message) { exit(1); VUNREACHABLE(); } #elif defined(CUSTOM_DEFINE_no_backtrace) { exit(1); VUNREACHABLE(); } #else { #if defined(__TINYC__) { #if defined(CUSTOM_DEFINE_panics_break_into_debugger) { break_if_debugger_attached(); } #else { tcc_backtrace("Backtrace"); } #endif exit(1); VUNREACHABLE(); } #endif #if defined(CUSTOM_DEFINE_use_libbacktrace) { eprint_libbacktrace(1); } #else { print_backtrace_skipping_top_frames(1); } #endif #if defined(CUSTOM_DEFINE_panics_break_into_debugger) { break_if_debugger_attached(); } #endif exit(1); VUNREACHABLE(); } #endif } #endif vhalt(); VUNREACHABLE(); while(1); } string c_error_number_str(int errnum) { string err_msg = _SLIT(""); #if defined(_VFREESTANDING) { } #else { #if !defined(__vinix__) { char* c_msg = strerror(errnum); err_msg = ((string){.str = ((u8*)(c_msg)), .len = strlen(c_msg), .is_lit = 1}); } #endif } #endif return err_msg; } // Attr: [noreturn] VNORETURN void panic_error_number(string basestr, int errnum) { _v_panic(string__plus(basestr, c_error_number_str(errnum))); VUNREACHABLE(); while(1); } void eprintln(string s) { if (s.str == 0) { eprintln(_SLIT("eprintln(NIL)")); return; } #if defined(_VFREESTANDING) { } #elif defined(__TARGET_IOS__) { WrappedNSLog(s.str); } #else { fflush(stdout); fflush(stderr); #if defined(__ANDROID__) && !defined(__TERMUX__) { android_print(stderr, "%.*s\n", s.len, s.str); } #endif _writeln_to_fd(2, s); fflush(stderr); } #endif } void eprint(string s) { if (s.str == 0) { eprint(_SLIT("eprint(NIL)")); return; } #if defined(_VFREESTANDING) { } #elif defined(__TARGET_IOS__) { WrappedNSLog(s.str); } #else { fflush(stdout); fflush(stderr); #if defined(__ANDROID__) && !defined(__TERMUX__) { android_print(stderr, "%.*s", s.len, s.str); } #endif _write_buf_to_fd(2, s.str, s.len); fflush(stderr); } #endif } void flush_stdout(void) { #if defined(_VFREESTANDING) { } #else { fflush(stdout); } #endif } void flush_stderr(void) { #if defined(_VFREESTANDING) { } #else { fflush(stderr); } #endif } // Attr: [manualfree] void print(string s) { #if defined(__ANDROID__) && !defined(__TERMUX__) { android_print(stdout, "%.*s\n", s.len, s.str); } #elif defined(__TARGET_IOS__) { WrappedNSLog(s.str); } #elif defined(_VFREESTANDING) { } #else { _write_buf_to_fd(1, s.str, s.len); } #endif } // Attr: [manualfree] void println(string s) { if (s.str == 0) { println(_SLIT("println(NIL)")); return; } #if defined(__ANDROID__) && !defined(__TERMUX__) { android_print(stdout, "%.*s\n", s.len, s.str); return; } #elif defined(__TARGET_IOS__) { WrappedNSLog(s.str); return; } #elif defined(_VFREESTANDING) { } #else { _writeln_to_fd(1, s); } #endif } // Attr: [manualfree] VV_LOCAL_SYMBOL void _writeln_to_fd(int fd, string s) { bool _writeln_to_fd_defer_0 = false; u8* buf; #if !defined(CUSTOM_DEFINE_bultin_writeln_should_write_at_once) { u8 lf = ((u8)('\n')); _write_buf_to_fd(fd, s.str, s.len); _write_buf_to_fd(fd, &lf, 1); return; } #endif { // Unsafe block int buf_len = (int)(s.len + 1); buf = _v_malloc(buf_len); _writeln_to_fd_defer_0 = true; memcpy(buf, s.str, s.len); buf[s.len] = '\n'; _write_buf_to_fd(fd, buf, buf_len); } // Defer begin if (_writeln_to_fd_defer_0) { _v_free(buf); } // Defer end } // Attr: [manualfree] VV_LOCAL_SYMBOL void _write_buf_to_fd(int fd, u8* buf, int buf_len) { if (buf_len <= 0) { return; } u8* ptr = buf; isize remaining_bytes = ((isize)(buf_len)); isize x = ((isize)(0)); #if defined(_VFREESTANDING) || defined(__vinix__) || defined(CUSTOM_DEFINE_bultin_write_buf_to_fd_should_use_c_write) { { // Unsafe block for (;;) { if (!(remaining_bytes > 0)) break; x = write(fd, ptr, remaining_bytes); ptr += x; remaining_bytes -= x; } } } #else { voidptr stream = ((voidptr)(stdout)); if (fd == 2) { stream = ((voidptr)(stderr)); } { // Unsafe block for (;;) { if (!(remaining_bytes > 0)) break; x = ((isize)(fwrite(ptr, 1, remaining_bytes, stream))); ptr += x; remaining_bytes -= x; } } } #endif } // Attr: [unsafe] u8* _v_malloc(isize n) { #if defined(CUSTOM_DEFINE_trace_malloc) { total_m += n; fprintf(stderr, "_v_malloc %6d total %10d\n", n, total_m); } #endif if (n < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("malloc("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(" < 0)"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } #if defined(CUSTOM_DEFINE_vplayground) { if (n > 10000) { _v_panic(_SLIT("allocating more than 10 KB at once is not allowed in the V playground")); VUNREACHABLE(); } if (total_m > (int_literal)((int_literal)(50 * 1024) * 1024)) { _v_panic(_SLIT("allocating more than 50 MB is not allowed in the V playground")); VUNREACHABLE(); } } #endif u8* res = ((u8*)(0)); #if defined(_VPREALLOC) { return prealloc_malloc(n); } #elif defined(_VGCBOEHM) { { // Unsafe block res = GC_MALLOC(n); } } #elif defined(_VFREESTANDING) { } #else { res = malloc(n); } #endif if (res == 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("malloc("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(") failed"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } #if defined(CUSTOM_DEFINE_debug_malloc) { memset(res, 0x4D, n); } #endif return res; } // Attr: [unsafe] u8* malloc_noscan(isize n) { #if defined(CUSTOM_DEFINE_trace_malloc) { total_m += n; fprintf(stderr, "malloc_noscan %6d total %10d\n", n, total_m); } #endif if (n < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("malloc_noscan("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(" < 0)"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } #if defined(CUSTOM_DEFINE_vplayground) { if (n > 10000) { _v_panic(_SLIT("allocating more than 10 KB at once is not allowed in the V playground")); VUNREACHABLE(); } if (total_m > (int_literal)((int_literal)(50 * 1024) * 1024)) { _v_panic(_SLIT("allocating more than 50 MB is not allowed in the V playground")); VUNREACHABLE(); } } #endif u8* res = ((u8*)(0)); #if defined(_VPREALLOC) { return prealloc_malloc(n); } #elif defined(_VGCBOEHM) { #if defined(CUSTOM_DEFINE_gcboehm_opt) { { // Unsafe block res = GC_MALLOC_ATOMIC(n); } } #else { { // Unsafe block res = GC_MALLOC(n); } } #endif } #elif defined(_VFREESTANDING) { } #else { res = malloc(n); } #endif if (res == 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("malloc_noscan("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(") failed"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } #if defined(CUSTOM_DEFINE_debug_malloc) { memset(res, 0x4D, n); } #endif return res; } // Attr: [inline] inline VV_LOCAL_SYMBOL u64 __at_least_one(u64 how_many) { if (how_many == 0U) { return 1U; } return how_many; } // Attr: [unsafe] u8* malloc_uncollectable(isize n) { #if defined(CUSTOM_DEFINE_trace_malloc) { total_m += n; fprintf(stderr, "malloc_uncollectable %6d total %10d\n", n, total_m); } #endif if (n < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("malloc_uncollectable("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(" < 0)"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } #if defined(CUSTOM_DEFINE_vplayground) { if (n > 10000) { _v_panic(_SLIT("allocating more than 10 KB at once is not allowed in the V playground")); VUNREACHABLE(); } if (total_m > (int_literal)((int_literal)(50 * 1024) * 1024)) { _v_panic(_SLIT("allocating more than 50 MB is not allowed in the V playground")); VUNREACHABLE(); } } #endif u8* res = ((u8*)(0)); #if defined(_VPREALLOC) { return prealloc_malloc(n); } #elif defined(_VGCBOEHM) { { // Unsafe block res = GC_MALLOC_UNCOLLECTABLE(n); } } #elif defined(_VFREESTANDING) { } #else { res = malloc(n); } #endif if (res == 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("malloc_uncollectable("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(") failed"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } #if defined(CUSTOM_DEFINE_debug_malloc) { memset(res, 0x4D, n); } #endif return res; } // Attr: [unsafe] u8* v_realloc(u8* b, isize n) { #if defined(CUSTOM_DEFINE_trace_realloc) { fprintf(stderr, "v_realloc %6d\n", n); } #endif u8* new_ptr = ((u8*)(0)); #if defined(_VPREALLOC) { { // Unsafe block new_ptr = _v_malloc(n); memcpy(new_ptr, b, n); } return new_ptr; } #elif defined(_VGCBOEHM) { new_ptr = GC_REALLOC(b, n); } #else { new_ptr = realloc(b, n); } #endif if (new_ptr == 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("realloc("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(") failed"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } return new_ptr; } // Attr: [unsafe] u8* realloc_data(u8* old_data, int old_size, int new_size) { #if defined(CUSTOM_DEFINE_trace_realloc) { fprintf(stderr, "realloc_data old_size: %6d new_size: %6d\n", old_size, new_size); } #endif #if defined(_VPREALLOC) { return prealloc_realloc(old_data, old_size, new_size); } #endif #if defined(CUSTOM_DEFINE_debug_realloc) { { // Unsafe block u8* new_ptr = _v_malloc(new_size); int min_size = (old_size < new_size ? (old_size) : (new_size)); memcpy(new_ptr, old_data, min_size); memset(old_data, 0x57, old_size); _v_free(old_data); return new_ptr; } } #endif u8* nptr = ((u8*)(0)); #if defined(_VGCBOEHM) { nptr = GC_REALLOC(old_data, new_size); } #else { nptr = realloc(old_data, new_size); } #endif if (nptr == 0) { _v_panic( str_intp(4, _MOV((StrIntpData[]){{_SLIT("realloc_data("), /*117 &u8*/0xfe11, {.d_p = (void*)(old_data)}}, {_SLIT(", "), /*100 &int*/0xfe07, {.d_i32 = old_size}}, {_SLIT(", "), /*100 &int*/0xfe07, {.d_i32 = new_size}}, {_SLIT(") failed"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } return nptr; } u8* vcalloc(isize n) { #if defined(CUSTOM_DEFINE_trace_vcalloc) { total_m += n; fprintf(stderr, "vcalloc %6d total %10d\n", n, total_m); } #endif if (n < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("calloc("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(" < 0)"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } else if (n == 0) { return ((u8*)(0)); } #if defined(_VPREALLOC) { return prealloc_calloc(n); } #elif defined(_VGCBOEHM) { return ((u8*)(GC_MALLOC(n))); } #else { return calloc(1, n); } #endif return 0; } u8* vcalloc_noscan(isize n) { #if defined(CUSTOM_DEFINE_trace_vcalloc) { total_m += n; fprintf(stderr, "vcalloc_noscan %6d total %10d\n", n, total_m); } #endif #if defined(_VPREALLOC) { return prealloc_calloc(n); } #elif defined(_VGCBOEHM) { #if defined(CUSTOM_DEFINE_vplayground) { if (n > 10000) { _v_panic(_SLIT("allocating more than 10 KB is not allowed in the playground")); VUNREACHABLE(); } } #endif if (n < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("calloc_noscan("), /*100 &isize*/0xfe09, {.d_i64 = n}}, {_SLIT(" < 0)"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } u8* _t6; #if defined(CUSTOM_DEFINE_gcboehm_opt) _t6 = ((u8*)(memset(GC_MALLOC_ATOMIC(n), 0, n))); ; #else _t6 = ((u8*)(GC_MALLOC(n))); ; #endif return _t6; } #else { return vcalloc(n); } #endif return 0; } // Attr: [unsafe] void _v_free(voidptr ptr) { #if defined(_VPREALLOC) { return; } #elif defined(_VGCBOEHM) { #if defined(CUSTOM_DEFINE_gcboehm_leak) { GC_FREE(ptr); } #endif } #else { free(ptr); } #endif } // Attr: [unsafe] voidptr memdup(voidptr src, int sz) { #if defined(CUSTOM_DEFINE_trace_memdup) { fprintf(stderr, "memdup size: %10d\n", sz); } #endif if (sz == 0) { return vcalloc(1); } { // Unsafe block u8* mem = _v_malloc(sz); return memcpy(mem, src, sz); } return 0; } // Attr: [unsafe] voidptr memdup_noscan(voidptr src, int sz) { #if defined(CUSTOM_DEFINE_trace_memdup) { fprintf(stderr, "memdup_noscan size: %10d\n", sz); } #endif if (sz == 0) { return vcalloc_noscan(1); } { // Unsafe block u8* mem = malloc_noscan(sz); return memcpy(mem, src, sz); } return 0; } // Attr: [unsafe] voidptr memdup_uncollectable(voidptr src, int sz) { #if defined(CUSTOM_DEFINE_trace_memdup) { fprintf(stderr, "memdup_uncollectable size: %10d\n", sz); } #endif if (sz == 0) { return vcalloc(1); } { // Unsafe block u8* mem = malloc_uncollectable(sz); return memcpy(mem, src, sz); } return 0; } GCHeapUsage gc_heap_usage(void) { #if defined(_VGCBOEHM) { GCHeapUsage res = ((GCHeapUsage){.heap_size = 0,.free_bytes = 0,.total_bytes = 0,.unmapped_bytes = 0,.bytes_since_gc = 0,}); GC_get_heap_usage_safe(&res.heap_size, &res.free_bytes, &res.unmapped_bytes, &res.bytes_since_gc, &res.total_bytes); return res; } #else { return ((GCHeapUsage){.heap_size = 0,.free_bytes = 0,.total_bytes = 0,.unmapped_bytes = 0,.bytes_since_gc = 0,}); } #endif return (GCHeapUsage){0}; } usize gc_memory_use(void) { #if defined(_VGCBOEHM) { return GC_get_memory_use(); } #else { return 0; } #endif return 0; } // Attr: [inline] inline VV_LOCAL_SYMBOL int v_fixed_index(int i, int len) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (i < 0 || i >= len) { string s = str_intp(3, _MOV((StrIntpData[]){{_SLIT("fixed array index out of range (index: "), /*100 &int*/0xfe07, {.d_i32 = i}}, {_SLIT(", len: "), /*100 &int*/0xfe07, {.d_i32 = len}}, {_SLIT(")"), 0, { .d_c = 0 }}})); _v_panic(s); VUNREACHABLE(); } } #endif return i; } void print_backtrace(void) { #if !defined(CUSTOM_DEFINE_no_backtrace) { #if defined(_VFREESTANDING) { } #else { #if defined(__TINYC__) { tcc_backtrace("Backtrace"); } #else { #if defined(CUSTOM_DEFINE_use_libbacktrace) { print_libbacktrace(1); } #else { print_backtrace_skipping_top_frames(2); } #endif } #endif } #endif } #endif } // Attr: [inline] inline bool isnil(voidptr v) { return v == 0; } VV_LOCAL_SYMBOL voidptr __as_cast(voidptr obj, int obj_type, int expected_type) { if (obj_type != expected_type) { string obj_name = string_clone((*(VCastTypeIndexName*)array_get(as_cast_type_indexes, 0)).tname); string expected_name = string_clone((*(VCastTypeIndexName*)array_get(as_cast_type_indexes, 0)).tname); for (int _t1 = 0; _t1 < as_cast_type_indexes.len; ++_t1) { VCastTypeIndexName x = ((VCastTypeIndexName*)as_cast_type_indexes.data)[_t1]; if (x.tindex == obj_type) { obj_name = string_clone(x.tname); } if (x.tindex == expected_type) { expected_name = string_clone(x.tname); } } _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("as cast: cannot cast `"), /*115 &string*/0xfe10, {.d_s = obj_name}}, {_SLIT("` to `"), /*115 &string*/0xfe10, {.d_s = expected_name}}, {_SLIT("`"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } return obj; } // Attr: [manualfree] // Attr: [unsafe] void VAssertMetaInfo_free(VAssertMetaInfo* ami) { { // Unsafe block string_free(&ami->fpath); string_free(&ami->fn_name); string_free(&ami->src); string_free(&ami->op); string_free(&ami->llabel); string_free(&ami->rlabel); string_free(&ami->lvalue); string_free(&ami->rvalue); string_free(&ami->message); } } VV_LOCAL_SYMBOL void __print_assert_failure(VAssertMetaInfo* i) { eprintln( str_intp(5, _MOV((StrIntpData[]){{_SLIT0, /*115 &string*/0xfe10, {.d_s = i->fpath}}, {_SLIT(":"), /*100 &int*/0xfe07, {.d_i32 = (int)(i->line_nr + 1)}}, {_SLIT(": FAIL: fn "), /*115 &string*/0xfe10, {.d_s = i->fn_name}}, {_SLIT(": assert "), /*115 &string*/0xfe10, {.d_s = i->src}}, {_SLIT0, 0, { .d_c = 0 }}}))); if (i->op.len > 0 && !string__eq(i->op, _SLIT("call"))) { eprintln( str_intp(3, _MOV((StrIntpData[]){{_SLIT(" left value: "), /*115 &string*/0xfe10, {.d_s = i->llabel}}, {_SLIT(" = "), /*115 &string*/0xfe10, {.d_s = i->lvalue}}, {_SLIT0, 0, { .d_c = 0 }}}))); if (string__eq(i->rlabel, i->rvalue)) { eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT(" right value: "), /*115 &string*/0xfe10, {.d_s = i->rlabel}}, {_SLIT0, 0, { .d_c = 0 }}}))); } else { eprintln( str_intp(3, _MOV((StrIntpData[]){{_SLIT(" right value: "), /*115 &string*/0xfe10, {.d_s = i->rlabel}}, {_SLIT(" = "), /*115 &string*/0xfe10, {.d_s = i->rvalue}}, {_SLIT0, 0, { .d_c = 0 }}}))); } } if (i->has_msg) { eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT(" message: "), /*115 &string*/0xfe10, {.d_s = i->message}}, {_SLIT0, 0, { .d_c = 0 }}}))); } } VV_LOCAL_SYMBOL void builtin_init(void) { } VV_LOCAL_SYMBOL bool print_backtrace_skipping_top_frames(int xskipframes) { #if defined(CUSTOM_DEFINE_no_backtrace) { return false; } #else { int skipframes = (int)(xskipframes + 2); #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) { return print_backtrace_skipping_top_frames_bsd(skipframes); } #elif defined(__linux__) { return print_backtrace_skipping_top_frames_linux(skipframes); } #else { println( str_intp(2, _MOV((StrIntpData[]){{_SLIT("print_backtrace_skipping_top_frames is not implemented. skipframes: "), /*100 &int*/0xfe07, {.d_i32 = skipframes}}, {_SLIT0, 0, { .d_c = 0 }}}))); } #endif } #endif return false; } VV_LOCAL_SYMBOL bool print_backtrace_skipping_top_frames_bsd(int skipframes) { #if defined(CUSTOM_DEFINE_no_backtrace) { return false; } #else { #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) { Array_fixed_voidptr_100 buffer = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int nr_ptrs = backtrace(&buffer[0], 100); if (nr_ptrs < 2) { eprintln(_SLIT("C.backtrace returned less than 2 frames")); return false; } backtrace_symbols_fd(&buffer[v_fixed_index(skipframes, 100)], (int)(nr_ptrs - skipframes), 2); } #endif return true; } #endif return 0; } VV_LOCAL_SYMBOL bool print_backtrace_skipping_top_frames_linux(int skipframes) { #if defined(__ANDROID__) { eprintln(_SLIT("On Android no backtrace is available.")); return false; } #endif #if !defined(__GLIBC__) { eprintln(_SLIT("backtrace_symbols is missing => printing backtraces is not available.")); eprintln(_SLIT("Some libc implementations like musl simply do not provide it.")); return false; } #endif #if defined(CUSTOM_DEFINE_no_backtrace) { return false; } #else { #if defined(__linux__) && !defined(_VFREESTANDING) { #if defined(__TINYC__) { tcc_backtrace("Backtrace"); return false; } #else { Array_fixed_voidptr_100 buffer = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int nr_ptrs = backtrace(&buffer[0], 100); if (nr_ptrs < 2) { eprintln(_SLIT("C.backtrace returned less than 2 frames")); return false; } int nr_actual_frames = (int)(nr_ptrs - skipframes); Array_string sframes = __new_array_with_default(0, 0, sizeof(string), 0); char** csymbols = backtrace_symbols(((voidptr)(&buffer[v_fixed_index(skipframes, 100)])), nr_actual_frames); for (int i = 0; i < nr_actual_frames; ++i) { array_push((array*)&sframes, _MOV((string[]){ tos2(((u8*)(csymbols[i]))) })); } for (int _t12 = 0; _t12 < sframes.len; ++_t12) { string sframe = ((string*)sframes.data)[_t12]; string executable = string_all_before(sframe, _SLIT("(")); string addr = string_all_before(string_all_after(sframe, _SLIT("[")), _SLIT("]")); string beforeaddr = string_all_before(sframe, _SLIT("[")); string cmd = str_intp(3, _MOV((StrIntpData[]){{_SLIT("addr2line -e "), /*115 &string*/0xfe10, {.d_s = executable}}, {_SLIT(" "), /*115 &string*/0xfe10, {.d_s = addr}}, {_SLIT0, 0, { .d_c = 0 }}})); voidptr f = popen(((char*)(cmd.str)), "r"); if (f == ((void*)0)) { eprintln(sframe); continue; } Array_fixed_u8_1000 buf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; string output = _SLIT(""); { // Unsafe block u8* bp = &buf[0]; for (;;) { if (!(fgets(((char*)(bp)), 1000, f) != 0)) break; output = string__plus(output, tos(bp, vstrlen(bp))); } } output = string__plus(string_trim_space(output), _SLIT(":")); if (pclose(f) != 0) { eprintln(sframe); continue; } if (string__eq(output, _SLIT("??:0:")) || string__eq(output, _SLIT("??:?:"))) { output = _SLIT(""); } output = string_replace(output, _SLIT(" (discriminator"), _SLIT(": (d.")); eprintln( str_intp(4, _MOV((StrIntpData[]){{_SLIT0, /*115 &string*/0x6efe10, {.d_s = output}}, {_SLIT(" | "), /*115 &string*/0x1cfe30, {.d_s = addr}}, {_SLIT(" | "), /*115 &string*/0xfe10, {.d_s = beforeaddr}}, {_SLIT0, 0, { .d_c = 0 }}}))); } } #endif } #endif } #endif return true; } VV_LOCAL_SYMBOL void break_if_debugger_attached(void) { { // Unsafe block voidptr* ptr = ((voidptr*)(0)); *ptr = ((void*)0); } } string winapi_lasterr_str(void) { return _SLIT(""); } // Attr: [noreturn] VNORETURN void panic_lasterr(void) { while(1); } void gc_check_leaks(void) { } VV_LOCAL_SYMBOL void print_libbacktrace(int frames_to_skip) { } // Attr: [noinline] __NOINLINE VV_LOCAL_SYMBOL void eprint_libbacktrace(int frames_to_skip) { } // Attr: [trusted] // Attr: [noreturn] // Attr: [trusted] // Attr: [trusted] int proc_pidpath(int , voidptr , int ); // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [trusted] // Attr: [inline] // Attr: [unsafe] inline int vstrlen(byte* s) { return strlen(((char*)(s))); } // Attr: [inline] // Attr: [unsafe] inline int vstrlen_char(char* s) { return strlen(s); } // Attr: [inline] // Attr: [unsafe] inline voidptr vmemcpy(voidptr dest, const voidptr const_src, isize n) { #if defined(CUSTOM_DEFINE_trace_vmemcpy) { fprintf(stderr, "vmemcpy dest: %p src: %p n: %6ld\n", dest, const_src, n); } #endif { // Unsafe block return memcpy(dest, const_src, n); } return 0; } // Attr: [inline] // Attr: [unsafe] inline voidptr vmemmove(voidptr dest, const voidptr const_src, isize n) { #if defined(CUSTOM_DEFINE_trace_vmemmove) { fprintf(stderr, "vmemmove dest: %p src: %p n: %6ld\n", dest, const_src, n); } #endif { // Unsafe block return memmove(dest, const_src, n); } return 0; } // Attr: [inline] // Attr: [unsafe] inline int vmemcmp(const voidptr const_s1, const voidptr const_s2, isize n) { #if defined(CUSTOM_DEFINE_trace_vmemcmp) { fprintf(stderr, "vmemcmp s1: %p s2: %p n: %6ld\n", const_s1, const_s2, n); } #endif { // Unsafe block return memcmp(const_s1, const_s2, n); } return 0; } // Attr: [inline] // Attr: [unsafe] inline voidptr vmemset(voidptr s, int c, isize n) { #if defined(CUSTOM_DEFINE_trace_vmemset) { fprintf(stderr, "vmemset s: %p c: %d n: %6ld\n", s, c, n); } #endif { // Unsafe block return memset(s, c, n); } return 0; } // TypeDecl // Attr: [inline] // Attr: [unsafe] inline VV_LOCAL_SYMBOL void vqsort(voidptr base, usize nmemb, usize size, int (*sort_cb)(const voidptr const_a, const voidptr const_b)) { qsort(base, nmemb, size, ((voidptr)(sort_cb))); } void chan_close(chan ch) { } ChanState chan_try_pop(chan ch, voidptr obj) { return ChanState__success; } ChanState chan_try_push(chan ch, voidptr obj) { return ChanState__success; } // Attr: [inline] inline string f64_str(f64 x) { { // Unsafe block strconv__Float64u f = ((strconv__Float64u){.f = x,}); if (f.u == _const_strconv__double_minus_zero) { return _SLIT("-0.0"); } if (f.u == _const_strconv__double_plus_zero) { return _SLIT("0.0"); } } f64 abs_x = f64_abs(x); if (abs_x >= ((f64)(0.0001)) && abs_x < ((f64)(1.0e6))) { return strconv__f64_to_str_l(x); } else { return strconv__ftoa_64(x); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [inline] inline string f64_strg(f64 x) { if (x == 0) { return _SLIT("0.0"); } f64 abs_x = f64_abs(x); if (abs_x >= ((f64)(0.0001)) && abs_x < ((f64)(1.0e6))) { return strconv__f64_to_str_l_with_dot(x); } else { return strconv__ftoa_64(x); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [inline] inline string float_literal_str(float_literal d) { return f64_str(((f64)(d))); } // Attr: [inline] inline string f64_strsci(f64 x, int digit_num) { int n_digit = digit_num; if (n_digit < 1) { n_digit = 1; } else if (n_digit > 17) { n_digit = 17; } return strconv__f64_to_str(x, n_digit); } // Attr: [inline] inline string f64_strlong(f64 x) { return strconv__f64_to_str_l(x); } // Attr: [inline] inline string f32_str(f32 x) { { // Unsafe block strconv__Float32u f = ((strconv__Float32u){.f = x,}); if (f.u == _const_strconv__single_minus_zero) { return _SLIT("-0.0"); } if (f.u == _const_strconv__single_plus_zero) { return _SLIT("0.0"); } } f32 abs_x = f32_abs(x); if (abs_x >= ((f32)(0.0001)) && abs_x < ((f32)(1.0e6))) { return strconv__f32_to_str_l(x); } else { return strconv__ftoa_32(x); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [inline] inline string f32_strg(f32 x) { if (x == 0) { return _SLIT("0.0"); } f32 abs_x = f32_abs(x); if (abs_x >= ((f32)(0.0001)) && abs_x < ((f32)(1.0e6))) { return strconv__f32_to_str_l_with_dot(x); } else { return strconv__ftoa_32(x); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [inline] inline string f32_strsci(f32 x, int digit_num) { int n_digit = digit_num; if (n_digit < 1) { n_digit = 1; } else if (n_digit > 8) { n_digit = 8; } return strconv__f32_to_str(x, n_digit); } // Attr: [inline] inline string f32_strlong(f32 x) { return strconv__f32_to_str_l(x); } // Attr: [inline] inline f32 f32_abs(f32 a) { return (a < 0 ? (-a) : (a)); } // Attr: [inline] inline VV_LOCAL_SYMBOL f64 f64_abs(f64 a) { return (a < 0 ? (-a) : (a)); } // Attr: [inline] inline f32 f32_max(f32 a, f32 b) { return (a > b ? (a) : (b)); } // Attr: [inline] inline f32 f32_min(f32 a, f32 b) { return (a < b ? (a) : (b)); } // Attr: [inline] inline f64 f64_max(f64 a, f64 b) { return (a > b ? (a) : (b)); } // Attr: [inline] inline VV_LOCAL_SYMBOL f64 f64_min(f64 a, f64 b) { return (a < b ? (a) : (b)); } // Attr: [inline] inline bool f32_eq_epsilon(f32 a, f32 b) { f32 hi = f32_max(f32_abs(a), f32_abs(b)); f32 delta = f32_abs((f32)(a - b)); if (hi > ((f32)(1.0))) { return delta <= (f32)(hi * ((f32)(4 * ((f32)(FLT_EPSILON))))); } else { return (f32)(((f32)(1 / ((f32)(4 * ((f32)(FLT_EPSILON)))))) * delta) <= hi; } return 0; } // Attr: [inline] inline bool f64_eq_epsilon(f64 a, f64 b) { f64 hi = f64_max(f64_abs(a), f64_abs(b)); f64 delta = f64_abs((f64)(a - b)); if (hi > ((f64)(1.0))) { return delta <= (f64)(hi * ((f64)(4 * ((f64)(DBL_EPSILON))))); } else { return (f64)(((f64)(1 / ((f64)(4 * ((f64)(DBL_EPSILON)))))) * delta) <= hi; } return 0; } VV_LOCAL_SYMBOL void float_test(void) { } // TypeDecl // TypeDecl string ptr_str(voidptr ptr) { string buf1 = u64_hex(((u64)(ptr))); return buf1; } string isize_str(isize x) { return i64_str(((i64)(x))); } string usize_str(usize x) { return u64_str(((u64)(x))); } string char_str(char* cptr) { return u64_hex(((u64)(cptr))); } // Attr: [direct_array_access] // Attr: [inline] inline VV_LOCAL_SYMBOL string int_str_l(int nn, int max) { { // Unsafe block i64 n = ((i64)(nn)); int d = 0; if (n == 0) { return _SLIT("0"); } bool is_neg = false; if (n < 0) { n = -n; is_neg = true; } int index = max; u8* buf = malloc_noscan((int)(max + 1)); buf[index] = 0; index--; for (;;) { if (!(n > 0)) break; int n1 = ((int)((i64)(n / 100))); d = ((int)((((u32)((int)(((int)(n)) - ((int)(n1 * 100))))) << 1U))); n = n1; buf[index] = _const_digit_pairs.str[d]; index--; d++; buf[index] = _const_digit_pairs.str[d]; index--; } index++; if (d < 20) { index++; } if (is_neg) { index--; buf[index] = '-'; } int diff = (int)(max - index); vmemmove(buf, ((voidptr)(buf + index)), (int)(diff + 1)); return tos(buf, diff); } return (string){.str=(byteptr)"", .is_lit=1}; } string i8_str(i8 n) { return int_str_l(((int)(n)), 5); } string i16_str(i16 n) { return int_str_l(((int)(n)), 7); } string u16_str(u16 n) { return int_str_l(((int)(n)), 7); } string int_str(int n) { return int_str_l(n, 12); } // Attr: [direct_array_access] // Attr: [inline] inline string u32_str(u32 nn) { { // Unsafe block u32 n = nn; u32 d = ((u32)(0U)); if (n == 0U) { return _SLIT("0"); } int max = 12; u8* buf = malloc_noscan((int)(max + 1)); int index = max; buf[index] = 0; index--; for (;;) { if (!(n > 0U)) break; u32 n1 = (u32)(n / ((u32)(100U))); d = ((((u32)(n - ((u32)(n1 * ((u32)(100U)))))) << ((u32)(1U)))); n = n1; buf[index] = _const_digit_pairs.str[ d]; index--; d++; buf[index] = _const_digit_pairs.str[ d]; index--; } index++; if (d < ((u32)(20U))) { index++; } int diff = (int)(max - index); vmemmove(buf, ((voidptr)(buf + index)), (int)(diff + 1)); return tos(buf, diff); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [inline] inline string int_literal_str(int_literal n) { return i64_str(((i64)(n))); } // Attr: [direct_array_access] // Attr: [inline] inline string i64_str(i64 nn) { { // Unsafe block i64 n = nn; i64 d = ((i64)(0)); if (n == 0) { return _SLIT("0"); } else if (n == ((i64)((int_literal)(-9223372036854775807 - 1)))) { return _SLIT("-9223372036854775808"); } int max = 20; u8* buf = malloc_noscan((int)(max + 1)); bool is_neg = false; if (n < 0) { n = -n; is_neg = true; } int index = max; buf[index] = 0; index--; for (;;) { if (!(n > 0)) break; i64 n1 = (i64)(n / ((i64)(100))); d = ((((u32)((i64)(n - ((i64)(n1 * ((i64)(100))))))) << ((i64)(1)))); n = n1; buf[index] = _const_digit_pairs.str[ d]; index--; d++; buf[index] = _const_digit_pairs.str[ d]; index--; } index++; if (d < ((i64)(20))) { index++; } if (is_neg) { index--; buf[index] = '-'; } int diff = (int)(max - index); vmemmove(buf, ((voidptr)(buf + index)), (int)(diff + 1)); return tos(buf, diff); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] // Attr: [inline] inline string u64_str(u64 nn) { { // Unsafe block u64 n = nn; u64 d = ((u64)(0U)); if (n == 0U) { return _SLIT("0"); } int max = 20; u8* buf = malloc_noscan((int)(max + 1)); int index = max; buf[index] = 0; index--; for (;;) { if (!(n > 0U)) break; u64 n1 = (u64)(n / 100U); d = ((((u64)(n - ((u64)(n1 * 100U)))) << 1U)); n = n1; buf[index] = _const_digit_pairs.str[ d]; index--; d++; buf[index] = _const_digit_pairs.str[ d]; index--; } index++; if (d < 20U) { index++; } int diff = (int)(max - index); vmemmove(buf, ((voidptr)(buf + index)), (int)(diff + 1)); return tos(buf, diff); } return (string){.str=(byteptr)"", .is_lit=1}; } string bool_str(bool b) { if (b) { return _SLIT("true"); } return _SLIT("false"); } // Attr: [direct_array_access] // Attr: [inline] inline VV_LOCAL_SYMBOL string u64_to_hex(u64 nn, u8 len) { u64 n = nn; Array_fixed_u8_17 buf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; buf[len] = 0; int i = 0; for (i = (u8)(len - 1); i >= 0; i--) { u8 d = ((u8)((n & 0xFU))); buf[i] = (d < 10 ? ((rune)(d + '0')) : ((u8)(d + 87))); n = (n >> 4U); } return tos(memdup(&buf[0], (u8)(len + 1)), len); } // Attr: [direct_array_access] // Attr: [inline] inline VV_LOCAL_SYMBOL string u64_to_hex_no_leading_zeros(u64 nn, u8 len) { u64 n = nn; Array_fixed_u8_17 buf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; buf[len] = 0; int i = 0; for (i = (u8)(len - 1); i >= 0; i--) { u8 d = ((u8)((n & 0xFU))); buf[i] = (d < 10 ? ((rune)(d + '0')) : ((u8)(d + 87))); n = (n >> 4U); if (n == 0U) { break; } } int res_len = (int)(len - i); return tos(memdup(&buf[i], (int)(res_len + 1)), res_len); } string u8_hex(u8 nn) { if (nn == 0) { return _SLIT("00"); } return u64_to_hex(nn, 2); } string i8_hex(i8 nn) { if (nn == 0) { return _SLIT("00"); } return u64_to_hex(((u64)(nn)), 2); } string u16_hex(u16 nn) { if (nn == 0U) { return _SLIT("0"); } return u64_to_hex_no_leading_zeros(nn, 4); } string i16_hex(i16 nn) { return u16_hex(((u16)(nn))); } string u32_hex(u32 nn) { if (nn == 0U) { return _SLIT("0"); } return u64_to_hex_no_leading_zeros(nn, 8); } string int_hex(int nn) { return u32_hex(((u32)(nn))); } string int_hex2(int n) { return string__plus(_SLIT("0x"), int_hex(n)); } string u64_hex(u64 nn) { if (nn == 0U) { return _SLIT("0"); } return u64_to_hex_no_leading_zeros(nn, 16); } string i64_hex(i64 nn) { return u64_hex(((u64)(nn))); } string int_literal_hex(int_literal nn) { return u64_hex(((u64)(nn))); } string voidptr_str(voidptr nn) { return string__plus(_SLIT("0x"), u64_hex(((u64)(nn)))); } string byteptr_str(byteptr nn) { return string__plus(_SLIT("0x"), u64_hex(((u64)(nn)))); } string charptr_str(charptr nn) { return string__plus(_SLIT("0x"), u64_hex(((u64)(nn)))); } string u8_hex_full(u8 nn) { return u64_to_hex(((u64)(nn)), 2); } string i8_hex_full(i8 nn) { return u64_to_hex(((u64)(nn)), 2); } string u16_hex_full(u16 nn) { return u64_to_hex(((u64)(nn)), 4); } string i16_hex_full(i16 nn) { return u64_to_hex(((u64)(nn)), 4); } string u32_hex_full(u32 nn) { return u64_to_hex(((u64)(nn)), 8); } string int_hex_full(int nn) { return u64_to_hex(((u64)(nn)), 8); } string i64_hex_full(i64 nn) { return u64_to_hex(((u64)(nn)), 16); } string voidptr_hex_full(voidptr nn) { return u64_to_hex(((u64)(nn)), 16); } string int_literal_hex_full(int_literal nn) { return u64_to_hex(((u64)(nn)), 16); } string u64_hex_full(u64 nn) { return u64_to_hex(nn, 16); } string u8_str(u8 b) { return int_str_l(((int)(b)), 7); } string u8_ascii_str(u8 b) { string str = ((string){.str = malloc_noscan(2), .len = 1}); { // Unsafe block str.str[0] = b; str.str[1] = 0; } return str; } // Attr: [manualfree] string u8_str_escaped(u8 b) { string _t1 = (string){.str=(byteptr)"", .is_lit=1}; if (b == (0)) { _t1 = _SLIT("`\\0`"); } else if (b == (7)) { _t1 = _SLIT("`\\a`"); } else if (b == (8)) { _t1 = _SLIT("`\\b`"); } else if (b == (9)) { _t1 = _SLIT("`\\t`"); } else if (b == (10)) { _t1 = _SLIT("`\\n`"); } else if (b == (11)) { _t1 = _SLIT("`\\v`"); } else if (b == (12)) { _t1 = _SLIT("`\\f`"); } else if (b == (13)) { _t1 = _SLIT("`\\r`"); } else if (b == (27)) { _t1 = _SLIT("`\\e`"); } else if ((b >= 32 && b <= 126)) { _t1 = u8_ascii_str(b); } else { string xx = u8_hex(b); string yy = string__plus(_SLIT("0x"), xx); string_free(&xx); _t1 = yy; }string str = _t1; return str; } // Attr: [inline] inline bool u8_is_capital(u8 c) { return c >= 'A' && c <= 'Z'; } Array_u8 Array_u8_clone(Array_u8 b) { Array_u8 res = __new_array_with_default(b.len, 0, sizeof(u8), 0); for (int i = 0; i < b.len; ++i) { array_set(&res, i, &(u8[]) { (*(u8*)array_get(b, i)) }); } return res; } string Array_u8_bytestr(Array_u8 b) { { // Unsafe block u8* buf = malloc_noscan((int)(b.len + 1)); vmemcpy(buf, b.data, b.len); buf[b.len] = 0; return tos(buf, b.len); } return (string){.str=(byteptr)"", .is_lit=1}; } _result_rune Array_u8_byterune(Array_u8 b) { _result_rune _t1 = Array_u8_utf8_to_utf32(b); if (_t1.is_error) { _result_rune _t2; memcpy(&_t2, &_t1, sizeof(_result)); return _t2; } rune r = (*(rune*)_t1.data); _result_rune _t3; _result_ok(&(rune[]) { ((rune)(r)) }, (_result*)(&_t3), sizeof(rune)); return _t3; } string u8_repeat(u8 b, int count) { if (count < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("byte.repeat: count is negative: "), /*100 &int*/0xfe07, {.d_i32 = count}}, {_SLIT0, 0, { .d_c = 0 }}}))); VUNREACHABLE(); } else if (count == 0) { return _SLIT(""); } else if (count == 1) { return u8_ascii_str(b); } u8* ret = malloc_noscan((int)(count + 1)); for (int i = 0; i < count; ++i) { { // Unsafe block ret[i] = b; } } int new_len = count; { // Unsafe block ret[new_len] = 0; } return u8_vstring_with_len(ret, new_len); } VV_LOCAL_SYMBOL string _Atomic__int_str(int x) { return int_str(x); } // Attr: [inline] inline VV_LOCAL_SYMBOL bool fast_string_eq(string a, string b) { if (a.len != b.len) { return false; } { // Unsafe block return memcmp(a.str, b.str, b.len) == 0; } return 0; } VV_LOCAL_SYMBOL u64 map_hash_string(voidptr pkey) { string key = *((string*)(pkey)); return wyhash(key.str, ((u64)(key.len)), 0U, ((u64*)(_wyp))); } VV_LOCAL_SYMBOL u64 map_hash_int_1(voidptr pkey) { return wyhash64(*((u8*)(pkey)), 0U); } VV_LOCAL_SYMBOL u64 map_hash_int_2(voidptr pkey) { return wyhash64(*((u16*)(pkey)), 0U); } VV_LOCAL_SYMBOL u64 map_hash_int_4(voidptr pkey) { return wyhash64(*((u32*)(pkey)), 0U); } VV_LOCAL_SYMBOL u64 map_hash_int_8(voidptr pkey) { return wyhash64(*((u64*)(pkey)), 0U); } VV_LOCAL_SYMBOL void DenseArray_zeros_to_end(DenseArray* d) { u8* tmp_value = _v_malloc(d->value_bytes); u8* tmp_key = _v_malloc(d->key_bytes); int count = 0; for (int i = 0; i < d->len; ++i) { if (DenseArray_has_index(d, i)) { { // Unsafe block if (count != i) { memcpy(tmp_key, DenseArray_key(d, count), d->key_bytes); memcpy(DenseArray_key(d, count), DenseArray_key(d, i), d->key_bytes); memcpy(DenseArray_key(d, i), tmp_key, d->key_bytes); memcpy(tmp_value, DenseArray_value(d, count), d->value_bytes); memcpy(DenseArray_value(d, count), DenseArray_value(d, i), d->value_bytes); memcpy(DenseArray_value(d, i), tmp_value, d->value_bytes); } } count++; } } { // Unsafe block _v_free(tmp_value); _v_free(tmp_key); d->deletes = 0U; _v_free(d->all_deleted); } d->len = count; int old_cap = d->cap; d->cap = (count < 8 ? (8) : (count)); { // Unsafe block d->values = realloc_data(d->values, (int)(d->value_bytes * old_cap), (int)(d->value_bytes * d->cap)); d->keys = realloc_data(d->keys, (int)(d->key_bytes * old_cap), (int)(d->key_bytes * d->cap)); } } // Attr: [inline] inline VV_LOCAL_SYMBOL DenseArray new_dense_array(int key_bytes, int value_bytes) { int cap = 8; return ((DenseArray){ .key_bytes = key_bytes, .value_bytes = value_bytes, .cap = cap, .len = 0, .deletes = 0U, .all_deleted = 0, .keys = _v_malloc(__at_least_one((u64)(((u64)(cap)) * ((u64)(key_bytes))))), .values = _v_malloc(__at_least_one((u64)(((u64)(cap)) * ((u64)(value_bytes))))), }); } // Attr: [inline] inline VV_LOCAL_SYMBOL voidptr DenseArray_key(DenseArray* d, int i) { return ((voidptr)(d->keys + (int)(i * d->key_bytes))); } // Attr: [inline] inline VV_LOCAL_SYMBOL voidptr DenseArray_value(DenseArray* d, int i) { return ((voidptr)(d->values + (int)(i * d->value_bytes))); } // Attr: [inline] inline VV_LOCAL_SYMBOL bool DenseArray_has_index(DenseArray* d, int i) { return d->deletes == 0U || d->all_deleted[i] == 0; } // Attr: [inline] inline VV_LOCAL_SYMBOL int DenseArray_expand(DenseArray* d) { int old_cap = d->cap; int old_key_size = (int)(d->key_bytes * old_cap); int old_value_size = (int)(d->value_bytes * old_cap); if (d->cap == d->len) { d->cap += (d->cap >> 3); { // Unsafe block d->keys = realloc_data(d->keys, old_key_size, (int)(d->key_bytes * d->cap)); d->values = realloc_data(d->values, old_value_size, (int)(d->value_bytes * d->cap)); if (d->deletes != 0U) { d->all_deleted = realloc_data(d->all_deleted, old_cap, d->cap); vmemset(((voidptr)(d->all_deleted + d->len)), 0, (int)(d->cap - d->len)); } } } int push_index = d->len; { // Unsafe block if (d->deletes != 0U) { d->all_deleted[push_index] = 0; } } d->len++; return push_index; } // TypeDecl // TypeDecl // TypeDecl // TypeDecl VV_LOCAL_SYMBOL bool map_eq_string(voidptr a, voidptr b) { return fast_string_eq(*((string*)(a)), *((string*)(b))); } VV_LOCAL_SYMBOL bool map_eq_int_1(voidptr a, voidptr b) { return *((u8*)(a)) == *((u8*)(b)); } VV_LOCAL_SYMBOL bool map_eq_int_2(voidptr a, voidptr b) { return *((u16*)(a)) == *((u16*)(b)); } VV_LOCAL_SYMBOL bool map_eq_int_4(voidptr a, voidptr b) { return *((u32*)(a)) == *((u32*)(b)); } VV_LOCAL_SYMBOL bool map_eq_int_8(voidptr a, voidptr b) { return *((u64*)(a)) == *((u64*)(b)); } VV_LOCAL_SYMBOL void map_clone_string(voidptr dest, voidptr pkey) { { // Unsafe block string s = *((string*)(pkey)); (*((string*)(dest))) = string_clone(s); } } VV_LOCAL_SYMBOL void map_clone_int_1(voidptr dest, voidptr pkey) { { // Unsafe block *((u8*)(dest)) = *((u8*)(pkey)); } } VV_LOCAL_SYMBOL void map_clone_int_2(voidptr dest, voidptr pkey) { { // Unsafe block *((u16*)(dest)) = *((u16*)(pkey)); } } VV_LOCAL_SYMBOL void map_clone_int_4(voidptr dest, voidptr pkey) { { // Unsafe block *((u32*)(dest)) = *((u32*)(pkey)); } } VV_LOCAL_SYMBOL void map_clone_int_8(voidptr dest, voidptr pkey) { { // Unsafe block *((u64*)(dest)) = *((u64*)(pkey)); } } VV_LOCAL_SYMBOL void map_free_string(voidptr pkey) { string_free(ADDR(string, (*((string*)(pkey))))); } VV_LOCAL_SYMBOL void map_free_nop(voidptr _d1) { } VV_LOCAL_SYMBOL map new_map(int key_bytes, int value_bytes, u64 (*hash_fn)(voidptr ), bool (*key_eq_fn)(voidptr , voidptr ), void (*clone_fn)(voidptr , voidptr ), void (*free_fn)(voidptr )) { int metasize = ((int)((u32)(sizeof(u32) * ((int_literal)(_const_init_capicity + _const_extra_metas_inc))))); bool has_string_keys = _us32_lt(sizeof(voidptr),key_bytes); return ((map){ .key_bytes = key_bytes, .value_bytes = value_bytes, .even_index = _const_init_even_index, .cached_hashbits = _const_max_cached_hashbits, .shift = _const_init_log_capicity, .key_values = new_dense_array(key_bytes, value_bytes), .metas = ((u32*)(vcalloc_noscan(metasize))), .extra_metas = _const_extra_metas_inc, .has_string_keys = has_string_keys, .hash_fn = (voidptr)hash_fn, .key_eq_fn = (voidptr)key_eq_fn, .clone_fn = (voidptr)clone_fn, .free_fn = (voidptr)free_fn, .len = 0, }); } VV_LOCAL_SYMBOL map new_map_init(u64 (*hash_fn)(voidptr ), bool (*key_eq_fn)(voidptr , voidptr ), void (*clone_fn)(voidptr , voidptr ), void (*free_fn)(voidptr ), int n, int key_bytes, int value_bytes, voidptr keys, voidptr values) { map out = new_map(key_bytes, value_bytes, (voidptr)hash_fn, (voidptr)key_eq_fn, (voidptr)clone_fn, (voidptr)free_fn); u8* pkey = ((u8*)(keys)); u8* pval = ((u8*)(values)); for (int _t1 = 0; _t1 < n; ++_t1) { { // Unsafe block map_set(&out, pkey, pval); pkey = pkey + key_bytes; pval = pval + value_bytes; } } return out; } map map_move(map* m) { map r = *m; vmemset(m, 0, ((int)(sizeof(map)))); return r; } void map_clear(map* m) { m->len = 0; m->even_index = 0U; m->key_values.len = 0; } // Attr: [inline] inline VV_LOCAL_SYMBOL multi_return_u32_u32 map_key_to_index(map* m, voidptr pkey) { u64 hash = m->hash_fn(pkey); u64 index = (hash & m->even_index); u64 meta = (((((hash >> m->shift)) & _const_hash_mask)) | _const_probe_inc); return (multi_return_u32_u32){.arg0=((u32)(index)), .arg1=((u32)(meta))}; } // Attr: [inline] inline VV_LOCAL_SYMBOL multi_return_u32_u32 map_meta_less(map* m, u32 _index, u32 _metas) { u32 index = _index; u32 meta = _metas; for (;;) { if (!(meta < m->metas[index])) break; index += 2U; meta += _const_probe_inc; } return (multi_return_u32_u32){.arg0=index, .arg1=meta}; } // Attr: [inline] inline VV_LOCAL_SYMBOL void map_meta_greater(map* m, u32 _index, u32 _metas, u32 kvi) { u32 meta = _metas; u32 index = _index; u32 kv_index = kvi; for (;;) { if (!(m->metas[index] != 0U)) break; if (meta > m->metas[index]) { { // Unsafe block u32 tmp_meta = m->metas[index]; m->metas[index] = meta; meta = tmp_meta; u32 tmp_index = m->metas[(u32)(index + 1U)]; m->metas[(u32)(index + 1U)] = kv_index; kv_index = tmp_index; } } index += 2U; meta += _const_probe_inc; } { // Unsafe block m->metas[index] = meta; m->metas[(u32)(index + 1U)] = kv_index; } u32 probe_count = (u32)(((meta >> _const_hashbits)) - 1U); map_ensure_extra_metas(m, probe_count); } // Attr: [inline] inline VV_LOCAL_SYMBOL void map_ensure_extra_metas(map* m, u32 probe_count) { if (((probe_count << 1U)) == m->extra_metas) { u32 size_of_u32 = sizeof(u32); u32 old_mem_size = ((u32)((u32)(m->even_index + 2U) + m->extra_metas)); m->extra_metas += _const_extra_metas_inc; u32 mem_size = ((u32)((u32)(m->even_index + 2U) + m->extra_metas)); { // Unsafe block u8* x = realloc_data(((u8*)(m->metas)), ((int)((u32)(size_of_u32 * old_mem_size))), ((int)((u32)(size_of_u32 * mem_size)))); m->metas = ((u32*)(x)); vmemset(m->metas + mem_size - _const_extra_metas_inc, 0, ((int)((u32)(sizeof(u32) * _const_extra_metas_inc)))); } if (probe_count == 252U) { _v_panic(_SLIT("Probe overflow")); VUNREACHABLE(); } } } VV_LOCAL_SYMBOL void map_set(map* m, voidptr key, voidptr value) { f32 load_factor = (f32)(((f32)((((u32)(m->len)) << 1U))) / ((f32)(m->even_index))); if (load_factor > ((f32)(_const_max_load_factor))) { map_expand(m); } multi_return_u32_u32 mr_11364 = map_key_to_index(m, key); u32 index = mr_11364.arg0; u32 meta = mr_11364.arg1; multi_return_u32_u32 mr_11400 = map_meta_less(m, index, meta); index = mr_11400.arg0; meta = mr_11400.arg1; for (;;) { if (!(meta == m->metas[index])) break; int kv_index = ((int)(m->metas[(u32)(index + 1U)])); voidptr pkey = DenseArray_key(&m->key_values, kv_index); if (m->key_eq_fn(key, pkey)) { { // Unsafe block voidptr pval = DenseArray_value(&m->key_values, kv_index); vmemcpy(pval, value, m->value_bytes); } return; } index += 2U; meta += _const_probe_inc; } int kv_index = DenseArray_expand(&m->key_values); { // Unsafe block voidptr pkey = DenseArray_key(&m->key_values, kv_index); voidptr pvalue = DenseArray_value(&m->key_values, kv_index); m->clone_fn(pkey, key); vmemcpy(((u8*)(pvalue)), value, m->value_bytes); } map_meta_greater(m, index, meta, ((u32)(kv_index))); m->len++; } VV_LOCAL_SYMBOL void map_expand(map* m) { u32 old_cap = m->even_index; m->even_index = (u32)(((((u32)(m->even_index + 2U)) << 1U)) - 2U); if (m->cached_hashbits == 0) { m->shift += _const_max_cached_hashbits; m->cached_hashbits = _const_max_cached_hashbits; map_rehash(m); } else { map_cached_rehash(m, old_cap); m->cached_hashbits--; } } VV_LOCAL_SYMBOL void map_rehash(map* m) { u32 meta_bytes = (u32)(sizeof(u32) * ((u32)((u32)(m->even_index + 2U) + m->extra_metas))); map_reserve(m, meta_bytes); } void map_reserve(map* m, u32 meta_bytes) { { // Unsafe block u8* x = v_realloc(((u8*)(m->metas)), ((int)(meta_bytes))); m->metas = ((u32*)(x)); vmemset(m->metas, 0, ((int)(meta_bytes))); } for (int i = 0; i < m->key_values.len; i++) { if (!DenseArray_has_index(&m->key_values, i)) { continue; } voidptr pkey = DenseArray_key(&m->key_values, i); multi_return_u32_u32 mr_13174 = map_key_to_index(m, pkey); u32 index = mr_13174.arg0; u32 meta = mr_13174.arg1; multi_return_u32_u32 mr_13212 = map_meta_less(m, index, meta); index = mr_13212.arg0; meta = mr_13212.arg1; map_meta_greater(m, index, meta, ((u32)(i))); } } VV_LOCAL_SYMBOL void map_cached_rehash(map* m, u32 old_cap) { u32* old_metas = m->metas; int metasize = ((int)((u32)(sizeof(u32) * ((u32)((u32)(m->even_index + 2U) + m->extra_metas))))); m->metas = ((u32*)(vcalloc(metasize))); u32 old_extra_metas = m->extra_metas; for (u32 i = ((u32)(0U)); i <= (u32)(old_cap + old_extra_metas); i += 2U) { if (old_metas[i] == 0U) { continue; } u32 old_meta = old_metas[i]; u32 old_probe_count = (((u32)(((old_meta >> _const_hashbits)) - 1U)) << 1U); u32 old_index = (((u32)(i - old_probe_count)) & ((m->even_index >> 1U))); u32 index = (((old_index | ((old_meta << m->shift)))) & m->even_index); u32 meta = (((old_meta & _const_hash_mask)) | _const_probe_inc); multi_return_u32_u32 mr_14011 = map_meta_less(m, index, meta); index = mr_14011.arg0; meta = mr_14011.arg1; u32 kv_index = old_metas[(u32)(i + 1U)]; map_meta_greater(m, index, meta, kv_index); } _v_free(old_metas); } VV_LOCAL_SYMBOL voidptr map_get_and_set(map* m, voidptr key, voidptr zero) { for (;;) { multi_return_u32_u32 mr_14459 = map_key_to_index(m, key); u32 index = mr_14459.arg0; u32 meta = mr_14459.arg1; for (;;) { if (meta == m->metas[index]) { int kv_index = ((int)(m->metas[(u32)(index + 1U)])); voidptr pkey = DenseArray_key(&m->key_values, kv_index); if (m->key_eq_fn(key, pkey)) { voidptr pval = DenseArray_value(&m->key_values, kv_index); return ((u8*)(pval)); } } index += 2U; meta += _const_probe_inc; if (meta > m->metas[index]) { break; } } map_set(m, key, zero); } return ((void*)0); } VV_LOCAL_SYMBOL voidptr map_get(map* m, voidptr key, voidptr zero) { multi_return_u32_u32 mr_15186 = map_key_to_index(m, key); u32 index = mr_15186.arg0; u32 meta = mr_15186.arg1; for (;;) { if (meta == m->metas[index]) { int kv_index = ((int)(m->metas[(u32)(index + 1U)])); voidptr pkey = DenseArray_key(&m->key_values, kv_index); if (m->key_eq_fn(key, pkey)) { voidptr pval = DenseArray_value(&m->key_values, kv_index); return ((u8*)(pval)); } } index += 2U; meta += _const_probe_inc; if (meta > m->metas[index]) { break; } } return zero; } VV_LOCAL_SYMBOL voidptr map_get_check(map* m, voidptr key) { multi_return_u32_u32 mr_15851 = map_key_to_index(m, key); u32 index = mr_15851.arg0; u32 meta = mr_15851.arg1; for (;;) { if (meta == m->metas[index]) { int kv_index = ((int)(m->metas[(u32)(index + 1U)])); voidptr pkey = DenseArray_key(&m->key_values, kv_index); if (m->key_eq_fn(key, pkey)) { voidptr pval = DenseArray_value(&m->key_values, kv_index); return ((u8*)(pval)); } } index += 2U; meta += _const_probe_inc; if (meta > m->metas[index]) { break; } } return 0; } VV_LOCAL_SYMBOL bool map_exists(map* m, voidptr key) { multi_return_u32_u32 mr_16361 = map_key_to_index(m, key); u32 index = mr_16361.arg0; u32 meta = mr_16361.arg1; for (;;) { if (meta == m->metas[index]) { int kv_index = ((int)(m->metas[(u32)(index + 1U)])); voidptr pkey = DenseArray_key(&m->key_values, kv_index); if (m->key_eq_fn(key, pkey)) { return true; } } index += 2U; meta += _const_probe_inc; if (meta > m->metas[index]) { break; } } return false; } // Attr: [inline] inline VV_LOCAL_SYMBOL void DenseArray_delete(DenseArray* d, int i) { if (d->deletes == 0U) { d->all_deleted = vcalloc(d->cap); } d->deletes++; { // Unsafe block d->all_deleted[i] = 1; } } // Attr: [unsafe] void map_delete(map* m, voidptr key) { multi_return_u32_u32 mr_16997 = map_key_to_index(m, key); u32 index = mr_16997.arg0; u32 meta = mr_16997.arg1; multi_return_u32_u32 mr_17033 = map_meta_less(m, index, meta); index = mr_17033.arg0; meta = mr_17033.arg1; for (;;) { if (!(meta == m->metas[index])) break; int kv_index = ((int)(m->metas[(u32)(index + 1U)])); voidptr pkey = DenseArray_key(&m->key_values, kv_index); if (m->key_eq_fn(key, pkey)) { for (;;) { if (!(((m->metas[(u32)(index + 2U)] >> _const_hashbits)) > 1U)) break; { // Unsafe block m->metas[index] = (u32)(m->metas[(u32)(index + 2U)] - _const_probe_inc); m->metas[(u32)(index + 1U)] = m->metas[(u32)(index + 3U)]; } index += 2U; } m->len--; DenseArray_delete(&m->key_values, kv_index); { // Unsafe block m->metas[index] = 0U; m->free_fn(pkey); vmemset(pkey, 0, m->key_bytes); } if (m->key_values.len <= 32) { return; } if (_us32_ge(m->key_values.deletes,((m->key_values.len >> 1)))) { DenseArray_zeros_to_end(&m->key_values); map_rehash(m); } return; } index += 2U; meta += _const_probe_inc; } } array map_keys(map* m) { array keys = __new_array(m->len, 0, m->key_bytes); u8* item = ((u8*)(keys.data)); if (m->key_values.deletes == 0U) { for (int i = 0; i < m->key_values.len; i++) { { // Unsafe block voidptr pkey = DenseArray_key(&m->key_values, i); m->clone_fn(item, pkey); item = item + m->key_bytes; } } return keys; } for (int i = 0; i < m->key_values.len; i++) { if (!DenseArray_has_index(&m->key_values, i)) { continue; } { // Unsafe block voidptr pkey = DenseArray_key(&m->key_values, i); m->clone_fn(item, pkey); item = item + m->key_bytes; } } return keys; } array map_values(map* m) { array values = __new_array(m->len, 0, m->value_bytes); u8* item = ((u8*)(values.data)); if (m->key_values.deletes == 0U) { vmemcpy(item, m->key_values.values, (int)(m->value_bytes * m->key_values.len)); return values; } for (int i = 0; i < m->key_values.len; i++) { if (!DenseArray_has_index(&m->key_values, i)) { continue; } { // Unsafe block voidptr pvalue = DenseArray_value(&m->key_values, i); vmemcpy(item, pvalue, m->value_bytes); item = item + m->value_bytes; } } return values; } // Attr: [unsafe] VV_LOCAL_SYMBOL DenseArray DenseArray_clone(DenseArray* d) { DenseArray res = ((DenseArray){ .key_bytes = d->key_bytes, .value_bytes = d->value_bytes, .cap = d->cap, .len = d->len, .deletes = d->deletes, .all_deleted = 0, .keys = 0, .values = 0, }); { // Unsafe block if (d->deletes != 0U) { res.all_deleted = memdup(d->all_deleted, d->cap); } res.keys = memdup(d->keys, (int)(d->cap * d->key_bytes)); res.values = memdup(d->values, (int)(d->cap * d->value_bytes)); } return res; } // Attr: [unsafe] map map_clone(map* m) { int metasize = ((int)((u32)(sizeof(u32) * ((u32)((u32)(m->even_index + 2U) + m->extra_metas))))); map res = ((map){ .key_bytes = m->key_bytes, .value_bytes = m->value_bytes, .even_index = m->even_index, .cached_hashbits = m->cached_hashbits, .shift = m->shift, .key_values = DenseArray_clone(&m->key_values), .metas = ((u32*)(malloc_noscan(metasize))), .extra_metas = m->extra_metas, .has_string_keys = m->has_string_keys, .hash_fn = (voidptr)m->hash_fn, .key_eq_fn = (voidptr)m->key_eq_fn, .clone_fn = (voidptr)m->clone_fn, .free_fn = (voidptr)m->free_fn, .len = m->len, }); vmemcpy(res.metas, m->metas, metasize); if (!m->has_string_keys) { return res; } for (int i = 0; i < m->key_values.len; ++i) { if (!DenseArray_has_index(&m->key_values, i)) { continue; } m->clone_fn(DenseArray_key(&res.key_values, i), DenseArray_key(&m->key_values, i)); } return res; } // Attr: [unsafe] void map_free(map* m) { _v_free(m->metas); { // Unsafe block m->metas = ((void*)0); } if (m->key_values.deletes == 0U) { for (int i = 0; i < m->key_values.len; i++) { { // Unsafe block voidptr pkey = DenseArray_key(&m->key_values, i); m->free_fn(pkey); vmemset(pkey, 0, m->key_bytes); } } } else { for (int i = 0; i < m->key_values.len; i++) { if (!DenseArray_has_index(&m->key_values, i)) { continue; } { // Unsafe block voidptr pkey = DenseArray_key(&m->key_values, i); m->free_fn(pkey); vmemset(pkey, 0, m->key_bytes); } } } { // Unsafe block if (m->key_values.all_deleted != ((void*)0)) { _v_free(m->key_values.all_deleted); m->key_values.all_deleted = ((void*)0); } if (m->key_values.keys != ((void*)0)) { _v_free(m->key_values.keys); m->key_values.keys = ((void*)0); } if (m->key_values.values != ((void*)0)) { _v_free(m->key_values.values); m->key_values.values = ((void*)0); } m->hash_fn = (voidptr)((void*)0); m->key_eq_fn = (voidptr)((void*)0); m->clone_fn = (voidptr)((void*)0); m->free_fn = (voidptr)((void*)0); } } // Attr: [unsafe] void IError_free(IError* ie) { { // Unsafe block IError* cie = ((IError*)(ie)); _v_free(cie->_object); } } string IError_str(IError err) { return ((err._typ == _IError_None___index)? (_SLIT("none")) : (err._typ == _IError_Error_index)? (Error_msg(/*rec*/*(err._Error))) : (err._typ == _IError_MessageError_index)? (MessageError_msg(/*rec*/*(err._MessageError))) : ( str_intp(3, _MOV((StrIntpData[]){{_SLIT0, /*115 &string*/0xfe10, {.d_s = charptr_vstring_literal( /* IError */ v_typeof_interface_IError( (err)._typ ))}}, {_SLIT(": "), /*115 &string*/0xfe10, {.d_s = IError_name_table[err._typ]._method_msg(err._object)}}, {_SLIT0, 0, { .d_c = 0 }}})))); } string Error_msg(Error err) { return _SLIT(""); } int Error_code(Error err) { return 0; } string MessageError_msg(MessageError err) { if (err.code > 0) { return str_intp(3, _MOV((StrIntpData[]){{_SLIT0, /*115 &string*/0xfe10, {.d_s = err.msg}}, {_SLIT("; code: "), /*100 &int*/0xfe07, {.d_i32 = err.code}}, {_SLIT0, 0, { .d_c = 0 }}})); } return err.msg; } int MessageError_code(MessageError err) { return err.code; } // Attr: [unsafe] void MessageError_free(MessageError* err) { string_free(&err->msg); } VV_LOCAL_SYMBOL string None___str(None__ _d1) { return _SLIT("none"); } // Attr: [inline] inline IError _v_error(string message) { ; return /*&IError*/I_MessageError_to_Interface_IError(((MessageError*)memdup(&(MessageError){.msg = message,.code = 0,}, sizeof(MessageError)))); } // Attr: [inline] inline IError error_with_code(string message, int code) { ; return /*&IError*/I_MessageError_to_Interface_IError(((MessageError*)memdup(&(MessageError){.msg = message,.code = code,}, sizeof(MessageError)))); } VV_LOCAL_SYMBOL void _option_none(voidptr data, _option* option, int size) { { // Unsafe block *option = ((_option){.state = 2,.err = _const_none__,}); vmemcpy(((u8*)(&option->err)) + sizeof(IError), data, size); } } VV_LOCAL_SYMBOL void _option_ok(voidptr data, _option* option, int size) { { // Unsafe block *option = ((_option){.state = 0,.err = _const_none__,}); vmemcpy(((u8*)(&option->err)) + sizeof(IError), data, size); } } VV_LOCAL_SYMBOL void _result_ok(voidptr data, _result* res, int size) { { // Unsafe block *res = ((_result){.is_error = 0,.err = _const_none__,}); vmemcpy(((u8*)(&res->err)) + sizeof(IError), data, size); } } string none_str(none _d2) { return _SLIT("none"); } // Attr: [unsafe] VV_LOCAL_SYMBOL VMemoryBlock* vmemory_block_new(VMemoryBlock* prev, isize at_least) { VMemoryBlock* v = ((VMemoryBlock*)(calloc(1, sizeof(VMemoryBlock)))); if (prev != 0) { v->id = (int)(prev->id + 1); } v->previous = prev; int block_size = (at_least < _const_prealloc_block_size ? (_const_prealloc_block_size) : (at_least)); v->start = malloc(block_size); v->cap = block_size; v->remaining = block_size; v->current = v->start; return v; } // Attr: [unsafe] VV_LOCAL_SYMBOL u8* vmemory_block_malloc(isize n) { { // Unsafe block if (g_memory_block->remaining < n) { g_memory_block = vmemory_block_new(g_memory_block, n); } u8* res = ((u8*)(0)); res = g_memory_block->current; g_memory_block->remaining -= n; g_memory_block->mallocs++; g_memory_block->current += n; return res; } return 0; } // Attr: [unsafe] VV_LOCAL_SYMBOL void prealloc_vinit(void) { { // Unsafe block g_memory_block = vmemory_block_new(((void*)0), _const_prealloc_block_size); #if !defined(_VFREESTANDING) { atexit((voidptr)prealloc_vcleanup); } #endif } } // Attr: [unsafe] VV_LOCAL_SYMBOL void prealloc_vcleanup(void) { #if defined(CUSTOM_DEFINE_prealloc_stats) { i64 nr_mallocs = ((i64)(0)); VMemoryBlock* mb = g_memory_block; for (;;) { if (!(mb != 0)) break; nr_mallocs += mb->mallocs; eprintln( str_intp(8, _MOV((StrIntpData[]){{_SLIT("> freeing mb.id: "), /*100 &int*/0x6fe27, {.d_i32 = mb->id}}, {_SLIT(" | cap: "), /*100 &isize*/0xefe29, {.d_i64 = mb->cap}}, {_SLIT(" | rem: "), /*100 &isize*/0xefe29, {.d_i64 = mb->remaining}}, {_SLIT(" | start: "), /*112 &voidptr*/0xfe11, {.d_p = (void*)(((voidptr)(mb->start)))}}, {_SLIT(" | current: "), /*112 &voidptr*/0xfe11, {.d_p = (void*)(((voidptr)(mb->current)))}}, {_SLIT(" | diff: "), /*117 &u64*/0xefe28, {.d_u64 = (u64)(((u64)(mb->current)) - ((u64)(mb->start)))}}, {_SLIT(" bytes | mallocs: "), /*100 &int*/0xfe07, {.d_i32 = mb->mallocs}}, {_SLIT0, 0, { .d_c = 0 }}}))); mb = mb->previous; } eprintln( str_intp(2, _MOV((StrIntpData[]){{_SLIT("> nr_mallocs: "), /*100 &i64*/0xfe09, {.d_i64 = nr_mallocs}}, {_SLIT0, 0, { .d_c = 0 }}}))); } #endif { // Unsafe block for (;;) { if (!(g_memory_block != 0)) break; free(g_memory_block->start); g_memory_block = g_memory_block->previous; } } } // Attr: [unsafe] VV_LOCAL_SYMBOL u8* prealloc_malloc(isize n) { return vmemory_block_malloc(n); } // Attr: [unsafe] VV_LOCAL_SYMBOL u8* prealloc_realloc(u8* old_data, isize old_size, isize new_size) { u8* new_ptr = vmemory_block_malloc(new_size); isize min_size = (old_size < new_size ? (old_size) : (new_size)); memcpy(new_ptr, old_data, min_size); return new_ptr; } // Attr: [unsafe] VV_LOCAL_SYMBOL u8* prealloc_calloc(isize n) { u8* new_ptr = vmemory_block_malloc(n); memset(new_ptr, 0, n); return new_ptr; } string rune_str(rune c) { return utf32_to_str(((u32)(c))); } // Attr: [manualfree] string Array_rune_string(Array_rune ra) { strings__Builder sb = strings__new_builder(ra.len); strings__Builder_write_runes(&sb, ra); string res = strings__Builder_str(&sb); strings__Builder_free(&sb); return res; } string rune_repeat(rune c, int count) { if (count < 0) { _v_panic( str_intp(2, _MOV((StrIntpData[]){{_SLIT("rune.repeat: count is negative: "), /*100 &int*/0xfe07, {.d_i32 = count}}, {_SLIT0, 0, { .d_c = 0 }}}))); VUNREACHABLE(); } else if (count == 0) { return _SLIT(""); } else if (count == 1) { return rune_str(c); } Array_fixed_u8_5 buffer = {0, 0, 0, 0, 0}; string res = utf32_to_str_no_malloc(((u32)(c)), &buffer[0]); return string_repeat(res, count); } // Attr: [manualfree] Array_u8 rune_bytes(rune c) { Array_u8 res = __new_array_with_default(0, 5, sizeof(u8), 0); res.len = utf32_decode_to_buffer(((u32)(c)), ((u8*)(res.data))); return res; } int rune_length_in_bytes(rune c) { u32 code = ((u32)(c)); if (code <= 0x7FU) { return 1; } else if (code <= 0x7FFU) { return 2; } else if (0xD800 <= code && code <= 0xDFFFU) { return -1; } else if (code <= 0xFFFFU) { return 3; } else if (code <= 0x10FFFFU) { return 4; } return -1; } VV_LOCAL_SYMBOL SortedMap new_sorted_map(int n, int value_bytes) { return ((SortedMap){.value_bytes = value_bytes,.root = new_node(),.len = 0,}); } VV_LOCAL_SYMBOL SortedMap new_sorted_map_init(int n, int value_bytes, string* keys, voidptr values) { SortedMap out = new_sorted_map(n, value_bytes); for (int i = 0; i < n; ++i) { SortedMap_set(&out, keys[i], ((u8*)(values)) + (int)(i * value_bytes)); } return out; } VV_LOCAL_SYMBOL mapnode* new_node(void) { return ((mapnode*)memdup(&(mapnode){.children = ((void*)0),.len = 0,.keys = {0},.values = {0},}, sizeof(mapnode))); } VV_LOCAL_SYMBOL void SortedMap_set(SortedMap* m, string key, voidptr value) { mapnode* node = m->root; int child_index = 0; mapnode* parent = ((mapnode*)(((void*)0))); for (;;) { if (node->len == _const_max_len) { if (parent == ((void*)0)) { parent = new_node(); m->root = parent; } mapnode_split_child(parent, child_index, node); if (string__eq(key, parent->keys[v_fixed_index(child_index, 11)])) { vmemcpy(parent->values[v_fixed_index(child_index, 11)], value, m->value_bytes); return; } if (string__lt(key, parent->keys[v_fixed_index(child_index, 11)])) { node = ((mapnode*)(parent->children[child_index])); } else { node = ((mapnode*)(parent->children[(int)(child_index + 1)])); } } int i = 0; for (;;) { if (!(i < node->len && string__lt(node->keys[v_fixed_index(i, 11)], key))) break; i++; } if (i != node->len && string__eq(key, node->keys[v_fixed_index(i, 11)])) { vmemcpy(node->values[v_fixed_index(i, 11)], value, m->value_bytes); return; } if (node->children == ((void*)0)) { int j = (int)(node->len - 1); for (;;) { if (!(j >= 0 && string__lt(key, node->keys[v_fixed_index(j, 11)]))) break; node->keys[v_fixed_index((int)(j + 1), 11)] = node->keys[v_fixed_index(j, 11)]; node->values[v_fixed_index((int)(j + 1), 11)] = node->values[v_fixed_index(j, 11)]; j--; } node->keys[v_fixed_index((int)(j + 1), 11)] = key; { // Unsafe block node->values[v_fixed_index((int)(j + 1), 11)] = _v_malloc(m->value_bytes); vmemcpy(node->values[v_fixed_index((int)(j + 1), 11)], value, m->value_bytes); } node->len++; m->len++; return; } parent = node; child_index = i; node = ((mapnode*)(node->children[child_index])); } } VV_LOCAL_SYMBOL void mapnode_split_child(mapnode* n, int child_index, mapnode* y) { mapnode* z = new_node(); z->len = _const_mid_index; y->len = _const_mid_index; for (int j = (int_literal)(_const_mid_index - 1); j >= 0; j--) { z->keys[v_fixed_index(j, 11)] = y->keys[v_fixed_index((int)(j + _const_degree), 11)]; z->values[v_fixed_index(j, 11)] = y->values[v_fixed_index((int)(j + _const_degree), 11)]; } if (y->children != ((void*)0)) { z->children = ((voidptr*)(_v_malloc(((int)(_const_children_bytes))))); for (int jj = (int_literal)(_const_degree - 1); jj >= 0; jj--) { { // Unsafe block z->children[jj] = y->children[(int)(jj + _const_degree)]; } } } { // Unsafe block if (n->children == ((void*)0)) { n->children = ((voidptr*)(_v_malloc(((int)(_const_children_bytes))))); } n->children[(int)(n->len + 1)] = n->children[n->len]; } for (int j = n->len; j > child_index; j--) { n->keys[v_fixed_index(j, 11)] = n->keys[v_fixed_index((int)(j - 1), 11)]; n->values[v_fixed_index(j, 11)] = n->values[v_fixed_index((int)(j - 1), 11)]; { // Unsafe block n->children[j] = n->children[(int)(j - 1)]; } } n->keys[v_fixed_index(child_index, 11)] = y->keys[v_fixed_index(_const_mid_index, 11)]; n->values[v_fixed_index(child_index, 11)] = y->values[v_fixed_index(_const_mid_index, 11)]; { // Unsafe block n->children[child_index] = ((voidptr)(y)); n->children[(int)(child_index + 1)] = ((voidptr)(z)); } n->len++; } VV_LOCAL_SYMBOL bool SortedMap_get(SortedMap m, string key, voidptr out) { mapnode* node = m.root; for (;;) { int i = (int)(node->len - 1); for (;;) { if (!(i >= 0 && string__lt(key, node->keys[v_fixed_index(i, 11)]))) break; i--; } if (i != -1 && string__eq(key, node->keys[v_fixed_index(i, 11)])) { vmemcpy(out, node->values[v_fixed_index(i, 11)], m.value_bytes); return true; } if (node->children == ((void*)0)) { break; } node = ((mapnode*)(node->children[(int)(i + 1)])); } return false; } VV_LOCAL_SYMBOL bool SortedMap_exists(SortedMap m, string key) { if (m.root == ((void*)0)) { return false; } mapnode* node = m.root; for (;;) { int i = (int)(node->len - 1); for (;;) { if (!(i >= 0 && string__lt(key, node->keys[v_fixed_index(i, 11)]))) break; i--; } if (i != -1 && string__eq(key, node->keys[v_fixed_index(i, 11)])) { return true; } if (node->children == ((void*)0)) { break; } node = ((mapnode*)(node->children[(int)(i + 1)])); } return false; } VV_LOCAL_SYMBOL int mapnode_find_key(mapnode* n, string k) { int idx = 0; for (;;) { if (!(idx < n->len && string__lt(n->keys[v_fixed_index(idx, 11)], k))) break; idx++; } return idx; } VV_LOCAL_SYMBOL bool mapnode_remove_key(mapnode* n, string k) { int idx = mapnode_find_key(n, k); if (idx < n->len && string__eq(n->keys[v_fixed_index(idx, 11)], k)) { if (n->children == ((void*)0)) { mapnode_remove_from_leaf(n, idx); } else { mapnode_remove_from_non_leaf(n, idx); } return true; } else { if (n->children == ((void*)0)) { return false; } bool flag = (idx == n->len ? (true) : (false)); if (((mapnode*)(n->children[idx]))->len < _const_degree) { mapnode_fill(n, idx); } mapnode* node = ((mapnode*)(((void*)0))); if (flag && idx > n->len) { node = ((mapnode*)(n->children[(int)(idx - 1)])); } else { node = ((mapnode*)(n->children[idx])); } return mapnode_remove_key(node, k); } return 0; } VV_LOCAL_SYMBOL void mapnode_remove_from_leaf(mapnode* n, int idx) { for (int i = (int)(idx + 1); i < n->len; i++) { n->keys[v_fixed_index((int)(i - 1), 11)] = n->keys[v_fixed_index(i, 11)]; n->values[v_fixed_index((int)(i - 1), 11)] = n->values[v_fixed_index(i, 11)]; } n->len--; } VV_LOCAL_SYMBOL void mapnode_remove_from_non_leaf(mapnode* n, int idx) { string k = n->keys[v_fixed_index(idx, 11)]; if (((mapnode*)(n->children[idx]))->len >= _const_degree) { mapnode* current = ((mapnode*)(n->children[idx])); for (;;) { if (!(current->children != ((void*)0))) break; current = ((mapnode*)(current->children[current->len])); } string predecessor = current->keys[v_fixed_index((int)(current->len - 1), 11)]; n->keys[v_fixed_index(idx, 11)] = predecessor; n->values[v_fixed_index(idx, 11)] = current->values[v_fixed_index((int)(current->len - 1), 11)]; mapnode* node = ((mapnode*)(n->children[idx])); mapnode_remove_key(node, predecessor); } else if (((mapnode*)(n->children[(int)(idx + 1)]))->len >= _const_degree) { mapnode* current = ((mapnode*)(n->children[(int)(idx + 1)])); for (;;) { if (!(current->children != ((void*)0))) break; current = ((mapnode*)(current->children[0])); } string successor = current->keys[0]; n->keys[v_fixed_index(idx, 11)] = successor; n->values[v_fixed_index(idx, 11)] = current->values[0]; mapnode* node = ((mapnode*)(n->children[(int)(idx + 1)])); mapnode_remove_key(node, successor); } else { mapnode_merge(n, idx); mapnode* node = ((mapnode*)(n->children[idx])); mapnode_remove_key(node, k); } } VV_LOCAL_SYMBOL void mapnode_fill(mapnode* n, int idx) { if (idx != 0 && ((mapnode*)(n->children[(int)(idx - 1)]))->len >= _const_degree) { mapnode_borrow_from_prev(n, idx); } else if (idx != n->len && ((mapnode*)(n->children[(int)(idx + 1)]))->len >= _const_degree) { mapnode_borrow_from_next(n, idx); } else if (idx != n->len) { mapnode_merge(n, idx); } else { mapnode_merge(n, (int)(idx - 1)); } } VV_LOCAL_SYMBOL void mapnode_borrow_from_prev(mapnode* n, int idx) { mapnode* child = ((mapnode*)(n->children[idx])); mapnode* sibling = ((mapnode*)(n->children[(int)(idx - 1)])); for (int i = (int)(child->len - 1); i >= 0; i--) { child->keys[v_fixed_index((int)(i + 1), 11)] = child->keys[v_fixed_index(i, 11)]; child->values[v_fixed_index((int)(i + 1), 11)] = child->values[v_fixed_index(i, 11)]; } if (child->children != ((void*)0)) { for (int i = child->len; i >= 0; i--) { { // Unsafe block child->children[(int)(i + 1)] = child->children[i]; } } } child->keys[0] = n->keys[v_fixed_index((int)(idx - 1), 11)]; child->values[0] = n->values[v_fixed_index((int)(idx - 1), 11)]; if (child->children != ((void*)0)) { { // Unsafe block child->children[0] = sibling->children[sibling->len]; } } n->keys[v_fixed_index((int)(idx - 1), 11)] = sibling->keys[v_fixed_index((int)(sibling->len - 1), 11)]; n->values[v_fixed_index((int)(idx - 1), 11)] = sibling->values[v_fixed_index((int)(sibling->len - 1), 11)]; child->len++; sibling->len--; } VV_LOCAL_SYMBOL void mapnode_borrow_from_next(mapnode* n, int idx) { mapnode* child = ((mapnode*)(n->children[idx])); mapnode* sibling = ((mapnode*)(n->children[(int)(idx + 1)])); child->keys[v_fixed_index(child->len, 11)] = n->keys[v_fixed_index(idx, 11)]; child->values[v_fixed_index(child->len, 11)] = n->values[v_fixed_index(idx, 11)]; if (child->children != ((void*)0)) { { // Unsafe block child->children[(int)(child->len + 1)] = sibling->children[0]; } } n->keys[v_fixed_index(idx, 11)] = sibling->keys[0]; n->values[v_fixed_index(idx, 11)] = sibling->values[0]; for (int i = 1; i < sibling->len; i++) { sibling->keys[v_fixed_index((int)(i - 1), 11)] = sibling->keys[v_fixed_index(i, 11)]; sibling->values[v_fixed_index((int)(i - 1), 11)] = sibling->values[v_fixed_index(i, 11)]; } if (sibling->children != ((void*)0)) { for (int i = 1; i <= sibling->len; i++) { { // Unsafe block sibling->children[(int)(i - 1)] = sibling->children[i]; } } } child->len++; sibling->len--; } VV_LOCAL_SYMBOL void mapnode_merge(mapnode* n, int idx) { mapnode* child = ((mapnode*)(n->children[idx])); mapnode* sibling = ((mapnode*)(n->children[(int)(idx + 1)])); child->keys[v_fixed_index(_const_mid_index, 11)] = n->keys[v_fixed_index(idx, 11)]; child->values[v_fixed_index(_const_mid_index, 11)] = n->values[v_fixed_index(idx, 11)]; for (int i = 0; i < sibling->len; ++i) { child->keys[v_fixed_index((int_literal)(i + _const_degree), 11)] = sibling->keys[v_fixed_index(i, 11)]; child->values[v_fixed_index((int_literal)(i + _const_degree), 11)] = sibling->values[v_fixed_index(i, 11)]; } if (child->children != ((void*)0)) { for (int i = 0; i <= sibling->len; i++) { { // Unsafe block child->children[(int)(i + _const_degree)] = sibling->children[i]; } } } for (int i = (int)(idx + 1); i < n->len; i++) { n->keys[v_fixed_index((int)(i - 1), 11)] = n->keys[v_fixed_index(i, 11)]; n->values[v_fixed_index((int)(i - 1), 11)] = n->values[v_fixed_index(i, 11)]; } for (int i = (int)(idx + 2); i <= n->len; i++) { { // Unsafe block n->children[(int)(i - 1)] = n->children[i]; } } child->len += (int)(sibling->len + 1); n->len--; } void SortedMap_delete(SortedMap* m, string key) { if (m->root->len == 0) { return; } bool removed = mapnode_remove_key(m->root, key); if (removed) { m->len--; } if (m->root->len == 0) { if (m->root->children == ((void*)0)) { return; } else { m->root = ((mapnode*)(m->root->children[0])); } } } VV_LOCAL_SYMBOL int mapnode_subkeys(mapnode* n, Array_string* keys, int at) { int position = at; if (n->children != ((void*)0)) { for (int i = 0; i < n->len; ++i) { mapnode* child = ((mapnode*)(n->children[i])); position += mapnode_subkeys(child, keys, position); array_set(keys, position, &(string[]) { n->keys[v_fixed_index(i, 11)] }); position++; } mapnode* child = ((mapnode*)(n->children[n->len])); position += mapnode_subkeys(child, keys, position); } else { for (int i = 0; i < n->len; ++i) { array_set(keys, (int)(position + i), &(string[]) { n->keys[v_fixed_index(i, 11)] }); } position += n->len; } return (int)(position - at); } Array_string SortedMap_keys(SortedMap* m) { Array_string keys = __new_array_with_default(m->len, 0, sizeof(string), &(string[]){_SLIT("")}); if (m->root == ((void*)0) || m->root->len == 0) { return keys; } mapnode_subkeys(m->root, &/*arr*/keys, 0); return keys; } VV_LOCAL_SYMBOL void mapnode_free(mapnode* n) { println(_SLIT("TODO")); } void SortedMap_free(SortedMap* m) { if (m->root == ((void*)0)) { return; } mapnode_free(m->root); } void SortedMap_print(SortedMap m) { println(_SLIT("TODO")); } // Attr: [direct_array_access] Array_rune string_runes(string s) { Array_rune runes = __new_array_with_default(0, s.len, sizeof(rune), 0); for (int i = 0; i < s.len; i++) { int char_len = utf8_char_len(s.str[i]); if (char_len > 1) { int end = ((int)(s.len - 1) >= (int)(i + char_len) ? ((int)(i + char_len)) : (s.len)); string r = string_substr(s, i, end); array_push((array*)&runes, _MOV((rune[]){ string_utf32_code(r) })); i += (int)(char_len - 1); } else { array_push((array*)&runes, _MOV((rune[]){ s.str[i] })); } } return runes; } // Attr: [unsafe] string cstring_to_vstring(char* s) { return string_clone(tos2(((u8*)(s)))); } // Attr: [unsafe] string tos_clone(u8* s) { return string_clone(tos2(s)); } // Attr: [unsafe] string tos(u8* s, int len) { if (s == 0) { _v_panic(_SLIT("tos(): nil string")); VUNREACHABLE(); } return ((string){.str = s, .len = len}); } // Attr: [unsafe] string tos2(u8* s) { if (s == 0) { _v_panic(_SLIT("tos2: nil string")); VUNREACHABLE(); } return ((string){.str = s, .len = vstrlen(s)}); } // Attr: [unsafe] string tos3(char* s) { if (s == 0) { _v_panic(_SLIT("tos3: nil string")); VUNREACHABLE(); } return ((string){.str = ((u8*)(s)), .len = vstrlen_char(s)}); } // Attr: [unsafe] string tos4(u8* s) { if (s == 0) { return _SLIT(""); } return ((string){.str = s, .len = vstrlen(s)}); } // Attr: [unsafe] string tos5(char* s) { if (s == 0) { return _SLIT(""); } return ((string){.str = ((u8*)(s)), .len = vstrlen_char(s)}); } // Attr: [unsafe] string u8_vstring(u8* bp) { return ((string){.str = bp, .len = vstrlen(bp)}); } // Attr: [unsafe] string u8_vstring_with_len(u8* bp, int len) { return ((string){.str = bp, .len = len, .is_lit = 0}); } // Attr: [unsafe] string char_vstring(char* cp) { return ((string){.str = ((u8*)(cp)), .len = vstrlen_char(cp), .is_lit = 0}); } // Attr: [unsafe] string char_vstring_with_len(char* cp, int len) { return ((string){.str = ((u8*)(cp)), .len = len, .is_lit = 0}); } // Attr: [unsafe] string u8_vstring_literal(u8* bp) { return ((string){.str = bp, .len = vstrlen(bp), .is_lit = 1}); } // Attr: [unsafe] string u8_vstring_literal_with_len(u8* bp, int len) { return ((string){.str = bp, .len = len, .is_lit = 1}); } // Attr: [unsafe] string char_vstring_literal(char* cp) { return ((string){.str = ((u8*)(cp)), .len = vstrlen_char(cp), .is_lit = 1}); } // Attr: [unsafe] string char_vstring_literal_with_len(char* cp, int len) { return ((string){.str = ((u8*)(cp)), .len = len, .is_lit = 1}); } int string_len_utf8(string s) { int l = 0; int i = 0; for (;;) { if (!(i < s.len)) break; l++; i += (int_literal)(((((0xe5000000 >> ((((s.str[i] >> 3)) & 0x1e)))) & 3)) + 1); } return l; } // Attr: [inline] inline VV_LOCAL_SYMBOL string string_clone_static(string a) { return string_clone(a); } string string_clone(string a) { if (a.len == 0) { return _SLIT(""); } string b = ((string){.str = malloc_noscan((int)(a.len + 1)), .len = a.len}); { // Unsafe block vmemcpy(b.str, a.str, a.len); b.str[a.len] = 0; } return b; } string string_replace_once(string s, string rep, string with) { int idx = string_index_(s, rep); if (idx == -1) { return string_clone(s); } return string__plus(string__plus(string_substr(s, 0, idx), with), string_substr(s, (int)(idx + rep.len), s.len)); } // Attr: [direct_array_access] string string_replace(string s, string rep, string with) { bool string_replace_defer_0 = false; Array_int idxs; if (s.len == 0 || rep.len == 0 || rep.len > s.len) { return string_clone(s); } if (!string_contains(s, rep)) { return string_clone(s); } idxs = __new_array_with_default(0, (int)(s.len / rep.len), sizeof(int), 0); string_replace_defer_0 = true; int idx = 0; for (;;) { idx = string_index_after(s, rep, idx); if (idx == -1) { break; } array_push((array*)&idxs, _MOV((int[]){ idx })); idx += rep.len; } if (idxs.len == 0) { string _t4 = string_clone(s); // Defer begin if (string_replace_defer_0) { array_free(&idxs); } // Defer end return _t4; } int new_len = (int)(s.len + (int)(idxs.len * ((int)(with.len - rep.len)))); u8* b = malloc_noscan((int)(new_len + 1)); int b_i = 0; int s_idx = 0; for (int _t5 = 0; _t5 < idxs.len; ++_t5) { int rep_pos = ((int*)idxs.data)[_t5]; for (int i = s_idx; i < rep_pos; ++i) { { // Unsafe block b[b_i] = s.str[ i]; } b_i++; } s_idx = (int)(rep_pos + rep.len); for (int i = 0; i < with.len; ++i) { { // Unsafe block b[b_i] = with.str[ i]; } b_i++; } } if (s_idx < s.len) { for (int i = s_idx; i < s.len; ++i) { { // Unsafe block b[b_i] = s.str[ i]; } b_i++; } } { // Unsafe block b[new_len] = 0; string _t6 = tos(b, new_len); // Defer begin if (string_replace_defer_0) { array_free(&idxs); } // Defer end return _t6; } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] string string_replace_each(string s, Array_string vals) { if (s.len == 0 || vals.len == 0) { return string_clone(s); } if ((int)(vals.len % 2) != 0) { eprintln(_SLIT("string.replace_each(): odd number of strings")); return string_clone(s); } int new_len = s.len; Array_RepIndex idxs = __new_array_with_default(0, 6, sizeof(RepIndex), 0); int idx = 0; string s_ = string_clone(s); for (int rep_i = 0; rep_i < vals.len; rep_i += 2) { string rep = ((string*)vals.data)[rep_i]; string with = ((string*)vals.data)[(int)(rep_i + 1)]; for (;;) { idx = string_index_after(s_, rep, idx); if (idx == -1) { break; } for (int i = 0; i < rep.len; ++i) { { // Unsafe block s_.str[(int)(idx + i)] = 127; } } array_push((array*)&idxs, _MOV((RepIndex[]){ ((RepIndex){.idx = idx,.val_idx = rep_i,}) })); idx += rep.len; new_len += (int)(with.len - rep.len); } } if (idxs.len == 0) { return string_clone(s); } qsort(idxs.data, idxs.len, idxs.element_size, (int (*)(const void *, const void *))&compare_2018276881664952276_RepIndex_by_idx); u8* b = malloc_noscan((int)(new_len + 1)); int idx_pos = 0; RepIndex cur_idx = ((RepIndex*)idxs.data)[idx_pos]; int b_i = 0; for (int i = 0; i < s.len; i++) { if (i == cur_idx.idx) { string rep = ((string*)vals.data)[cur_idx.val_idx]; string with = ((string*)vals.data)[(int)(cur_idx.val_idx + 1)]; for (int j = 0; j < with.len; ++j) { { // Unsafe block b[b_i] = with.str[ j]; } b_i++; } i += (int)(rep.len - 1); idx_pos++; if (idx_pos < idxs.len) { cur_idx = ((RepIndex*)idxs.data)[idx_pos]; } } else { { // Unsafe block b[b_i] = s.str[i]; } b_i++; } } { // Unsafe block b[new_len] = 0; return tos(b, new_len); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] string string_replace_char(string s, u8 rep, u8 with, int repeat) { bool string_replace_char_defer_0 = false; Array_int idxs; #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (repeat <= 0) { _v_panic(_SLIT("string.replace_char(): tab length too short")); VUNREACHABLE(); } } #endif if (s.len == 0) { return string_clone(s); } idxs = __new_array_with_default(0, s.len, sizeof(int), 0); string_replace_char_defer_0 = true; for (int i = 0; i < s.len; ++i) { u8 ch = s.str[i]; if (ch == rep) { array_push((array*)&idxs, _MOV((int[]){ i })); } } if (idxs.len == 0) { string _t4 = string_clone(s); // Defer begin if (string_replace_char_defer_0) { array_free(&idxs); } // Defer end return _t4; } int new_len = (int)(s.len + (int)(idxs.len * ((int)(repeat - 1)))); u8* b = malloc_noscan((int)(new_len + 1)); int b_i = 0; int s_idx = 0; for (int _t5 = 0; _t5 < idxs.len; ++_t5) { int rep_pos = ((int*)idxs.data)[_t5]; for (int i = s_idx; i < rep_pos; ++i) { { // Unsafe block b[b_i] = s.str[ i]; } b_i++; } s_idx = (int)(rep_pos + 1); for (int _t6 = 0; _t6 < repeat; ++_t6) { { // Unsafe block b[b_i] = with; } b_i++; } } if (s_idx < s.len) { for (int i = s_idx; i < s.len; ++i) { { // Unsafe block b[b_i] = s.str[ i]; } b_i++; } } { // Unsafe block b[new_len] = 0; string _t7 = tos(b, new_len); // Defer begin if (string_replace_char_defer_0) { array_free(&idxs); } // Defer end return _t7; } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [inline] inline string string_normalize_tabs(string s, int tab_len) { return string_replace_char(s, '\t', ' ', tab_len); } // Attr: [inline] inline bool string_bool(string s) { return string__eq(s, _SLIT("true")) || string__eq(s, _SLIT("t")); } // Attr: [inline] inline int string_int(string s) { _result_i64 _t2 = strconv__common_parse_int(s, 0, 32, false, false); if (_t2.is_error) { IError err = _t2.err; *(i64*) _t2.data = 0; } return ((int)( (*(i64*)_t2.data))); } // Attr: [inline] inline i64 string_i64(string s) { _result_i64 _t2 = strconv__common_parse_int(s, 0, 64, false, false); if (_t2.is_error) { IError err = _t2.err; *(i64*) _t2.data = 0; } return (*(i64*)_t2.data); } // Attr: [inline] inline i8 string_i8(string s) { _result_i64 _t2 = strconv__common_parse_int(s, 0, 8, false, false); if (_t2.is_error) { IError err = _t2.err; *(i64*) _t2.data = 0; } return ((i8)( (*(i64*)_t2.data))); } // Attr: [inline] inline i16 string_i16(string s) { _result_i64 _t2 = strconv__common_parse_int(s, 0, 16, false, false); if (_t2.is_error) { IError err = _t2.err; *(i64*) _t2.data = 0; } return ((i16)( (*(i64*)_t2.data))); } // Attr: [inline] inline f32 string_f32(string s) { _result_f64 _t2 = strconv__atof64(s); if (_t2.is_error) { IError err = _t2.err; *(f64*) _t2.data = 0; } return ((f32)( (*(f64*)_t2.data))); } // Attr: [inline] inline f64 string_f64(string s) { _result_f64 _t2 = strconv__atof64(s); if (_t2.is_error) { IError err = _t2.err; *(f64*) _t2.data = 0; } return (*(f64*)_t2.data); } // Attr: [inline] inline u8 string_u8(string s) { _result_u64 _t2 = strconv__common_parse_uint(s, 0, 8, false, false); if (_t2.is_error) { IError err = _t2.err; *(u64*) _t2.data = 0U; } return ((u8)( (*(u64*)_t2.data))); } // Attr: [inline] inline u16 string_u16(string s) { _result_u64 _t2 = strconv__common_parse_uint(s, 0, 16, false, false); if (_t2.is_error) { IError err = _t2.err; *(u64*) _t2.data = 0U; } return ((u16)( (*(u64*)_t2.data))); } // Attr: [inline] inline u32 string_u32(string s) { _result_u64 _t2 = strconv__common_parse_uint(s, 0, 32, false, false); if (_t2.is_error) { IError err = _t2.err; *(u64*) _t2.data = 0U; } return ((u32)( (*(u64*)_t2.data))); } // Attr: [inline] inline u64 string_u64(string s) { _result_u64 _t2 = strconv__common_parse_uint(s, 0, 64, false, false); if (_t2.is_error) { IError err = _t2.err; *(u64*) _t2.data = 0U; } return (*(u64*)_t2.data); } // Attr: [inline] inline _result_u64 string_parse_uint(string s, int _base, int _bit_size) { _result_u64 _t1 = strconv__parse_uint(s, _base, _bit_size); return _t1; } // Attr: [inline] inline _result_i64 string_parse_int(string s, int _base, int _bit_size) { _result_i64 _t1 = strconv__parse_int(s, _base, _bit_size); return _t1; } // Attr: [direct_array_access] VV_LOCAL_SYMBOL bool string__eq(string s, string a) { if (s.str == 0) { _v_panic(_SLIT("string.eq(): nil string")); VUNREACHABLE(); } if (s.len != a.len) { return false; } if (s.len > 0) { int last_idx = (int)(s.len - 1); if (s.str[ last_idx] != a.str[ last_idx]) { return false; } } { // Unsafe block return vmemcmp(s.str, a.str, a.len) == 0; } return 0; } // Attr: [direct_array_access] int string_compare(string s, string a) { int min_len = (s.len < a.len ? (s.len) : (a.len)); for (int i = 0; i < min_len; ++i) { if (s.str[ i] < a.str[ i]) { return -1; } if (s.str[ i] > a.str[ i]) { return 1; } } if (s.len < a.len) { return -1; } if (s.len > a.len) { return 1; } return 0; } // Attr: [direct_array_access] VV_LOCAL_SYMBOL bool string__lt(string s, string a) { for (int i = 0; i < s.len; ++i) { if (i >= a.len || s.str[ i] > a.str[ i]) { return false; } else if (s.str[ i] < a.str[ i]) { return true; } } if (s.len < a.len) { return true; } return false; } // Attr: [direct_array_access] VV_LOCAL_SYMBOL string string__plus(string s, string a) { int new_len = (int)(a.len + s.len); string res = ((string){.str = malloc_noscan((int)(new_len + 1)), .len = new_len}); { // Unsafe block vmemcpy(res.str, s.str, s.len); vmemcpy(res.str + s.len, a.str, a.len); } { // Unsafe block res.str[new_len] = 0; } return res; } // Attr: [direct_array_access] Array_string string_split_any(string s, string delim) { Array_string res = __new_array_with_default(0, 0, sizeof(string), 0); int i = 0; if (s.len > 0) { if (delim.len <= 0) { return string_split(s, _SLIT("")); } for (int index = 0; index < s.len; ++index) { u8 ch = s.str[index]; for (int _t2 = 0; _t2 < delim.len; ++_t2) { u8 delim_ch = delim.str[_t2]; if (ch == delim_ch) { array_push((array*)&res, _MOV((string[]){ string_substr(s, i, index) })); i = (int)(index + 1); break; } } } if (i < s.len) { array_push((array*)&res, _MOV((string[]){ string_substr(s, i, (s).len) })); } } return res; } // Attr: [direct_array_access] Array_string string_rsplit_any(string s, string delim) { Array_string res = __new_array_with_default(0, 0, sizeof(string), 0); int i = (int)(s.len - 1); if (s.len > 0) { if (delim.len <= 0) { return string_rsplit(s, _SLIT("")); } int rbound = s.len; for (;;) { if (!(i >= 0)) break; for (int _t2 = 0; _t2 < delim.len; ++_t2) { u8 delim_ch = delim.str[_t2]; if (s.str[ i] == delim_ch) { array_push((array*)&res, _MOV((string[]){ string_substr(s, (int)(i + 1), rbound) })); rbound = i; break; } } i--; } if (rbound > 0) { array_push((array*)&res, _MOV((string[]){ string_substr(s, 0, rbound) })); } } return res; } // Attr: [inline] inline Array_string string_split(string s, string delim) { return string_split_nth(s, delim, 0); } // Attr: [inline] inline Array_string string_rsplit(string s, string delim) { return string_rsplit_nth(s, delim, 0); } _option_multi_return_string_string string_split_once(string s, string delim) { Array_string result = string_split_nth(s, delim, 2); if (result.len != 2) { _option_multi_return_string_string _t1 = (_option_multi_return_string_string){ .state=2, .err=_const_none__, .data={EMPTY_STRUCT_INITIALIZATION} }; return _t1; } _option_multi_return_string_string _t2; _option_ok(&(multi_return_string_string[]) { (multi_return_string_string){.arg0=(*(string*)array_get(result, 0)), .arg1=(*(string*)array_get(result, 1))} }, (_option*)(&_t2), sizeof(multi_return_string_string)); return _t2; } _option_multi_return_string_string string_rsplit_once(string s, string delim) { Array_string result = string_rsplit_nth(s, delim, 2); if (result.len != 2) { _option_multi_return_string_string _t1 = (_option_multi_return_string_string){ .state=2, .err=_const_none__, .data={EMPTY_STRUCT_INITIALIZATION} }; return _t1; } _option_multi_return_string_string _t2; _option_ok(&(multi_return_string_string[]) { (multi_return_string_string){.arg0=(*(string*)array_get(result, 1)), .arg1=(*(string*)array_get(result, 0))} }, (_option*)(&_t2), sizeof(multi_return_string_string)); return _t2; } // Attr: [direct_array_access] Array_string string_split_nth(string s, string delim, int nth) { Array_string res = __new_array_with_default(0, 0, sizeof(string), 0); int i = 0; switch (delim.len) { case 0: { i = 1; for (int _t1 = 0; _t1 < s.len; ++_t1) { u8 ch = s.str[_t1]; if (nth > 0 && i >= nth) { array_push((array*)&res, _MOV((string[]){ string_substr(s, (int)(i - 1), (s).len) })); break; } array_push((array*)&res, _MOV((string[]){ u8_ascii_str(ch) })); i++; } return res; } case 1: { int start = 0; u8 delim_byte = delim.str[ 0]; for (;;) { if (!(i < s.len)) break; if (s.str[ i] == delim_byte) { bool was_last = nth > 0 && res.len == (int)(nth - 1); if (was_last) { break; } string val = string_substr(s, start, i); array_push((array*)&res, _MOV((string[]){ val })); start = (int)(i + delim.len); i = start; } else { i++; } } if (nth < 1 || res.len < nth) { array_push((array*)&res, _MOV((string[]){ string_substr(s, start, (s).len) })); } return res; } default: { int start = 0; for (;;) { if (!(i <= s.len)) break; bool is_delim = (int)(i + delim.len) <= s.len && string__eq(string_substr(s, i, (int)(i + delim.len)), delim); if (is_delim) { bool was_last = nth > 0 && res.len == (int)(nth - 1); if (was_last) { break; } string val = string_substr(s, start, i); array_push((array*)&res, _MOV((string[]){ val })); start = (int)(i + delim.len); i = start; } else { i++; } } if (nth < 1 || res.len < nth) { array_push((array*)&res, _MOV((string[]){ string_substr(s, start, (s).len) })); } return res; } } return __new_array(0, 0, sizeof(string)); } // Attr: [direct_array_access] Array_string string_rsplit_nth(string s, string delim, int nth) { Array_string res = __new_array_with_default(0, 0, sizeof(string), 0); int i = (int)(s.len - 1); switch (delim.len) { case 0: { for (;;) { if (!(i >= 0)) break; if (nth > 0 && res.len == (int)(nth - 1)) { array_push((array*)&res, _MOV((string[]){ string_substr(s, 0, (int)(i + 1)) })); break; } array_push((array*)&res, _MOV((string[]){ u8_ascii_str(s.str[ i]) })); i--; } return res; } case 1: { int rbound = s.len; u8 delim_byte = delim.str[ 0]; for (;;) { if (!(i >= 0)) break; if (s.str[ i] == delim_byte) { if (nth > 0 && res.len == (int)(nth - 1)) { break; } array_push((array*)&res, _MOV((string[]){ string_substr(s, (int)(i + 1), rbound) })); rbound = i; i--; } else { i--; } } if (nth < 1 || res.len < nth) { array_push((array*)&res, _MOV((string[]){ string_substr(s, 0, rbound) })); } return res; } default: { int rbound = s.len; for (;;) { if (!(i >= 0)) break; bool is_delim = (int)(i - delim.len) >= 0 && string__eq(string_substr(s, (int)(i - delim.len), i), delim); if (is_delim) { if (nth > 0 && res.len == (int)(nth - 1)) { break; } array_push((array*)&res, _MOV((string[]){ string_substr(s, i, rbound) })); rbound = (int)(i - delim.len); i -= delim.len; } else { i--; } } if (nth < 1 || res.len < nth) { array_push((array*)&res, _MOV((string[]){ string_substr(s, 0, rbound) })); } return res; } } return __new_array(0, 0, sizeof(string)); } // Attr: [direct_array_access] Array_string string_split_into_lines(string s) { Array_string res = __new_array_with_default(0, 0, sizeof(string), 0); if (s.len == 0) { return res; } rune cr = '\r'; rune lf = '\n'; int line_start = 0; for (int i = 0; i < s.len; i++) { if (line_start <= i) { if (s.str[ i] == lf) { array_push((array*)&res, _MOV((string[]){ (line_start == i ? (_SLIT("")) : (string_substr(s, line_start, i))) })); line_start = (int)(i + 1); } else if (s.str[ i] == cr) { array_push((array*)&res, _MOV((string[]){ (line_start == i ? (_SLIT("")) : (string_substr(s, line_start, i))) })); if (((int)(i + 1)) < s.len && s.str[ (int)(i + 1)] == lf) { line_start = (int)(i + 2); } else { line_start = (int)(i + 1); } } } } if (line_start < s.len) { array_push((array*)&res, _MOV((string[]){ string_substr(s, line_start, (s).len) })); } return res; } // Attr: [inline] inline VV_LOCAL_SYMBOL string string_substr2(string s, int start, int _end, bool end_max) { int end = (end_max ? (s.len) : (_end)); return string_substr(s, start, end); } // Attr: [direct_array_access] string string_substr(string s, int start, int end) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (start > end || start > s.len || end > s.len || start < 0 || end < 0) { _v_panic( str_intp(4, _MOV((StrIntpData[]){{_SLIT("substr("), /*100 &int*/0xfe07, {.d_i32 = start}}, {_SLIT(", "), /*100 &int*/0xfe07, {.d_i32 = end}}, {_SLIT(") out of bounds (len="), /*100 &int*/0xfe07, {.d_i32 = s.len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif int len = (int)(end - start); if (len == s.len) { return string_clone(s); } string res = ((string){.str = malloc_noscan((int)(len + 1)), .len = len}); { // Unsafe block vmemcpy(res.str, s.str + start, len); res.str[len] = 0; } return res; } // Attr: [direct_array_access] _result_string string_substr_with_check(string s, int start, int end) { if (start > end || start > s.len || end > s.len || start < 0 || end < 0) { return (_result_string){ .is_error=true, .err=_v_error( str_intp(4, _MOV((StrIntpData[]){{_SLIT("substr("), /*100 &int*/0xfe07, {.d_i32 = start}}, {_SLIT(", "), /*100 &int*/0xfe07, {.d_i32 = end}}, {_SLIT(") out of bounds (len="), /*100 &int*/0xfe07, {.d_i32 = s.len}}, {_SLIT(")"), 0, { .d_c = 0 }}}))), .data={EMPTY_STRUCT_INITIALIZATION} }; } int len = (int)(end - start); if (len == s.len) { _result_string _t2; _result_ok(&(string[]) { string_clone(s) }, (_result*)(&_t2), sizeof(string)); return _t2; } string res = ((string){.str = malloc_noscan((int)(len + 1)), .len = len}); { // Unsafe block vmemcpy(res.str, s.str + start, len); res.str[len] = 0; } _result_string _t3; _result_ok(&(string[]) { res }, (_result*)(&_t3), sizeof(string)); return _t3; } // Attr: [direct_array_access] string string_substr_ni(string s, int _start, int _end) { int start = _start; int end = _end; if (start < 0) { start = (int)(s.len + start); if (start < 0) { start = 0; } } if (end < 0) { end = (int)(s.len + end); if (end < 0) { end = 0; } } if (end >= s.len) { end = s.len; } if (start > s.len || end < start) { return _SLIT(""); } int len = (int)(end - start); string res = ((string){.str = malloc_noscan((int)(len + 1)), .len = len}); { // Unsafe block vmemcpy(res.str, s.str + start, len); res.str[len] = 0; } return res; } // Attr: [direct_array_access] VV_LOCAL_SYMBOL int string_index_(string s, string p) { if (p.len > s.len || p.len == 0) { return -1; } if (p.len > 2) { return string_index_kmp(s, p); } int i = 0; for (;;) { if (!(i < s.len)) break; int j = 0; for (;;) { if (!(j < p.len && s.str[(int)(i + j)] == p.str[j])) break; j++; } if (j == p.len) { return i; } i++; } return -1; } _option_int string_index(string s, string p) { int idx = string_index_(s, p); if (idx == -1) { return (_option_int){ .state=2, .err=_const_none__, .data={EMPTY_STRUCT_INITIALIZATION} }; } _option_int _t2; _option_ok(&(int[]) { idx }, (_option*)(&_t2), sizeof(int)); return _t2; } // Attr: [direct_array_access] // Attr: [manualfree] VV_LOCAL_SYMBOL int string_index_kmp(string s, string p) { bool string_index_kmp_defer_0 = false; Array_int prefix; if (p.len > s.len) { return -1; } prefix = __new_array_with_default(p.len, 0, sizeof(int), 0); string_index_kmp_defer_0 = true; int j = 0; for (int i = 1; i < p.len; i++) { for (;;) { if (!(p.str[j] != p.str[i] && j > 0)) break; j = ((int*)prefix.data)[(int)(j - 1)]; } if (p.str[j] == p.str[i]) { j++; } ((int*)prefix.data)[i] = j; } j = 0; for (int i = 0; i < s.len; ++i) { for (;;) { if (!(p.str[j] != s.str[i] && j > 0)) break; j = ((int*)prefix.data)[(int)(j - 1)]; } if (p.str[j] == s.str[i]) { j++; } if (j == p.len) { int _t2 = (int)((int)(i - p.len) + 1); // Defer begin if (string_index_kmp_defer_0) { array_free(&prefix); } // Defer end return _t2; } } int _t3 = -1; // Defer begin if (string_index_kmp_defer_0) { array_free(&prefix); } // Defer end return _t3; } int string_index_any(string s, string chars) { for (int i = 0; i < s.len; ++i) { u8 ss = s.str[i]; for (int _t1 = 0; _t1 < chars.len; ++_t1) { u8 c = chars.str[_t1]; if (c == ss) { return i; } } } return -1; } // Attr: [direct_array_access] VV_LOCAL_SYMBOL int string_last_index_(string s, string p) { if (p.len > s.len || p.len == 0) { return -1; } int i = (int)(s.len - p.len); for (;;) { if (!(i >= 0)) break; int j = 0; for (;;) { if (!(j < p.len && s.str[(int)(i + j)] == p.str[j])) break; j++; } if (j == p.len) { return i; } i--; } return -1; } _option_int string_last_index(string s, string p) { int idx = string_last_index_(s, p); if (idx == -1) { return (_option_int){ .state=2, .err=_const_none__, .data={EMPTY_STRUCT_INITIALIZATION} }; } _option_int _t2; _option_ok(&(int[]) { idx }, (_option*)(&_t2), sizeof(int)); return _t2; } // Attr: [direct_array_access] int string_index_after(string s, string p, int start) { if (p.len > s.len) { return -1; } int strt = start; if (start < 0) { strt = 0; } if (start >= s.len) { return -1; } int i = strt; for (;;) { if (!(i < s.len)) break; int j = 0; int ii = i; for (;;) { if (!(j < p.len && s.str[ii] == p.str[j])) break; j++; ii++; } if (j == p.len) { return i; } i++; } return -1; } // Attr: [direct_array_access] int string_index_u8(string s, u8 c) { for (int i = 0; i < s.len; ++i) { u8 b = s.str[i]; if (b == c) { return i; } } return -1; } // Attr: [direct_array_access] int string_last_index_u8(string s, u8 c) { for (int i = (int)(s.len - 1); i >= 0; i--) { if (s.str[i] == c) { return i; } } return -1; } // Attr: [direct_array_access] int string_count(string s, string substr) { if (s.len == 0 || substr.len == 0) { return 0; } if (substr.len > s.len) { return 0; } int n = 0; if (substr.len == 1) { u8 target = substr.str[ 0]; for (int _t3 = 0; _t3 < s.len; ++_t3) { u8 letter = s.str[_t3]; if (letter == target) { n++; } } return n; } int i = 0; for (;;) { i = string_index_after(s, substr, i); if (i == -1) { return n; } i += substr.len; n++; } return 0; } bool string_contains_u8(string s, u8 x) { for (int _t1 = 0; _t1 < s.len; ++_t1) { u8 c = s.str[_t1]; if (x == c) { return true; } } return false; } bool string_contains(string s, string substr) { if (substr.len == 0) { return true; } if (substr.len == 1) { return string_contains_u8(s, substr.str[0]); } return string_index_(s, substr) != -1; } bool string_contains_any(string s, string chars) { for (int _t1 = 0; _t1 < chars.len; ++_t1) { u8 c = chars.str[_t1]; if (string_contains_u8(s, c)) { return true; } } return false; } bool string_contains_only(string s, string chars) { if (chars.len == 0) { return false; } for (int _t2 = 0; _t2 < s.len; ++_t2) { u8 ch = s.str[_t2]; int res = 0; for (int i = 0; i < chars.len && res == 0; i++) { res += (int[]){(ch == chars.str[i])?1:0}[0]; } if (res == 0) { return false; } } return true; } bool string_contains_any_substr(string s, Array_string substrs) { if (substrs.len == 0) { return true; } for (int _t2 = 0; _t2 < substrs.len; ++_t2) { string sub = ((string*)substrs.data)[_t2]; if (string_contains(s, sub)) { return true; } } return false; } // Attr: [direct_array_access] bool string_starts_with(string s, string p) { if (p.len > s.len) { return false; } for (int i = 0; i < p.len; ++i) { if (s.str[i] != p.str[i]) { return false; } } return true; } // Attr: [direct_array_access] bool string_ends_with(string s, string p) { if (p.len > s.len) { return false; } for (int i = 0; i < p.len; ++i) { if (p.str[i] != s.str[(int)((int)(s.len - p.len) + i)]) { return false; } } return true; } // Attr: [direct_array_access] string string_to_lower(string s) { { // Unsafe block u8* b = malloc_noscan((int)(s.len + 1)); for (int i = 0; i < s.len; ++i) { if (s.str[i] >= 'A' && s.str[i] <= 'Z') { b[i] = (u8)(s.str[i] + 32); } else { b[i] = s.str[i]; } } b[s.len] = 0; return tos(b, s.len); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] bool string_is_lower(string s) { for (int i = 0; i < s.len; ++i) { if (s.str[ i] >= 'A' && s.str[ i] <= 'Z') { return false; } } return true; } // Attr: [direct_array_access] string string_to_upper(string s) { { // Unsafe block u8* b = malloc_noscan((int)(s.len + 1)); for (int i = 0; i < s.len; ++i) { if (s.str[i] >= 'a' && s.str[i] <= 'z') { b[i] = (u8)(s.str[i] - 32); } else { b[i] = s.str[i]; } } b[s.len] = 0; return tos(b, s.len); } return (string){.str=(byteptr)"", .is_lit=1}; } // Attr: [direct_array_access] bool string_is_upper(string s) { for (int i = 0; i < s.len; ++i) { if (s.str[ i] >= 'a' && s.str[ i] <= 'z') { return false; } } return true; } // Attr: [direct_array_access] string string_capitalize(string s) { if (s.len == 0) { return _SLIT(""); } u8 s0 = s.str[ 0]; string letter = u8_ascii_str(s0); string uletter = string_to_upper(letter); if (s.len == 1) { return uletter; } string srest = string_substr(s, 1, (s).len); string res = string__plus(uletter, srest); return res; } // Attr: [direct_array_access] bool string_is_capital(string s) { if (s.len == 0 || !(s.str[ 0] >= 'A' && s.str[ 0] <= 'Z')) { return false; } for (int i = 1; i < s.len; ++i) { if (s.str[ i] >= 'A' && s.str[ i] <= 'Z') { return false; } } return true; } // Attr: [direct_array_access] bool string_starts_with_capital(string s) { if (s.len == 0 || !(s.str[ 0] >= 'A' && s.str[ 0] <= 'Z')) { return false; } return true; } string string_title(string s) { Array_string words = string_split(s, _SLIT(" ")); Array_string tit = __new_array_with_default(0, 0, sizeof(string), 0); for (int _t1 = 0; _t1 < words.len; ++_t1) { string word = ((string*)words.data)[_t1]; array_push((array*)&tit, _MOV((string[]){ string_capitalize(word) })); } string title = Array_string_join(tit, _SLIT(" ")); return title; } bool string_is_title(string s) { Array_string words = string_split(s, _SLIT(" ")); for (int _t1 = 0; _t1 < words.len; ++_t1) { string word = ((string*)words.data)[_t1]; if (!string_is_capital(word)) { return false; } } return true; } string string_find_between(string s, string start, string end) { int start_pos = string_index_(s, start); if (start_pos == -1) { return _SLIT(""); } string val = string_substr(s, (int)(start_pos + start.len), (s).len); int end_pos = string_index_(val, end); if (end_pos == -1) { return val; } return string_substr(val, 0, end_pos); } // Attr: [inline] inline string string_trim_space(string s) { return string_trim(s, _SLIT(" \n\t\v\f\r")); } string string_trim(string s, string cutset) { if (s.len < 1 || cutset.len < 1) { return string_clone(s); } multi_return_int_int mr_40017 = string_trim_indexes(s, cutset); int left = mr_40017.arg0; int right = mr_40017.arg1; return string_substr(s, left, right); } // Attr: [direct_array_access] multi_return_int_int string_trim_indexes(string s, string cutset) { int pos_left = 0; int pos_right = (int)(s.len - 1); bool cs_match = true; for (;;) { if (!(pos_left <= s.len && pos_right >= -1 && cs_match)) break; cs_match = false; for (int _t1 = 0; _t1 < cutset.len; ++_t1) { u8 cs = cutset.str[_t1]; if (s.str[ pos_left] == cs) { pos_left++; cs_match = true; break; } } for (int _t2 = 0; _t2 < cutset.len; ++_t2) { u8 cs = cutset.str[_t2]; if (s.str[ pos_right] == cs) { pos_right--; cs_match = true; break; } } if (pos_left > pos_right) { return (multi_return_int_int){.arg0=0, .arg1=0}; } } return (multi_return_int_int){.arg0=pos_left, .arg1=(int)(pos_right + 1)}; } // Attr: [direct_array_access] string string_trim_left(string s, string cutset) { if (s.len < 1 || cutset.len < 1) { return string_clone(s); } int pos = 0; for (;;) { if (!(pos < s.len)) break; bool found = false; for (int _t2 = 0; _t2 < cutset.len; ++_t2) { u8 cs = cutset.str[_t2]; if (s.str[ pos] == cs) { found = true; break; } } if (!found) { break; } pos++; } return string_substr(s, pos, (s).len); } // Attr: [direct_array_access] string string_trim_right(string s, string cutset) { if (s.len < 1 || cutset.len < 1) { return string_clone(s); } int pos = (int)(s.len - 1); for (;;) { if (!(pos >= 0)) break; bool found = false; for (int _t2 = 0; _t2 < cutset.len; ++_t2) { u8 cs = cutset.str[_t2]; if (s.str[ pos] == cs) { found = true; } } if (!found) { break; } pos--; } if (pos < 0) { return _SLIT(""); } return string_substr(s, 0, (int)(pos + 1)); } string string_trim_string_left(string s, string str) { if (string_starts_with(s, str)) { return string_substr(s, str.len, (s).len); } return string_clone(s); } string string_trim_string_right(string s, string str) { if (string_ends_with(s, str)) { return string_substr(s, 0, (int)(s.len - str.len)); } return string_clone(s); } int compare_strings(string* a, string* b) { if (string__lt(*a, *b)) { return -1; } if (string__lt(*b, *a)) { return 1; } return 0; } VV_LOCAL_SYMBOL int compare_strings_by_len(string* a, string* b) { if (a->len < b->len) { return -1; } if (a->len > b->len) { return 1; } return 0; } VV_LOCAL_SYMBOL int compare_lower_strings(string* a, string* b) { string aa = string_to_lower(/*rec*/*a); string bb = string_to_lower(/*rec*/*b); return compare_strings(&aa, &bb); } // Attr: [inline] inline void Array_string_sort_ignore_case(Array_string* s) { array_sort_with_compare(s, (voidptr)compare_lower_strings); } // Attr: [inline] inline void Array_string_sort_by_len(Array_string* s) { array_sort_with_compare(s, (voidptr)compare_strings_by_len); } // Attr: [inline] inline string string_str(string s) { return string_clone(s); } VV_LOCAL_SYMBOL byte string_at(string s, int idx) { #if !defined(CUSTOM_DEFINE_no_bounds_checking) { if (idx < 0 || idx >= s.len) { _v_panic( str_intp(3, _MOV((StrIntpData[]){{_SLIT("string index out of range: "), /*100 &int*/0xfe07, {.d_i32 = idx}}, {_SLIT(" / "), /*100 &int*/0xfe07, {.d_i32 = s.len}}, {_SLIT0, 0, { .d_c = 0 }}}))); VUNREACHABLE(); } } #endif { // Unsafe block return s.str[idx]; } return 0; } VV_LOCAL_SYMBOL _option_u8 string_at_with_check(string s, int idx) { if (idx < 0 || idx >= s.len) { return (_option_u8){ .state=2, .err=_const_none__, .data={EMPTY_STRUCT_INITIALIZATION} }; } { // Unsafe block _option_u8 _t2; _option_ok(&(u8[]) { s.str[idx] }, (_option*)(&_t2), sizeof(u8)); return _t2; } return (_option_u8){0}; } // Attr: [inline] inline bool u8_is_space(u8 c) { return c == 32 || (c > 8 && c < 14) || c == 0x85 || c == 0xa0; } // Attr: [inline] inline bool u8_is_digit(u8 c) { return c >= '0' && c <= '9'; } // Attr: [inline] inline bool u8_is_hex_digit(u8 c) { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); } // Attr: [inline] inline bool u8_is_oct_digit(u8 c) { return c >= '0' && c <= '7'; } // Attr: [inline] inline bool u8_is_bin_digit(u8 c) { return c == '0' || c == '1'; } // Attr: [inline] inline bool u8_is_letter(u8 c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } // Attr: [inline] inline bool u8_is_alnum(u8 c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'); } // Attr: [manualfree] // Attr: [unsafe] void string_free(string* s) { #if defined(_VPREALLOC) { return; } #endif if (s->is_lit == -98761234) { u8* double_free_msg = ((u8*)("double string.free() detected\n")); int double_free_msg_len = vstrlen(double_free_msg); #if defined(_VFREESTANDING) { } #else { _write_buf_to_fd(1, double_free_msg, double_free_msg_len); } #endif return; } if (s->is_lit == 1 || s->str == 0) { return; } { // Unsafe block _v_free(s->str); s->str = ((void*)0); } s->is_lit = -98761234; } string string_before(string s, string sub) { int pos = string_index_(s, sub); if (pos == -1) { return string_clone(s); } return string_substr(s, 0, pos); } string string_all_before