looking into removing "oop" features from base library

I want to make member functions an optional addition the user can generate a derivative library with.
The purpose is to simplify the implementation as to make generating a C-variant simpiler.

I also want to use it as a study to see how much simpiler it makes the library without having it.
This commit is contained in:
2024-11-29 15:18:06 -05:00
parent e3c2a577ba
commit 163ad0a511
3 changed files with 31 additions and 22 deletions

View File

@ -16,8 +16,8 @@ ssize token_fmt_va( char* buf, usize buf_size, s32 num_tokens, va_list va )
local_persist
char tok_map_mem[ TokenFmt_TokenMap_MemSize ];
tok_map_arena = Arena::init_from_memory( tok_map_mem, sizeof(tok_map_mem) );
tok_map = HashTable<StrC>::init( tok_map_arena );
init_from_memory( tok_map_arena, tok_map_mem, sizeof(tok_map_mem) );
tok_map = HashTable<StrC>::init( tok_map_arena );
s32 left = num_tokens - 1;

View File

@ -712,7 +712,10 @@ Code parse_class_struct( TokType which, bool inplace_def = false )
local_persist
char interface_arr_mem[ kilobytes(4) ] {0};
Array<CodeType> interfaces = Array<CodeType>::init_reserve( Arena::init_from_memory(interface_arr_mem, kilobytes(4) ), 4 );
Array<CodeType> interfaces; {
Arena arena; init_from_memory(arena, interface_arr_mem, kilobytes(4) );
Array<CodeType>::init_reserve( arena, 4 );
}
// TODO(Ed) : Make an AST_DerivedType, we'll store any arbitary derived type into there as a linear linked list of them.
if ( check( TokType::Assign_Classifer ) )