Commit beca565f by William Bundy

rituals build 149

parent b5f54c7c
git add --all
git commit -m "rituals build 148"
git commit -m "rituals build 149"
git push
git push github
147
1475280333.390411
148
1475280413.536415
......@@ -181,6 +181,7 @@ int main(int argc, char** argv)
*unique_type_start = *type_start;
unique_type_start->next = NULL;
Meta_Type* unique_type_head = unique_type_start;
Struct_Def* s_head = structdef;
do {
bool eq = true;
unique_type_head = unique_type_start;
......@@ -193,6 +194,14 @@ int main(int argc, char** argv)
unique_type_head = unique_type_head->next;
} while(1);
if(eq) {
s_head = structdef;
do {
if(unique_type_head->hash == s_head->namehash) {
eq = false;
break;
}
} while(s_head = s_head->next);
if(!eq) continue;
unique_type_head->next = arena_push_struct(Work_Arena, Meta_Type);
unique_type_head = unique_type_head->next;
*unique_type_head = *type_head;
......
......@@ -882,6 +882,7 @@ struct Struct_Def
Struct_Kind kind;
isize meta_index;
Hash namehash;
Struct_Member* members;
Struct_Kind* member_kinds;
......@@ -1093,6 +1094,7 @@ Token* parse_struct_member(Lexer* lex, Struct_Def* parent, Token* start, Memory_
next = head->next;
buf[len] = '\0';
def.name = buf;
def.namehash = head->hash;
}
head = head->next;
......@@ -1252,6 +1254,7 @@ Struct_Def* find_struct_defs(Lexer* lex, Token* start, Memory_Arena* arena)
memcpy(buf, subhead->start, subhead->len);
buf[subhead->len] = '\0';
def.name = buf;
def.namehash = subhead->hash;
} else if(subhead->kind == Token_OpenBrace) {
break;
}
......
......@@ -1624,7 +1624,7 @@ decorators src/metaprogram/metaprogram_parser.cpp /^ char** decorators;$/;" m st
decorators_count src/metaprogram/metaprogram_parser.cpp /^ isize decorators_count;$/;" m struct:Proc_Prototype file:
def src/metaprogram/metaprogram_parser.cpp /^ Struct_Def def;$/;" m struct:Struct_Member::__anon1 file:
defaults src/metaprogram/metaprogram_parser.cpp /^ char* defaults;$/;" m struct:Proc_Arg file:
defhash src/metaprogram/metaprogram_parser.cpp 1325;" d file:
defhash src/metaprogram/metaprogram_parser.cpp 1330;" d file:
delay src/thirdparty/stb_image.h /^ int flags, bgindex, ratio, transparent, eflags, delay;$/;" m struct:__anon17
delete_file src/rituals_serialization.cpp /^int delete_file(char* path, isize path_length, char* file)$/;" f
delete_folder src/rituals_serialization.cpp /^int delete_folder(char* path, isize path_length)$/;" f
......@@ -2364,6 +2364,7 @@ name src/rituals_game_info.cpp /^ const char* name;$/;" m struct:Tile_Info file:
name src/rituals_world.cpp /^ char* name;$/;" m struct:World file:
name src/thirdparty/tinydir.h /^ _tinydir_char_t name[_TINYDIR_FILENAME_MAX];$/;" m struct:tinydir_file
namehash src/metaprogram/metaprogram_parser.cpp /^ Hash namehash;$/;" m struct:Struct_Member::__anon2 file:
namehash src/metaprogram/metaprogram_parser.cpp /^ Hash namehash;$/;" m struct:Struct_Def file:
new_item_stack src/rituals_inventory.cpp /^Item_Stack* new_item_stack(Item_Info* info, Memory_Arena* arena)$/;" f
new_memory_arena src/rituals_memory.cpp /^Memory_Arena* new_memory_arena(usize size, Memory_Arena* src)$/;" f
next helping_gb.cpp /^ isize next;$/;" m struct:MapEntry file:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment