bundle per-module info in eval system; use all modules in all processes in ctrl layer evaluations; further sketching out of space info

This commit is contained in:
Ryan Fleury
2024-08-15 10:04:52 -07:00
parent ed75b253f7
commit a0d91862a7
16 changed files with 340 additions and 282 deletions
+63
View File
@@ -0,0 +1,63 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
////////////////////////////////
//~ rjf: Generated Code
#include "eval/generated/eval.meta.c"
////////////////////////////////
//~ rjf: Basic Helper Functions
internal U64
e_hash_from_string(U64 seed, String8 string)
{
U64 result = seed;
for(U64 i = 0; i < string.size; i += 1)
{
result = ((result << 5) + result) + string.str[i];
}
return result;
}
////////////////////////////////
//~ rjf: Message Functions
internal void
e_msg(Arena *arena, E_MsgList *msgs, E_MsgKind kind, void *location, String8 text)
{
E_Msg *msg = push_array(arena, E_Msg, 1);
SLLQueuePush(msgs->first, msgs->last, msg);
msgs->count += 1;
msgs->max_kind = Max(kind, msgs->max_kind);
msg->kind = kind;
msg->location = location;
msg->text = text;
}
internal void
e_msgf(Arena *arena, E_MsgList *msgs, E_MsgKind kind, void *location, char *fmt, ...)
{
va_list args;
va_start(args, fmt);
String8 text = push_str8fv(arena, fmt, args);
va_end(args);
e_msg(arena, msgs, kind, location, text);
}
internal void
e_msg_list_concat_in_place(E_MsgList *dst, E_MsgList *to_push)
{
if(dst->last != 0 && to_push->first != 0)
{
dst->last->next = to_push->first;
dst->last = to_push->last;
dst->count += to_push->count;
dst->max_kind = Max(dst->max_kind, to_push->max_kind);
}
else if(to_push->first != 0)
{
MemoryCopyStruct(dst, to_push);
}
MemoryZeroStruct(to_push);
}