diff --git a/config.toml b/config.toml index 06a20ab1..ab175015 100644 --- a/config.toml +++ b/config.toml @@ -1,9 +1,9 @@ [ai] provider = "minimax" model = "MiniMax-M3" -temperature = 0.0 +temperature = 0.699999988079071 top_p = 1.0 -max_tokens = 999999 +max_tokens = 99999 history_trunc_limit = 900000 active_preset = "Basic Do Not" system_prompt = "- **Do not** create shell scripts, README files, or descriptive files unless explicitly instructed.\n- **Do not** do anything beyond what was asked. Suggest extras in text; do not implement them." @@ -16,7 +16,7 @@ paths = [ "C:/projects/manual_slop/manual_slop.toml", "C:/projects/Pikuma/ps1-ai/pikuma_ps1.toml", ] -active = "C:/projects/Pikuma/ps1-ai/pikuma_ps1.toml" +active = "C:/projects/gencpp/.ai/gencpp_sloppy.toml" [gui] separate_message_panel = true @@ -52,17 +52,17 @@ separate_external_tools = false Message = true Response = true "Tool Calls" = true -"Text Viewer" = false +"Text Viewer" = true Theme = true "Log Management" = true -Diagnostics = false +Diagnostics = true "Context Preview" = false "External Tools" = false "Shader Editor" = false "Undo/Redo History" = false [theme] -palette = "10x Dark" +palette = "Nord Dark" font_path = "C:/projects/manual_slop/assets/fonts/MapleMono-Regular.ttf" font_size = 20.0 scale = 1.0 diff --git a/manual_slop_history.toml b/manual_slop_history.toml index 969eee5d..143461cd 100644 --- a/manual_slop_history.toml +++ b/manual_slop_history.toml @@ -9,2225 +9,13 @@ auto_add = true [discussions.main] git_commit = "9265f94d9756b1a37a7b8e195725654032d84747" -last_updated = "2026-06-03T15:47:13" +last_updated = "2026-06-04T18:04:34" history = [ "@2026-02-21T18:22:58\nUser:\nI will now try to generate a response from the AI. I will then try to run a tool call. Finally, I will try to generate a response from the AI again.", ] sent_markdown = "" sent_system_prompt = "" - -[[discussions.main.context_snapshot]] -path = "C:/projects/forth/bootslop/attempt_1/duffle.amd64.win32.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 166 -end_line = 166 -start_context = [ - "IA_ void assert(U8 cond) { if(cond){return;} else{debug_trap(); ms_exit_process(1);} }", - "#else", - "#define assert(cond)", -] -end_context = [ - "#define debug_trap() __builtin_debugtrap()", - "#if BUILD_DEBUG", - "IA_ void assert(U8 cond) { if(cond){return;} else{debug_trap(); ms_exit_process(1);} }", -] -content_hash = "504a1c99839be4877c5a3b724a12e06e" -tag = "auto-ast" -comment = "assert" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 180 -end_line = 184 -start_context = [ - "IA_ U8 align_pow2(U8 x, U8 b) {", - "assert(b != 0);", - "assert((b & (b - 1)) == 0); // Check power of 2", -] -end_context = [ - "assert((b & (b - 1)) == 0); // Check power of 2", - "return ((x + b - 1) & (~(b - 1)));", - "}", -] -content_hash = "c8cbb1cf390c78047962eda8f25c76a3" -tag = "auto-ast" -comment = "align_pow2" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 189 -end_line = 193 -start_context = [ - "void* memset(void* dest, int c, U8 count) {", - "U1* bytes = (U1*)dest;", - "while (count--) *bytes++ = (U1)c;", -] -end_context = [ - "while (count--) *bytes++ = (U1)c;", - "return dest;", - "}", -] -content_hash = "536bde09d01cd3a92a3533f35f24ca9f" -tag = "auto-ast" -comment = "memset" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 195 -end_line = 200 -start_context = [ - "void* memcpy(void* dest, const void* src, U8 count) {", - "U1* d = (U1*)dest;", - "const U1* s = (const U1*)src;", -] -end_context = [ - "while (count--) *d++ = *s++;", - "return dest;", - "}", -] -content_hash = "fa00e5620056d42c27cb88bafdac0d6a" -tag = "auto-ast" -comment = "memcpy" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 204 -end_line = 204 -start_context = [ - "IA_ U8 mem_copy (U8 dest, U8 src, U8 len) { return (U8)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", - "IA_ U8 mem_copy_overlapping(U8 dest, U8 src, U8 len) { return (U8)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "IA_ U8 mem_fill (U8 dest, U8 value, U8 len) { return (U8)(__builtin_memset ((void*)dest, (int) value, len)); }", -] -end_context = [ - "#pragma clang optimize on", - "#endif", - "IA_ U8 mem_copy (U8 dest, U8 src, U8 len) { return (U8)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", -] -content_hash = "784e53c27bea86db64d5db68738dd845" -tag = "auto-ast" -comment = "mem_copy" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 205 -end_line = 205 -start_context = [ - "IA_ U8 mem_copy_overlapping(U8 dest, U8 src, U8 len) { return (U8)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "IA_ U8 mem_fill (U8 dest, U8 value, U8 len) { return (U8)(__builtin_memset ((void*)dest, (int) value, len)); }", - "IA_ B4 mem_zero (U8 dest, U8 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", -] -end_context = [ - "#endif", - "IA_ U8 mem_copy (U8 dest, U8 src, U8 len) { return (U8)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", - "IA_ U8 mem_copy_overlapping(U8 dest, U8 src, U8 len) { return (U8)(__builtin_memmove((void*)dest, (void const*)src, len)); }", -] -content_hash = "4834ab11e38a02c62b01965dfb9465b0" -tag = "auto-ast" -comment = "mem_copy_overlapping" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 206 -end_line = 206 -start_context = [ - "IA_ U8 mem_fill (U8 dest, U8 value, U8 len) { return (U8)(__builtin_memset ((void*)dest, (int) value, len)); }", - "IA_ B4 mem_zero (U8 dest, U8 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", - "typedef Struct_(Slice) { U8 ptr, len; }; // Untyped Slice", -] -end_context = [ - "IA_ U8 mem_copy (U8 dest, U8 src, U8 len) { return (U8)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", - "IA_ U8 mem_copy_overlapping(U8 dest, U8 src, U8 len) { return (U8)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "IA_ U8 mem_fill (U8 dest, U8 value, U8 len) { return (U8)(__builtin_memset ((void*)dest, (int) value, len)); }", -] -content_hash = "e0976a9a674552f0fa683f0515acfe33" -tag = "auto-ast" -comment = "mem_fill" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 207 -end_line = 207 -start_context = [ - "IA_ B4 mem_zero (U8 dest, U8 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", - "typedef Struct_(Slice) { U8 ptr, len; }; // Untyped Slice", - "IA_ Slice slice_ut_(U8 ptr, U8 len) { return (Slice){ptr, len}; }", -] -end_context = [ - "IA_ U8 mem_copy_overlapping(U8 dest, U8 src, U8 len) { return (U8)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "IA_ U8 mem_fill (U8 dest, U8 value, U8 len) { return (U8)(__builtin_memset ((void*)dest, (int) value, len)); }", - "IA_ B4 mem_zero (U8 dest, U8 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", -] -content_hash = "efe71cbc9fb76798924a16bb37e54bff" -tag = "auto-ast" -comment = "mem_zero" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 210 -end_line = 210 -start_context = [ - "IA_ Slice slice_ut_(U8 ptr, U8 len) { return (Slice){ptr, len}; }", - "#define Slice_(type) Struct_(tmpl(Slice,type)) { type* ptr; U8 len; }", - "typedef Slice_(B1);", -] -end_context = [ - "IA_ B4 mem_zero (U8 dest, U8 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", - "typedef Struct_(Slice) { U8 ptr, len; }; // Untyped Slice", - "IA_ Slice slice_ut_(U8 ptr, U8 len) { return (Slice){ptr, len}; }", -] -content_hash = "b12301c815af8b80cd723dd63396d947" -tag = "auto-ast" -comment = "slice_ut_" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 225 -end_line = 225 -start_context = [ - "IA_ void slice_zero_(Slice s) { slice_assert(s); mem_zero(s.ptr, s.len); }", - "#define slice_zero(s) slice_zero_(slice_to_ut(s))", - "IA_ void slice_copy_(Slice dest, Slice src) {", -] -end_context = [ - "#define slice_iter(container, iter) (T_((container).ptr) iter = (container).ptr; iter != slice_end(container); ++ iter)", - "#define slice_arg_from_array(type, ...) & (tmpl(Slice,type)) { .ptr = array_decl(type,__VA_ARGS__), .len = array_len( array_decl(type,__VA_ARGS__)) }", - "IA_ void slice_zero_(Slice s) { slice_assert(s); mem_zero(s.ptr, s.len); }", -] -content_hash = "e1f77769ba8d70e291b0beae239734f0" -tag = "auto-ast" -comment = "slice_zero_" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 228 -end_line = 233 -start_context = [ - "IA_ void slice_copy_(Slice dest, Slice src) {", - "assert(dest.len >= src.len);", - "slice_assert(dest);", -] -end_context = [ - "slice_assert(src);", - "mem_copy(dest.ptr, src.ptr, src.len);", - "}", -] -content_hash = "f06cf188b0c4ff9394792c90119848b3" -tag = "auto-ast" -comment = "slice_copy_" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 239 -end_line = 243 -start_context = [ - "IA_ Slice mem_bump(U8 start, U8 cap, U8*r used, U8 amount) {", - "assert(amount <= (cap - used[0]));", - "used[0] += amount;", -] -end_context = [ - "used[0] += amount;", - "return (Slice){start + used[0], amount};", - "}", -] -content_hash = "7568d12cd298d13a223112964d3ad2f8" -tag = "auto-ast" -comment = "mem_bump" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 247 -end_line = 250 -start_context = [ - "IA_ void u64_to_hex(U8 val, char* buf, S4 chars) {", - "static const char hex_chars[] = \"0123456789ABCDEF\";", - "for(S1 i = chars - 1; i >= 0; --i) { buf[i] = hex_chars[val & 0xF]; val >>= 4; }", -] -end_context = [ - "static const char hex_chars[] = \"0123456789ABCDEF\";", - "for(S1 i = chars - 1; i >= 0; --i) { buf[i] = hex_chars[val & 0xF]; val >>= 4; }", - "}", -] -content_hash = "bf6f6dc88804f07a85f55faef54622e4" -tag = "auto-ast" -comment = "u64_to_hex" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 269 -end_line = 269 -start_context = [ - "IA_ B8 add_of (U8 a, U8 b, U8*r res) { return __builtin_uaddll_overflow(a, b, res); }", - "IA_ B8 sub_of (U8 a, U8 b, U8*r res) { return __builtin_usubll_overflow(a, b, res); }", - "IA_ B8 mul_of (U8 a, U8 b, U8*r res) { return __builtin_umulll_overflow(a, b, res); }", -] -end_context = [ - "typedef Struct_(R1_U8){ U8 p0; U8 p4; };", - "typedef Struct_(V2_U1){ U1 x; U1 y;};", - "IA_ B8 add_of (U8 a, U8 b, U8*r res) { return __builtin_uaddll_overflow(a, b, res); }", -] -content_hash = "e8bc31b89d056a7c5fdc650006dda72e" -tag = "auto-ast" -comment = "add_of" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 270 -end_line = 270 -start_context = [ - "IA_ B8 sub_of (U8 a, U8 b, U8*r res) { return __builtin_usubll_overflow(a, b, res); }", - "IA_ B8 mul_of (U8 a, U8 b, U8*r res) { return __builtin_umulll_overflow(a, b, res); }", - "IA_ B8 add_s_of(S8 a, S8 b, S8*r res) { return __builtin_saddll_overflow(a, b, res); }", -] -end_context = [ - "typedef Struct_(V2_U1){ U1 x; U1 y;};", - "IA_ B8 add_of (U8 a, U8 b, U8*r res) { return __builtin_uaddll_overflow(a, b, res); }", - "IA_ B8 sub_of (U8 a, U8 b, U8*r res) { return __builtin_usubll_overflow(a, b, res); }", -] -content_hash = "d4ea7f73fd6fec3c800ca0d3da500cb7" -tag = "auto-ast" -comment = "sub_of" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 271 -end_line = 271 -start_context = [ - "IA_ B8 mul_of (U8 a, U8 b, U8*r res) { return __builtin_umulll_overflow(a, b, res); }", - "IA_ B8 add_s_of(S8 a, S8 b, S8*r res) { return __builtin_saddll_overflow(a, b, res); }", - "IA_ B8 sub_s_of(S8 a, S8 b, S8*r res) { return __builtin_ssubll_overflow(a, b, res); }", -] -end_context = [ - "IA_ B8 add_of (U8 a, U8 b, U8*r res) { return __builtin_uaddll_overflow(a, b, res); }", - "IA_ B8 sub_of (U8 a, U8 b, U8*r res) { return __builtin_usubll_overflow(a, b, res); }", - "IA_ B8 mul_of (U8 a, U8 b, U8*r res) { return __builtin_umulll_overflow(a, b, res); }", -] -content_hash = "d099e0390851d74b87b54fb688b1290c" -tag = "auto-ast" -comment = "mul_of" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 272 -end_line = 272 -start_context = [ - "IA_ B8 add_s_of(S8 a, S8 b, S8*r res) { return __builtin_saddll_overflow(a, b, res); }", - "IA_ B8 sub_s_of(S8 a, S8 b, S8*r res) { return __builtin_ssubll_overflow(a, b, res); }", - "IA_ B8 mul_s_of(S8 a, S8 b, S8*r res) { return __builtin_smulll_overflow(a, b, res); }", -] -end_context = [ - "IA_ B8 sub_of (U8 a, U8 b, U8*r res) { return __builtin_usubll_overflow(a, b, res); }", - "IA_ B8 mul_of (U8 a, U8 b, U8*r res) { return __builtin_umulll_overflow(a, b, res); }", - "IA_ B8 add_s_of(S8 a, S8 b, S8*r res) { return __builtin_saddll_overflow(a, b, res); }", -] -content_hash = "f44c7c98cadd6f9592909981b675e033" -tag = "auto-ast" -comment = "add_s_of" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 273 -end_line = 273 -start_context = [ - "IA_ B8 sub_s_of(S8 a, S8 b, S8*r res) { return __builtin_ssubll_overflow(a, b, res); }", - "IA_ B8 mul_s_of(S8 a, S8 b, S8*r res) { return __builtin_smulll_overflow(a, b, res); }", - "#pragma endregion Math", -] -end_context = [ - "IA_ B8 mul_of (U8 a, U8 b, U8*r res) { return __builtin_umulll_overflow(a, b, res); }", - "IA_ B8 add_s_of(S8 a, S8 b, S8*r res) { return __builtin_saddll_overflow(a, b, res); }", - "IA_ B8 sub_s_of(S8 a, S8 b, S8*r res) { return __builtin_ssubll_overflow(a, b, res); }", -] -content_hash = "bfeb8514a2181b8c73013d52f59aeed3" -tag = "auto-ast" -comment = "sub_s_of" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 274 -end_line = 274 -start_context = [ - "IA_ B8 mul_s_of(S8 a, S8 b, S8*r res) { return __builtin_smulll_overflow(a, b, res); }", - "#pragma endregion Math", - "#pragma region Control Flow & Iteration", -] -end_context = [ - "IA_ B8 add_s_of(S8 a, S8 b, S8*r res) { return __builtin_saddll_overflow(a, b, res); }", - "IA_ B8 sub_s_of(S8 a, S8 b, S8*r res) { return __builtin_ssubll_overflow(a, b, res); }", - "IA_ B8 mul_s_of(S8 a, S8 b, S8*r res) { return __builtin_smulll_overflow(a, b, res); }", -] -content_hash = "1324eb45270b6f70c69ef2a62fd12086" -tag = "auto-ast" -comment = "mul_s_of" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 293 -end_line = 297 -start_context = [ - "IA_ void farena_init(FArena*r arena, Slice mem) { assert(arena != nullptr);", - "arena->start = mem.ptr;", - "arena->capacity = mem.len;", -] -end_context = [ - "arena->capacity = mem.len;", - "arena->used = 0;", - "}", -] -content_hash = "3d31c0f66adbcf0263e4c9fffeebf365" -tag = "auto-ast" -comment = "farena_init" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 298 -end_line = 298 -start_context = [ - "IA_ FArena farena_make(Slice mem) { FArena a; farena_init(& a, mem); return a; }", - "I_ Slice farena_push(FArena*r arena, U8 amount, Opt_farena o) {", - "if (amount == 0) { return (Slice){}; }", -] -end_context = [ - "arena->used = 0;", - "}", - "IA_ FArena farena_make(Slice mem) { FArena a; farena_init(& a, mem); return a; }", -] -content_hash = "d6b0422e17009608469eccf3e64f0bf2" -tag = "auto-ast" -comment = "farena_make" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 299 -end_line = 304 -start_context = [ - "I_ Slice farena_push(FArena*r arena, U8 amount, Opt_farena o) {", - "if (amount == 0) { return (Slice){}; }", - "U8 desired = amount * (o.type_width == 0 ? 1 : o.type_width);", -] -end_context = [ - "U8 to_commit = align_pow2(desired, o.alignment ? o.alignment : MEM_ALIGNMENT_DEFAULT);", - "return mem_bump(arena->start, arena->capacity, & arena->used, to_commit);", - "}", -] -content_hash = "d884f01b4f8ba2999e4e7bc015274c56" -tag = "auto-ast" -comment = "farena_push" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 305 -end_line = 305 -start_context = [ - "IA_ void farena_reset(FArena*r arena) { arena->used = 0; }", - "IA_ void farena_rewind(FArena*r arena, U8 save_point) {", - "U8 end = arena->start + arena->used; assert_bounds(save_point, arena->start, end);", -] -end_context = [ - "return mem_bump(arena->start, arena->capacity, & arena->used, to_commit);", - "}", - "IA_ void farena_reset(FArena*r arena) { arena->used = 0; }", -] -content_hash = "7d086c0e3a35a02291706c16aaa14a07" -tag = "auto-ast" -comment = "farena_reset" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 306 -end_line = 309 -start_context = [ - "IA_ void farena_rewind(FArena*r arena, U8 save_point) {", - "U8 end = arena->start + arena->used; assert_bounds(save_point, arena->start, end);", - "arena->used -= save_point - arena->start;", -] -end_context = [ - "U8 end = arena->start + arena->used; assert_bounds(save_point, arena->start, end);", - "arena->used -= save_point - arena->start;", - "}", -] -content_hash = "4fdbf1d1ce0146e1225ed357233a1f03" -tag = "auto-ast" -comment = "farena_rewind" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 310 -end_line = 310 -start_context = [ - "IA_ U8 farena_save(FArena arena) { return arena.used; }", - "#define farena_push_(arena, amount, ...) farena_push((arena), (amount), opt_(farena, __VA_ARGS__))", - "#define farena_push_type(arena, type, ...) C_(type*, farena_push((arena), 1, opt_(farena, .type_width=S_(type), __VA_ARGS__)).ptr)", -] -end_context = [ - "arena->used -= save_point - arena->start;", - "}", - "IA_ U8 farena_save(FArena arena) { return arena.used; }", -] -content_hash = "6df641c7390586fbfb5b954ca87ce043" -tag = "auto-ast" -comment = "farena_save" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 319 -end_line = 322 -start_context = [ - "IA_ Slice fstack_push(Slice mem, U8* top, U8 amount, Opt_farena o) {", - "FArena a = { mem.ptr, mem.len, top[0] }; Slice s = farena_push(& a, amount, o);", - "top[0] = a.used; return s;", -] -end_context = [ - "FArena a = { mem.ptr, mem.len, top[0] }; Slice s = farena_push(& a, amount, o);", - "top[0] = a.used; return s;", - "};", -] -content_hash = "df433b4a30c4027be64f767c925ecb6d" -tag = "auto-ast" -comment = "fstack_push" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 346 -end_line = 353 -start_context = [ - "IA_ void hash64_fnv1a(U8*r hash, Slice data, U8 seed) {", - "LP_ U8 const default_seed = 0xcbf29ce484222325;", - "if (seed == 0) seed = default_seed;", -] -end_context = [ - "hash[0] *= 0x100000001b3;", - "}", - "}", -] -content_hash = "6e557b9a6058f21ee563af5d7d6340d9" -tag = "auto-ast" -comment = "hash64_fnv1a" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 354 -end_line = 354 -start_context = [ - "IA_ U8 hash64_fnv1a_ret(Slice data, U8 seed) { U8 h = 0; hash64_fnv1a(& h, data, seed); return h; }", - "#pragma endregion Hashing", - "#pragma region IO", -] -end_context = [ - "}", - "}", - "IA_ U8 hash64_fnv1a_ret(Slice data, U8 seed) { U8 h = 0; hash64_fnv1a(& h, data, seed); return h; }", -] -content_hash = "0bbe5a6271356f294e140fa8774cb4ec" -tag = "auto-ast" -comment = "hash64_fnv1a_ret" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 381 -end_line = 388 -start_context = [ - "IA_ void ktl_populate_slice_a2_str8(KTL_Str8* kt, Slice_Str8_A2 values) {", - "assert(kt != null); slice_assert(* kt);", - "if (values.len == 0) return;", -] -end_context = [ - "hash64_fnv1a(& kt->ptr[id].key, slice_to_ut(values.ptr[id][0]), 0);", - "mem_copy(u8_(& kt->ptr[id].value), u8_(& values.ptr[id][1]), S_(Str8));", - "}", -] -content_hash = "4febb9673dd4578c730f5fce2ca53386" -tag = "auto-ast" -comment = "ktl_populate_slice_a2_str8" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 407 -end_line = 407 -start_context = [ - "IA_ B4 char_is_upper(UTF8 c) { return('A' <= c && c <= 'Z'); }", - "IA_ UTF8 char_to_lower(UTF8 c) { if (char_is_upper(c)) { c += ('a' - 'A'); } return(c); }", - "IA_ B4 char_is_digit(UTF8 c, U4 base) {", -] -end_context = [ - "0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,", - "};", - "IA_ B4 char_is_upper(UTF8 c) { return('A' <= c && c <= 'Z'); }", -] -content_hash = "2fd2ee837e74cb5d1cc97ccde04dddf5" -tag = "auto-ast" -comment = "char_is_upper" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 408 -end_line = 408 -start_context = [ - "IA_ UTF8 char_to_lower(UTF8 c) { if (char_is_upper(c)) { c += ('a' - 'A'); } return(c); }", - "IA_ B4 char_is_digit(UTF8 c, U4 base) {", - "B4 result = 0; if (0 < base && base <= 16) {", -] -end_context = [ - "};", - "IA_ B4 char_is_upper(UTF8 c) { return('A' <= c && c <= 'Z'); }", - "IA_ UTF8 char_to_lower(UTF8 c) { if (char_is_upper(c)) { c += ('a' - 'A'); } return(c); }", -] -content_hash = "08683fa11ae9d1e3907bd1defb8195ed" -tag = "auto-ast" -comment = "char_to_lower" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 409 -end_line = 414 -start_context = [ - "IA_ B4 char_is_digit(UTF8 c, U4 base) {", - "B4 result = 0; if (0 < base && base <= 16) {", - "if (integer_symbol_reverse[c] < base) result = 1;", -] -end_context = [ - "}", - "return result;", - "}", -] -content_hash = "d52859004d008fe16f3ad4c8c4d45bef" -tag = "auto-ast" -comment = "char_is_digit" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 415 -end_line = 418 -start_context = [ - "IA_ UTF8 integer_symbols(UTF8 value) {", - "LP_ UTF8 lookup_table[16] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F', };", - "return lookup_table[C_(UTF8, value)];", -] -end_context = [ - "LP_ UTF8 lookup_table[16] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F', };", - "return lookup_table[C_(UTF8, value)];", - "}", -] -content_hash = "e10f41614083d02769e6d47b89387468" -tag = "auto-ast" -comment = "integer_symbols" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 419 -end_line = 427 -start_context = [ - "IA_ U8 u8_from_str8(Str8 str, U4 radix) {", - "U8 x = 0; if(1 < radix && radix <= 16) {", - "for each_iter(U8, cursor, str.len) {", -] -end_context = [ - "}", - "return x;", - "}", -] -content_hash = "8d1f4ea6c424dd08289548761de44e9e" -tag = "auto-ast" -comment = "u8_from_str8" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 435 -end_line = 480 -start_context = [ - "I_ Info_str8_from_u4 str8_from_u4_info(U4 num, U4 radix, U4 min_digits, U4 digit_group_separator)", - "{", - "Info_str8_from_u4 info = {0};", -] -end_context = [ - "}", - "return info;", - "}", -] -content_hash = "12abee231288885f43f3388400ec25ae" -tag = "auto-ast" -comment = "str8_from_u4_info" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 481 -end_line = 508 -start_context = [ - "I_ Str8 str8_from_u4_buf(Slice buf, U4 num, U4 radix, U4 min_digits, U4 digit_group_separator, Info_str8_from_u4 info)", - "{", - "assert(buf.len >= info.size_required);", -] -end_context = [ - "/*Fill Prefix*/ if (info.prefix.len > 0) { slice_copy(result, info.prefix); }", - "return result;", - "}", -] -content_hash = "015193a39420f8ed4ffdf1d14b5a3417" -tag = "auto-ast" -comment = "str8_from_u4_buf" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 509 -end_line = 577 -start_context = [ - "I_ Str8 str8_fmt_ktl_buf(Slice buffer, KTL_Str8 table, Str8 fmt_template)", - "{", - "slice_assert(buffer);", -] -end_context = [ - "}", - "return (Str8){C_(UTF8*, buffer.ptr), buffer.len - buffer_remaining};", - "}", -] -content_hash = "1b7a4bd2ebfb96a4cae99758e053e349" -tag = "auto-ast" -comment = "str8_fmt_ktl_buf" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 580 -end_line = 580 -start_context = [ - "IA_ Slice str8gen_buf(Str8Gen*r gen) { return (Slice){u8_(gen->ptr) + gen->len, gen->cap - gen->len}; }", - "IA_ void str8gen_append_str8(Str8Gen*r gen, Str8 str) { assert(gen != nullptr);", - "U8 ptr = mem_bump(u8_(gen->ptr), gen->cap, & gen->len, str.len).ptr;", -] -end_context = [ - "}", - "typedef Struct_(Str8Gen) { UTF8* ptr; U8 cap, len; };", - "IA_ Slice str8gen_buf(Str8Gen*r gen) { return (Slice){u8_(gen->ptr) + gen->len, gen->cap - gen->len}; }", -] -content_hash = "2455db0b0017a89e4334a08fb9356f64" -tag = "auto-ast" -comment = "str8gen_buf" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 582 -end_line = 585 -start_context = [ - "IA_ void str8gen_append_str8(Str8Gen*r gen, Str8 str) { assert(gen != nullptr);", - "U8 ptr = mem_bump(u8_(gen->ptr), gen->cap, & gen->len, str.len).ptr;", - "mem_copy(ptr, u8_(str.ptr), str.len);", -] -end_context = [ - "U8 ptr = mem_bump(u8_(gen->ptr), gen->cap, & gen->len, str.len).ptr;", - "mem_copy(ptr, u8_(str.ptr), str.len);", - "}", -] -content_hash = "97496bd5a550434c91fbeb89b677c3eb" -tag = "auto-ast" -comment = "str8gen_append_str8" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 586 -end_line = 589 -start_context = [ - "IA_ void str8gen_append_fmt(Str8Gen*r gen, Str8 fmt, KTL_Str8 tbl) {", - "Str8 result = str8_fmt_ktl_buf(str8gen_buf(gen), tbl, fmt);", - "gen->len += result.len;", -] -end_context = [ - "Str8 result = str8_fmt_ktl_buf(str8gen_buf(gen), tbl, fmt);", - "gen->len += result.len;", - "}", -] -content_hash = "e1596382df8da0c76386bf849b4d0175" -tag = "auto-ast" -comment = "str8gen_append_fmt" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 595 -end_line = 606 -start_context = [ - "typedef struct MS_WNDCLASSA {", - "U4 style;", - "S8 (*lpfnWndProc)(void*, U4, U8, S8);", -] -end_context = [ - "char const* lpszMenuName;", - "char const* lpszClassName;", - "} MS_WNDCLASSA;", -] -content_hash = "619f7a227d8c060de7a2642a669d746d" -tag = "auto-ast" -comment = "MS_WNDCLASSA" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 607 -end_line = 607 -start_context = [ - "typedef struct MS_POINT { S4 x, y; } MS_POINT;", - "typedef struct MS_MSG { void* hwnd; U4 message; U8 wParam; S8 lParam; U4 time; MS_POINT pt; } MS_MSG;", - "typedef struct MS_RECT { S4 left, top, right, bottom; } MS_RECT;", -] -end_context = [ - "char const* lpszClassName;", - "} MS_WNDCLASSA;", - "typedef struct MS_POINT { S4 x, y; } MS_POINT;", -] -content_hash = "e73bb183ba435ea1150b2309c822ff55" -tag = "auto-ast" -comment = "MS_POINT" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 608 -end_line = 608 -start_context = [ - "typedef struct MS_MSG { void* hwnd; U4 message; U8 wParam; S8 lParam; U4 time; MS_POINT pt; } MS_MSG;", - "typedef struct MS_RECT { S4 left, top, right, bottom; } MS_RECT;", - "typedef struct MS_PAINTSTRUCT { void* hdc; S4 fErase; MS_RECT rcPaint; S4 fRestore; S4 fIncUpdate; U1 rgbReserved[32]; } MS_PAINTSTRUCT;", -] -end_context = [ - "} MS_WNDCLASSA;", - "typedef struct MS_POINT { S4 x, y; } MS_POINT;", - "typedef struct MS_MSG { void* hwnd; U4 message; U8 wParam; S8 lParam; U4 time; MS_POINT pt; } MS_MSG;", -] -content_hash = "6c0906f8339d84b736d74fdbd57d2896" -tag = "auto-ast" -comment = "MS_MSG" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 609 -end_line = 609 -start_context = [ - "typedef struct MS_RECT { S4 left, top, right, bottom; } MS_RECT;", - "typedef struct MS_PAINTSTRUCT { void* hdc; S4 fErase; MS_RECT rcPaint; S4 fRestore; S4 fIncUpdate; U1 rgbReserved[32]; } MS_PAINTSTRUCT;", - "// --- Kernel32 ---", -] -end_context = [ - "typedef struct MS_POINT { S4 x, y; } MS_POINT;", - "typedef struct MS_MSG { void* hwnd; U4 message; U8 wParam; S8 lParam; U4 time; MS_POINT pt; } MS_MSG;", - "typedef struct MS_RECT { S4 left, top, right, bottom; } MS_RECT;", -] -content_hash = "9bdc586f6eff96501cd83ba3c8ec8d8d" -tag = "auto-ast" -comment = "MS_RECT" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 610 -end_line = 610 -start_context = [ - "typedef struct MS_PAINTSTRUCT { void* hdc; S4 fErase; MS_RECT rcPaint; S4 fRestore; S4 fIncUpdate; U1 rgbReserved[32]; } MS_PAINTSTRUCT;", - "// --- Kernel32 ---", - "WinAPI void ms_exit_process(U4 uExitCode) asm(\"ExitProcess\");", -] -end_context = [ - "typedef struct MS_MSG { void* hwnd; U4 message; U8 wParam; S8 lParam; U4 time; MS_POINT pt; } MS_MSG;", - "typedef struct MS_RECT { S4 left, top, right, bottom; } MS_RECT;", - "typedef struct MS_PAINTSTRUCT { void* hdc; S4 fErase; MS_RECT rcPaint; S4 fRestore; S4 fIncUpdate; U1 rgbReserved[32]; } MS_PAINTSTRUCT;", -] -content_hash = "04ef9bc3512ff11b7c2be0c16c576513" -tag = "auto-ast" -comment = "MS_PAINTSTRUCT" - -[[discussions.main.context_snapshot]] -path = "C:/projects/forth/bootslop/attempt_1/main.c" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 67 -end_line = 91 -start_context = [ - "internal void debug_log(Str8 fmt, KTL_Str8 table) {", - "// A static buffer for our log lines.", - "LP_ UTF8 console_log_buffer[1024];", -] -end_context = [ - "// Write a newline.", - "ms_write_console(stdout_handle, (UTF8 const*r)\"\\n\", 1, nullptr, 0);", - "}", -] -content_hash = "f4b1dadef108e5f9596b8999d4737e00" -tag = "auto-ast" -comment = "debug_log" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 93 -end_line = 109 -start_context = [ - "U8 ms_builtin_print(U8 val, U8 rdx_val, U8 r8_val, U8 r9_val) {", - "char hex1[9], hex2[9], hex3[9], hex4[9];", - "u64_to_hex(val, hex1, 8); hex1[8] = '\\0';", -] -end_context = [ - "if (log_count < 16) log_buffer[log_count++] = val;", - "return val;", - "}", -] -content_hash = "aa3d4a1ca34cd80a179122088a4fa3eb" -tag = "auto-ast" -comment = "ms_builtin_print" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 172 -end_line = 183 -start_context = [ - "internal void save_cartridge(void) {", - "void* hFile = ms_create_file_a(\"cartridge.bin\", MS_GENERIC_WRITE, 0, nullptr, MS_CREATE_ALWAYS, MS_FILE_ATTRIBUTE_NORMAL, nullptr);", - "if (hFile != (void*)-1) {", -] -end_context = [ - "ms_close_handle(hFile);", - "}", - "}", -] -content_hash = "bfd13bed976a3587ef50049deeefb9b0" -tag = "auto-ast" -comment = "save_cartridge" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 185 -end_line = 198 -start_context = [ - "internal void load_cartridge(void) {", - "void* hFile = ms_create_file_a(\"cartridge.bin\", MS_GENERIC_READ, 0, nullptr, MS_OPEN_EXISTING, MS_FILE_ATTRIBUTE_NORMAL, nullptr);", - "if (hFile != (void*)-1) {", -] -end_context = [ - "compile_and_run_tape();", - "}", - "}", -] -content_hash = "9723792fd8934e9798ca9eed3e2b4c95" -tag = "auto-ast" -comment = "load_cartridge" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 200 -end_line = 220 -start_context = [ - "IA_ void scatter(U4 token, const char* anno_str) {", - "if (tape_arena.used + sizeof(U4) <= tape_arena.capacity && anno_arena.used + sizeof(U8) <= anno_arena.capacity) {", - "U4 tag = unpack_tag(token);", -] -end_context = [ - "anno_arena.used += sizeof(U8);", - "}", - "}", -] -content_hash = "3714fe1173197856d1164a1c8e785a3c" -tag = "auto-ast" -comment = "scatter" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 222 -end_line = 227 -start_context = [ - "internal void emit8(U1 b) {", - "if (code_arena.used + 1 <= code_arena.capacity) {", - "u1_r(code_arena.start + code_arena.used)[0] = b;", -] -end_context = [ - "code_arena.used += 1;", - "}", - "}", -] -content_hash = "9ad98d2bcc792feec7bb9ec6fb700ddc" -tag = "auto-ast" -comment = "emit8" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 228 -end_line = 233 -start_context = [ - "internal void emit32(U4 val) {", - "if (code_arena.used + 4 <= code_arena.capacity) {", - "u4_r(code_arena.start + code_arena.used)[0] = val;", -] -end_context = [ - "code_arena.used += 4;", - "}", - "}", -] -content_hash = "75a53b73c606d8a41792a0aacf2b29a5" -tag = "auto-ast" -comment = "emit32" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 234 -end_line = 239 -start_context = [ - "internal void emit64(U8 val) {", - "if (code_arena.used + 8 <= code_arena.capacity) {", - "u8_r(code_arena.start+ code_arena.used)[0] = val;", -] -end_context = [ - "code_arena.used += 8;", - "}", - "}", -] -content_hash = "3cba26c77175ee15b1ba1e757d2393a8" -tag = "auto-ast" -comment = "emit64" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 241 -end_line = 243 -start_context = [ - "internal void pad32(void) {", - "while ((code_arena.used % 4) != 0) emit8(0x90);", - "}", -] -end_context = [ - "internal void pad32(void) {", - "while ((code_arena.used % 4) != 0) emit8(0x90);", - "}", -] -content_hash = "a86fc30ec747a885a9f42f1424f575db" -tag = "auto-ast" -comment = "pad32" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 245 -end_line = 274 -start_context = [ - "internal U4 resolve_name_to_index(const char* ref_name) {", - "U8 tape_count = tape_arena.used / sizeof(U4);", - "U4*r tape_ptr = u4_r(tape_arena.start);", -] -end_context = [ - "}", - "return 0;", - "}", -] -content_hash = "bca6866d54fdaf744502c0ef6f582ce1" -tag = "auto-ast" -comment = "resolve_name_to_index" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 276 -end_line = 290 -start_context = [ - "internal void relink_tape(void) {", - "U8 tape_count = tape_arena.used / sizeof(U4);", - "U4*r tape_ptr = u4_r(tape_arena.start);", -] -end_context = [ - "}", - "}", - "}", -] -content_hash = "43311eae38c1ec36384de21f1dcf9bd5" -tag = "auto-ast" -comment = "relink_tape" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 435 -end_line = 435 -start_context = [ - "IA_ void x64_XCHG_RAX_RDX() { emit8(x64_REX); emit8(x64_op_XCHG_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_MOV_RDX_RAX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RAX_RDX); } // DUP", - "IA_ void x64_MOV_RAX_RDX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RDX_RAX); } // DROP", -] -end_context = [ - "// Each maps directly to the emit8/emit32/emit64 calls in compile_action.", - "// Stack Machine Operations", - "IA_ void x64_XCHG_RAX_RDX() { emit8(x64_REX); emit8(x64_op_XCHG_rm_reg); emit8(x64_modrm_RAX_RDX); }", -] -content_hash = "8879cce1b60f1418d46e52d5afec0596" -tag = "auto-ast" -comment = "x64_XCHG_RAX_RDX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 436 -end_line = 436 -start_context = [ - "IA_ void x64_MOV_RDX_RAX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RAX_RDX); } // DUP", - "IA_ void x64_MOV_RAX_RDX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RDX_RAX); } // DROP", - "// Arithmetic (2-register stack: op RAX with RDX, result in RAX)", -] -end_context = [ - "// Stack Machine Operations", - "IA_ void x64_XCHG_RAX_RDX() { emit8(x64_REX); emit8(x64_op_XCHG_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_MOV_RDX_RAX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RAX_RDX); } // DUP", -] -content_hash = "4541d2728fa3477991eba9c2e4938ec1" -tag = "auto-ast" -comment = "x64_MOV_RDX_RAX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 437 -end_line = 437 -start_context = [ - "IA_ void x64_MOV_RAX_RDX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RDX_RAX); } // DROP", - "// Arithmetic (2-register stack: op RAX with RDX, result in RAX)", - "IA_ void x64_ADD_RAX_RDX() { emit8(x64_REX); emit8(x64_op_ADD_rm_reg); emit8(x64_modrm_RAX_RDX); }", -] -end_context = [ - "IA_ void x64_XCHG_RAX_RDX() { emit8(x64_REX); emit8(x64_op_XCHG_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_MOV_RDX_RAX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RAX_RDX); } // DUP", - "IA_ void x64_MOV_RAX_RDX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RDX_RAX); } // DROP", -] -content_hash = "a8193599320669196e09ad05e5f62a4e" -tag = "auto-ast" -comment = "x64_MOV_RAX_RDX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 439 -end_line = 439 -start_context = [ - "IA_ void x64_ADD_RAX_RDX() { emit8(x64_REX); emit8(x64_op_ADD_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_SUB_RAX_RDX() { emit8(x64_REX); emit8(x64_op_SUB_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_IMUL_RAX_RDX() { emit8(x64_REX); emit8(x64_op_IMUL_reg_rm); emit8(x64_op_IMUL_reg_rm2); emit8(x64_modrm_RAX_RDX); }", -] -end_context = [ - "IA_ void x64_MOV_RAX_RDX() { emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RDX_RAX); } // DROP", - "// Arithmetic (2-register stack: op RAX with RDX, result in RAX)", - "IA_ void x64_ADD_RAX_RDX() { emit8(x64_REX); emit8(x64_op_ADD_rm_reg); emit8(x64_modrm_RAX_RDX); }", -] -content_hash = "5dd11b83961bdd8f58d57ca53a4e0273" -tag = "auto-ast" -comment = "x64_ADD_RAX_RDX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 440 -end_line = 440 -start_context = [ - "IA_ void x64_SUB_RAX_RDX() { emit8(x64_REX); emit8(x64_op_SUB_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_IMUL_RAX_RDX() { emit8(x64_REX); emit8(x64_op_IMUL_reg_rm); emit8(x64_op_IMUL_reg_rm2); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_DEC_RAX() { emit8(x64_REX); emit8(x64_op_UNARY); emit8(x64_modrm(x64_mod_reg, x64_ext_DEC, x64_reg_RAX)); }", -] -end_context = [ - "// Arithmetic (2-register stack: op RAX with RDX, result in RAX)", - "IA_ void x64_ADD_RAX_RDX() { emit8(x64_REX); emit8(x64_op_ADD_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_SUB_RAX_RDX() { emit8(x64_REX); emit8(x64_op_SUB_rm_reg); emit8(x64_modrm_RAX_RDX); }", -] -content_hash = "e11a6b7c4d0b7785384d77f98e436a78" -tag = "auto-ast" -comment = "x64_SUB_RAX_RDX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 441 -end_line = 441 -start_context = [ - "IA_ void x64_IMUL_RAX_RDX() { emit8(x64_REX); emit8(x64_op_IMUL_reg_rm); emit8(x64_op_IMUL_reg_rm2); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_DEC_RAX() { emit8(x64_REX); emit8(x64_op_UNARY); emit8(x64_modrm(x64_mod_reg, x64_ext_DEC, x64_reg_RAX)); }", - "// Flag Operations (for conditional returns)", -] -end_context = [ - "IA_ void x64_ADD_RAX_RDX() { emit8(x64_REX); emit8(x64_op_ADD_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_SUB_RAX_RDX() { emit8(x64_REX); emit8(x64_op_SUB_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_IMUL_RAX_RDX() { emit8(x64_REX); emit8(x64_op_IMUL_reg_rm); emit8(x64_op_IMUL_reg_rm2); emit8(x64_modrm_RAX_RDX); }", -] -content_hash = "e39f929f7c294075eddc91ce1ecabe01" -tag = "auto-ast" -comment = "x64_IMUL_RAX_RDX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 442 -end_line = 442 -start_context = [ - "IA_ void x64_DEC_RAX() { emit8(x64_REX); emit8(x64_op_UNARY); emit8(x64_modrm(x64_mod_reg, x64_ext_DEC, x64_reg_RAX)); }", - "// Flag Operations (for conditional returns)", - "IA_ void x64_TEST_RAX_RAX() { emit8(x64_REX); emit8(x64_op_TEST_rm_reg); emit8(x64_modrm_RAX_RAX); }", -] -end_context = [ - "IA_ void x64_SUB_RAX_RDX() { emit8(x64_REX); emit8(x64_op_SUB_rm_reg); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_IMUL_RAX_RDX() { emit8(x64_REX); emit8(x64_op_IMUL_reg_rm); emit8(x64_op_IMUL_reg_rm2); emit8(x64_modrm_RAX_RDX); }", - "IA_ void x64_DEC_RAX() { emit8(x64_REX); emit8(x64_op_UNARY); emit8(x64_modrm(x64_mod_reg, x64_ext_DEC, x64_reg_RAX)); }", -] -content_hash = "2eb643d1c54149b7d570974be4f6d0da" -tag = "auto-ast" -comment = "x64_DEC_RAX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 444 -end_line = 444 -start_context = [ - "IA_ void x64_TEST_RAX_RAX() { emit8(x64_REX); emit8(x64_op_TEST_rm_reg); emit8(x64_modrm_RAX_RAX); }", - "// Conditional Returns (TEST must precede these)", - "IA_ void x64_RET_IF_ZERO() { x64_TEST_RAX_RAX(); emit8(x64_op_JNZ_rel8); emit8(0x01); emit8(x64_op_RET); } // JNZ skips the RET if RAX != 0, so RET only fires when RAX == 0", -] -end_context = [ - "IA_ void x64_DEC_RAX() { emit8(x64_REX); emit8(x64_op_UNARY); emit8(x64_modrm(x64_mod_reg, x64_ext_DEC, x64_reg_RAX)); }", - "// Flag Operations (for conditional returns)", - "IA_ void x64_TEST_RAX_RAX() { emit8(x64_REX); emit8(x64_op_TEST_rm_reg); emit8(x64_modrm_RAX_RAX); }", -] -content_hash = "4487f0b945fa74a04ca5bca7282f90b2" -tag = "auto-ast" -comment = "x64_TEST_RAX_RAX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 446 -end_line = 446 -start_context = [ - "IA_ void x64_RET_IF_ZERO() { x64_TEST_RAX_RAX(); emit8(x64_op_JNZ_rel8); emit8(0x01); emit8(x64_op_RET); } // JNZ skips the RET if RAX != 0, so RET only fires when RAX == 0", - "IA_ void x64_RET_IF_SIGN() { x64_TEST_RAX_RAX(); emit8(x64_op_JNS_rel8); emit8(0x01); emit8(x64_op_RET); } // JNS skips the RET if RAX >= 0, so RET only fires when RAX < 0", - "// Tape Drive Memory (Preemptive Scatter via RBX base pointer)", -] -end_context = [ - "IA_ void x64_TEST_RAX_RAX() { emit8(x64_REX); emit8(x64_op_TEST_rm_reg); emit8(x64_modrm_RAX_RAX); }", - "// Conditional Returns (TEST must precede these)", - "IA_ void x64_RET_IF_ZERO() { x64_TEST_RAX_RAX(); emit8(x64_op_JNZ_rel8); emit8(0x01); emit8(x64_op_RET); } // JNZ skips the RET if RAX != 0, so RET only fires when RAX == 0", -] -content_hash = "75e13ed97ca67d727964eeb7d7ce0813" -tag = "auto-ast" -comment = "x64_RET_IF_ZERO" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 447 -end_line = 447 -start_context = [ - "IA_ void x64_RET_IF_SIGN() { x64_TEST_RAX_RAX(); emit8(x64_op_JNS_rel8); emit8(0x01); emit8(x64_op_RET); } // JNS skips the RET if RAX >= 0, so RET only fires when RAX < 0", - "// Tape Drive Memory (Preemptive Scatter via RBX base pointer)", - "IA_ void x64_FETCH() {", -] -end_context = [ - "// Conditional Returns (TEST must precede these)", - "IA_ void x64_RET_IF_ZERO() { x64_TEST_RAX_RAX(); emit8(x64_op_JNZ_rel8); emit8(0x01); emit8(x64_op_RET); } // JNZ skips the RET if RAX != 0, so RET only fires when RAX == 0", - "IA_ void x64_RET_IF_SIGN() { x64_TEST_RAX_RAX(); emit8(x64_op_JNS_rel8); emit8(0x01); emit8(x64_op_RET); } // JNS skips the RET if RAX >= 0, so RET only fires when RAX < 0", -] -content_hash = "6a8130df1c08bee9ee8bf18c13b94f1a" -tag = "auto-ast" -comment = "x64_RET_IF_SIGN" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 450 -end_line = 455 -start_context = [ - "IA_ void x64_FETCH() {", - "emit8(x64_REX);", - "emit8(x64_op_MOV_reg_rm);", -] -end_context = [ - "emit8(x64_modrm_RAX_sib);", - "emit8(x64_sib_tape);", - "}", -] -content_hash = "10d6a6f3899d482328ec8690d0ea2f9e" -tag = "auto-ast" -comment = "x64_FETCH" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 456 -end_line = 461 -start_context = [ - "IA_ void x64_STORE() {", - "emit8(x64_REX);", - "emit8(x64_op_MOV_rm_reg);", -] -end_context = [ - "emit8(x64_modrm_RDX_sib);", - "emit8(x64_sib_tape);", - "}", -] -content_hash = "fefb4f42cc52595ceadd3f38665eb0b0" -tag = "auto-ast" -comment = "x64_STORE" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 463 -end_line = 466 -start_context = [ - "IA_ void x64_CALL_RAX() {", - "emit8(x64_op_UNARY);", - "emit8(x64_modrm(x64_mod_reg, x64_ext_CALL, x64_reg_RAX));", -] -end_context = [ - "emit8(x64_op_UNARY);", - "emit8(x64_modrm(x64_mod_reg, x64_ext_CALL, x64_reg_RAX));", - "}", -] -content_hash = "b878ccceb15566aa092ecb7719576002" -tag = "auto-ast" -comment = "x64_CALL_RAX" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 467 -end_line = 467 -start_context = [ - "IA_ void x64_RET() { emit8(x64_op_RET); } // RET", - "// Forward-jump placeholder: emits JMP rel32 with a zero displacement and writes", - "// the offset of the displacement field into *offset_out so it can be patched later.", -] -end_context = [ - "emit8(x64_modrm(x64_mod_reg, x64_ext_CALL, x64_reg_RAX));", - "}", - "IA_ void x64_RET() { emit8(x64_op_RET); } // RET", -] -content_hash = "cc7179f7ff6aaa91ae5803e0297a27df" -tag = "auto-ast" -comment = "x64_RET" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 471 -end_line = 475 -start_context = [ - "IA_ void x64_JMP_fwd_placeholder(U4* offset_out) {", - "emit8(x64_op_JMP_rel32);", - "offset_out[0] = u4_(code_arena.used);", -] -end_context = [ - "offset_out[0] = u4_(code_arena.used);", - "emit32(0);", - "}", -] -content_hash = "c4e7f8450e149c62c74efaf323dfe450" -tag = "auto-ast" -comment = "x64_JMP_fwd_placeholder" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 479 -end_line = 481 -start_context = [ - "IA_ void x64_patch_fwd(U4 offset) {", - "u4_r(code_arena.start + offset)[0] = u4_(code_arena.used) - (offset + 4);", - "}", -] -end_context = [ - "IA_ void x64_patch_fwd(U4 offset) {", - "u4_r(code_arena.start + offset)[0] = u4_(code_arena.used) - (offset + 4);", - "}", -] -content_hash = "9f671a50965fed32f53044dc485ad1ef" -tag = "auto-ast" -comment = "x64_patch_fwd" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 484 -end_line = 489 -start_context = [ - "IA_ void x64_JMP_IF_ZERO_fwd_placeholder(U4* offset_out) {", - "x64_TEST_RAX_RAX();", - "emit8(0x0F); emit8(0x84); // JZ rel32", -] -end_context = [ - "offset_out[0] = u4_(code_arena.used);", - "emit32(0);", - "}", -] -content_hash = "cc8c231806b9ddea41d33f1a55b1aca9" -tag = "auto-ast" -comment = "x64_JMP_IF_ZERO_fwd_placeholder" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 492 -end_line = 496 -start_context = [ - "IA_ void x64_JMP_back(U4 target) {", - "emit8(x64_op_JMP_rel32);", - "S4 rel32 = s4_(target) - s4_(code_arena.used + 4);", -] -end_context = [ - "S4 rel32 = s4_(target) - s4_(code_arena.used + 4);", - "emit32(u4_(rel32));", - "}", -] -content_hash = "5a484ea4d991c2d133552a39f22a5c2a" -tag = "auto-ast" -comment = "x64_JMP_back" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 504 -end_line = 509 -start_context = [ - "IA_ void x64_JIT_PROLOGUE() {", - "emit8(x64_op_PUSH_RBX);", - "emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RCX_RBX);", -] -end_context = [ - "emit8(x64_REX); emit8(x64_op_MOV_reg_rm); emit8(x64_modrm_RAX_mem_disp8_RBX); emit8(x64_vm_rax_slot);", - "emit8(x64_REX); emit8(x64_op_MOV_reg_rm); emit8(x64_modrm_RDX_mem_disp8_RBX); emit8(x64_vm_rdx_slot);", - "}", -] -content_hash = "392321f98b13305af98ad1c16e2033a3" -tag = "auto-ast" -comment = "x64_JIT_PROLOGUE" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 511 -end_line = 516 -start_context = [ - "IA_ void x64_JIT_EPILOGUE() {", - "emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RAX_mem_disp8_RBX); emit8(x64_vm_rax_slot);", - "emit8(x64_REX); emit8(x64_op_MOV_rm_reg); emit8(x64_modrm_RDX_mem_disp8_RBX); emit8(x64_vm_rdx_slot);", -] -end_context = [ - "emit8(x64_op_POP_RBX);", - "emit8(x64_op_RET);", - "}", -] -content_hash = "78ff3d472bbcba36a8a2f55b94f493d0" -tag = "auto-ast" -comment = "x64_JIT_EPILOGUE" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 520 -end_line = 525 -start_context = [ - "IA_ void x64_FFI_PROLOGUE() {", - "emit8(x64_op_PUSH_RDX);", - "emit8(x64_REX); emit8(x64_op_ARITH_imm8);", -] -end_context = [ - "emit8(x64_modrm(x64_mod_reg, x64_ext_SUB, x64_reg_RSP));", - "emit8(x64_ffi_shadow_space);", - "}", -] -content_hash = "c47405d7e0fe9d03507f744a3b7e025e" -tag = "auto-ast" -comment = "x64_FFI_PROLOGUE" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 559 -end_line = 646 -start_context = [ - "internal void compile_action(U4 val)", - "{", - "if (val >= 0x10000) {", -] -end_context = [ - "pad32();", - "}", - "}", -] -content_hash = "cc296aa9e48ec658512efb9bf23dc247" -tag = "auto-ast" -comment = "compile_action" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 649 -end_line = 795 -start_context = [ - "IA_ void compile_and_run_tape(void)", - "{", - "farena_reset(& code_arena);", -] -end_context = [ - "};", - "debug_log(str8(\"JIT finished. RAX: , RDX: \"), ktl_str8_from_arr(post_jit_log_table));", - "}", -] -content_hash = "b2c1c86b4e998be5c16ede875f1e5c4f" -tag = "auto-ast" -comment = "compile_and_run_tape" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 811 -end_line = 814 -start_context = [ - "internal int text_width_cb(mu_Font font, const char *str, int len) {", - "if (len == -1) { len = 0; while (str[len]) len++; }", - "return len * 11; // Approx 11px per char for Consolas 20", -] -end_context = [ - "if (len == -1) { len = 0; while (str[len]) len++; }", - "return len * 11; // Approx 11px per char for Consolas 20", - "}", -] -content_hash = "d974946a365546edd1017404d6f32d1c" -tag = "auto-ast" -comment = "text_width_cb" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 816 -end_line = 818 -start_context = [ - "internal int text_height_cb(mu_Font font) {", - "return 20; // Consolas 20 height", - "}", -] -end_context = [ - "internal int text_height_cb(mu_Font font) {", - "return 20; // Consolas 20 height", - "}", -] -content_hash = "a5fcbad1d9c99aa3d5de49e19965e9c6" -tag = "auto-ast" -comment = "text_height_cb" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 820 -end_line = 829 -start_context = [ - "internal void gdi_draw_rect(void* hdc, mu_Rect rect, mu_Color color) {", - "U1 red = ((U1*)&color)[0];", - "U1 green = ((U1*)&color)[1];", -] -end_context = [ - "ms_select_object(hdc, hOldBrush);", - "ms_delete_object(hBrush);", - "}", -] -content_hash = "3988e5bc289d1596f959d7d3d30f4f8a" -tag = "auto-ast" -comment = "gdi_draw_rect" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 831 -end_line = 857 -start_context = [ - "internal void render_microui(void* hdc) {", - "mu_Command *cmd = NULL;", - "while (mu_next_command(&mu_ctx, &cmd)) {", -] -end_context = [ - "}", - "}", - "}", -] -content_hash = "a2e49f5dc0ed1d52c9538f8485d4ec8f" -tag = "auto-ast" -comment = "render_microui" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 859 -end_line = 1277 -start_context = [ - "S8 win_proc(void* hwnd, U4 msg, U8 wparam, S8 lparam)", - "{", - "U8 tape_count = tape_arena.used / sizeof(U4);", -] -end_context = [ - "}", - "return ms_def_window_proc_a(hwnd, msg, wparam, lparam);", - "}", -] -content_hash = "a7db1c70a96a27c80fe8393bb93a93e8" -tag = "auto-ast" -comment = "win_proc" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 1279 -end_line = 1425 -start_context = [ - "int main(void) {", - "Slice tape_mem = slice_ut_(u8_(ms_virtual_alloc(nullptr, 64 * 1024, MS_MEM_COMMIT | MS_MEM_RESERVE, MS_PAGE_READWRITE)), 64 * 1024);", - "Slice anno_mem = slice_ut_(u8_(ms_virtual_alloc(nullptr, 64 * 1024, MS_MEM_COMMIT | MS_MEM_RESERVE, MS_PAGE_READWRITE)), 64 * 1024);", -] -end_context = [ - "ms_exit_process(0);", - "return 0;", - "}", -] -content_hash = "ecb4355e0c3d7667d464acf0ec3bc422" -tag = "auto-ast" -comment = "main" - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/gte_hello/hello_gte.c" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 33 -end_line = 53 -start_context = [ - "void ent_cube128_init(A8_V3_S2* verts, A6_V4_S2* faces) {", - "memory_copy(verts, & (A8_V3_S2) {", - "{ -128, -128, -128 },", -] -end_context = [ - "}, size_of(A6_V4_S2) );", - "return;", - "}", -] -content_hash = "646b0dcb5e622c87b956afd938631806" -tag = "auto-ast" -comment = "ent_cube128_init" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 68 -end_line = 79 -start_context = [ - "void ent_floor_init(A4_V3_S2* verts, A2_V3_S2* faces) {", - "memory_copy(verts, &(A4_V3_S2) {", - "{ -900, 0, -900 },", -] -end_context = [ - "{ 1, 3, 2 },", - "}, size_of(A2_V3_S2));", - "};", -] -content_hash = "556b6f033b6b395991785daa80972142" -tag = "auto-ast" -comment = "ent_floor_init" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 103 -end_line = 110 -start_context = [ - "B1* prim__alloc(U4 type_width, Str8 type_name) {", - "gknown PrimitiveArena* pa = & static_mem.primitives;", - "gknown B1* buf = (B1*) r_(static_mem.primitives.buf)[static_mem.active_buf_id];", -] -end_context = [ - "pa->used += type_width;", - "return next;", - "}", -] -content_hash = "5596cef46b52a258170f40ae17386565" -tag = "auto-ast" -comment = "prim__alloc" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 113 -end_line = 143 -start_context = [ - "void gp_screen_init_c11(DoubleBuffer* screen_buf, S2* active_buf_id)", - "{", - "reset_graph(0);", -] -end_context = [ - "geom_set_screen(ScreenZ);", - "set_display_enabled(1); // gp_DisplayEnabled", - "}", -] -content_hash = "61bce702db9b12ae4329409cd7535b8b" -tag = "auto-ast" -comment = "gp_screen_init_c11" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 145 -end_line = 155 -start_context = [ - "void gp_display_frame(DoubleBuffer* screen_buf, S2* active_buf_id, U4* ordering_buf, PrimitiveArena* pa) {", - "draw_sync(0);", - "vsync(0);", -] -end_context = [ - "}", - "active_buf_id[0] = ! active_buf_id[0]; // Swap current buffer", - "}", -] -content_hash = "66a6dfb7445d1e2767a186dddf8c11df" -tag = "auto-ast" -comment = "gp_display_frame" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 157 -end_line = 158 -start_context = [ - "void render(void) {", - "}", - "// #define gte_ldv0(r0) \\", -] -end_context = [ - "}", - "void render(void) {", - "}", -] -content_hash = "b07a4db542a77686293b05ccbacf5922" -tag = "auto-ast" -comment = "render" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 180 -end_line = 275 -start_context = [ - "void update(PrimitiveArena* pa, U4* ordering_buf)", - "{", - "orderingtbl_clear_reverse(ordering_buf, OrderingTbl_Len);", -] -end_context = [ - "static_mem.floor.rot.y += 5;", - "}", - "}", -] -content_hash = "3ada04fa896e476bb474581f10b652fd" -tag = "auto-ast" -comment = "update" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 277 -end_line = 307 -start_context = [ - "int main(void)", - "{", - "static_mem = (SMemory){0};", -] -end_context = [ - "};", - "return 0;", - "}", -] -content_hash = "c7ae5ef7110c279a600a87500fc84e6a" -tag = "auto-ast" -comment = "main" - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/gte_hello/hello_gte.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 172 -end_line = 172 -start_context = [ - "FI_ S4 rtp_v3s2(V3_S2* vec, V2_S2* xy, A2_S2* pp, S4* flag) { return rtp_v3s2_raw(vec, cast(S4*R_, & xy->x), cast(S4*R_, pp), r_(flag)); }", - "S4 rtp_avg_nclip_a3_v3s2_raw(V3_S2* v0, V3_S2* v1, V3_S2* v2, S4* xy1, S4* xy2, S4* xy3, S4* pp, S4* otz, S4* flag) __asm__(\"RotAverageNclip3\");", - "FI_ S4 rtp_avg_nclip_a3_v3s2(", -] -end_context = [ - "// Rotation, Translation, Perspective", - "S4 rtp_v3s2_raw(V3_S2* vec, S4* xy, S4* pp, S4* flag) __asm__(\"RotTransPers\");", - "FI_ S4 rtp_v3s2(V3_S2* vec, V2_S2* xy, A2_S2* pp, S4* flag) { return rtp_v3s2_raw(vec, cast(S4*R_, & xy->x), cast(S4*R_, pp), r_(flag)); }", -] -content_hash = "8b4c62a1657099da111b0a63e0027cf7" -tag = "auto-ast" -comment = "rtp_v3s2" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 175 -end_line = 185 -start_context = [ - "FI_ S4 rtp_avg_nclip_a3_v3s2(", - "V3_S2* v0, V3_S2* v1, V3_S2* v2,", - "V2_S2* xy0, V2_S2* xy1, V2_S2* xy2,", -] -end_context = [ - "cast(S4*R_, pp), cast(S4*R_, otz), cast(S4*R_, flag)", - ");", - "}", -] -content_hash = "7e0e1762a8ba07dac29c37fe1c6d0cd8" -tag = "auto-ast" -comment = "rtp_avg_nclip_a3_v3s2" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 188 -end_line = 198 -start_context = [ - "FI_ S4 rtp_avg_nclip_a4_v3s2(", - "V3_S2* v0, V3_S2* v1, V3_S2* v2, V3_S2* v3,", - "V2_S2* xy0, V2_S2* xy1, V2_S2* xy2, V2_S2* xy3,", -] -end_context = [ - "cast(S4*R_, pp), cast(S4*R_, otz), cast(S4*R_, flag)", - ");", - "}", -] -content_hash = "a9d15240177bedca870672841af31ea9" -tag = "auto-ast" -comment = "rtp_avg_nclip_a4_v3s2" - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/readme.md" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/scripts/build_psyq.ps1" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/scripts/debug_psyq.ps1" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/scripts/helpers/misc.ps1" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/scripts/update_deps.ps1" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/toolchain/psyq_iwyu/include/inline_n.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/dsl.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 174 -end_line = 174 -start_context = [ - "IA_ void assert(U8 cond) { if(cond){return;} else{debug_trap(); ms_exit_process(1);} }", - "#else", - "#define assert(cond)", -] -end_context = [ - "#define debug_trap() __builtin_debugtrap()", - "#if BUILD_DEBUG", - "IA_ void assert(U8 cond) { if(cond){return;} else{debug_trap(); ms_exit_process(1);} }", -] -content_hash = "504a1c99839be4877c5a3b724a12e06e" -tag = "auto-ast" -comment = "assert" - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/gcc_asm.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/gp.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/gte.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/math.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 45 -end_line = 49 -start_context = [ - "FI_ void add_a3s4(A3_S4_R out_a, A3_S4 b) {", - "(out_a[0])[0] += b[0];", - "(out_a[0])[1] += b[1];", -] -end_context = [ - "(out_a[0])[1] += b[1];", - "(out_a[0])[2] += b[2];", - "}", -] -content_hash = "66ceb2e4b323cd5dedc0eb5c82dc036b" -tag = "auto-ast" -comment = "add_a3s4" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 51 -end_line = 55 -start_context = [ - "FI_ void add_a3s4_fp(A3_S4_R out_a, A3_S4 b) {", - "(out_a[0])[0] += b[0] >> 1;", - "(out_a[0])[1] += b[1] >> 1;", -] -end_context = [ - "(out_a[0])[1] += b[1] >> 1;", - "(out_a[0])[2] += b[2] >> 1;", - "}", -] -content_hash = "a279c52ce25ddf3e674231e2baa7a200" -tag = "auto-ast" -comment = "add_a3s4_fp" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 57 -end_line = 59 -start_context = [ - "FI_ void add_v3s4(V3_S4_R out_a, V3_S4 b) {", - "add_a3s4(pcast(A3_S4_R, out_a), pcast(A3_S4, b));", - "}", -] -end_context = [ - "FI_ void add_v3s4(V3_S4_R out_a, V3_S4 b) {", - "add_a3s4(pcast(A3_S4_R, out_a), pcast(A3_S4, b));", - "}", -] -content_hash = "606733e81b82797cd4d628eabc64500b" -tag = "auto-ast" -comment = "add_v3s4" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 61 -end_line = 63 -start_context = [ - "FI_ void add_v3s4_fp(V3_S4_R out_a, V3_S4 b) {", - "add_a3s4_fp(pcast(A3_S4_R, out_a), pcast(A3_S4, b));", - "}", -] -end_context = [ - "FI_ void add_v3s4_fp(V3_S4_R out_a, V3_S4 b) {", - "add_a3s4_fp(pcast(A3_S4_R, out_a), pcast(A3_S4, b));", - "}", -] -content_hash = "18adef104e35260e4b57602e76c82679" -tag = "auto-ast" -comment = "add_v3s4_fp" - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/memory.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 13 -end_line = 17 -start_context = [ - "inline U4 align_pow2(U4 x, U4 b) {", - "assert(b != 0);", - "assert((b & (b - 1)) == 0); // Check power of 2", -] -end_context = [ - "assert((b & (b - 1)) == 0); // Check power of 2", - "return ((x + b - 1) & (~(b - 1)));", - "}", -] -content_hash = "958b182d9e796e85369a57befcd7d8a8" -tag = "auto-ast" -comment = "align_pow2" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 21 -end_line = 24 -start_context = [ - "FI_ void mem_bump(U4 start, U4 cap, U4*R_ used, U4 amount) {", - "assert(amount <= (cap - used[0]));", - "used[0] += amount;", -] -end_context = [ - "assert(amount <= (cap - used[0]));", - "used[0] += amount;", - "}", -] -content_hash = "8bd8e3c8c5e2d6301a114d7da3da6a8a" -tag = "auto-ast" -comment = "mem_bump" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 26 -end_line = 26 -start_context = [ - "FI_ U4 mem_copy (U4 dest, U4 src, U4 len) { return (U4)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", - "FI_ U4 mem_copy_overlapping(U4 dest, U4 src, U4 len) { return (U4)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "FI_ U4 mem_fill (U4 dest, U4 value, U4 len) { return (U4)(__builtin_memset ((void*)dest, (int) value, len)); }", -] -end_context = [ - "used[0] += amount;", - "}", - "FI_ U4 mem_copy (U4 dest, U4 src, U4 len) { return (U4)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", -] -content_hash = "5e22a7e89504c8f3cea9f1bcb25ab152" -tag = "auto-ast" -comment = "mem_copy" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 27 -end_line = 27 -start_context = [ - "FI_ U4 mem_copy_overlapping(U4 dest, U4 src, U4 len) { return (U4)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "FI_ U4 mem_fill (U4 dest, U4 value, U4 len) { return (U4)(__builtin_memset ((void*)dest, (int) value, len)); }", - "FI_ B4 mem_zero (U4 dest, U4 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", -] -end_context = [ - "}", - "FI_ U4 mem_copy (U4 dest, U4 src, U4 len) { return (U4)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", - "FI_ U4 mem_copy_overlapping(U4 dest, U4 src, U4 len) { return (U4)(__builtin_memmove((void*)dest, (void const*)src, len)); }", -] -content_hash = "43174fedadc7bda4e555e8944a0de765" -tag = "auto-ast" -comment = "mem_copy_overlapping" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 28 -end_line = 28 -start_context = [ - "FI_ U4 mem_fill (U4 dest, U4 value, U4 len) { return (U4)(__builtin_memset ((void*)dest, (int) value, len)); }", - "FI_ B4 mem_zero (U4 dest, U4 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", - "#pragma region DAG", -] -end_context = [ - "FI_ U4 mem_copy (U4 dest, U4 src, U4 len) { return (U4)(__builtin_memcpy ((void*)dest, (void const*)src, len)); }", - "FI_ U4 mem_copy_overlapping(U4 dest, U4 src, U4 len) { return (U4)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "FI_ U4 mem_fill (U4 dest, U4 value, U4 len) { return (U4)(__builtin_memset ((void*)dest, (int) value, len)); }", -] -content_hash = "e9eb07a10c4ea903e5379681ebeeeffd" -tag = "auto-ast" -comment = "mem_fill" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 29 -end_line = 29 -start_context = [ - "FI_ B4 mem_zero (U4 dest, U4 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", - "#pragma region DAG", - "#define check_nil(nil, p) ((p) == 0 || (p) == nil)", -] -end_context = [ - "FI_ U4 mem_copy_overlapping(U4 dest, U4 src, U4 len) { return (U4)(__builtin_memmove((void*)dest, (void const*)src, len)); }", - "FI_ U4 mem_fill (U4 dest, U4 value, U4 len) { return (U4)(__builtin_memset ((void*)dest, (int) value, len)); }", - "FI_ B4 mem_zero (U4 dest, U4 len) { if(dest == 0){return false;} mem_fill(dest, 0, len); return true; }", -] -content_hash = "affc51f87cf50c4139b3baa32a443d93" -tag = "auto-ast" -comment = "mem_zero" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 62 -end_line = 62 -start_context = [ - "FI_ Slice slice_ut_(U4 ptr, U4 len) { return (Slice){ptr, len}; }", - "#define Slice_(type) Struct_(tmpl(Slice,type)) { type* ptr; U4 len; }", - "typedef Slice_(B1);", -] -end_context = [ - "#define txt(string_literal) (Str8){ (UTF8*) string_literal, S_(string_literal) - 1 }", - "typedef Struct_(Slice) { U4 ptr, len; }; // Untyped Slice", - "FI_ Slice slice_ut_(U4 ptr, U4 len) { return (Slice){ptr, len}; }", -] -content_hash = "1f8fd705a7d0deea80eea4e816035281" -tag = "auto-ast" -comment = "slice_ut_" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 77 -end_line = 77 -start_context = [ - "FI_ void slice_zero_(Slice s) { slice_assert(s); mem_zero(s.ptr, s.len); }", - "#define slice_zero(s) slice_zero_(slice_to_ut(s))", - "FI_ void slice_copy_(Slice dest, Slice src) {", -] -end_context = [ - "#define slice_iter(container, iter) (T_((container).ptr) iter = (container).ptr; iter != slice_end(container); ++ iter)", - "#define slice_arg_from_array(type, ...) & (tmpl(Slice,type)) { .ptr = array_decl(type,__VA_ARGS__), .len = array_len( array_decl(type,__VA_ARGS__)) }", - "FI_ void slice_zero_(Slice s) { slice_assert(s); mem_zero(s.ptr, s.len); }", -] -content_hash = "45e8c6802ae2b2e3682a27a6f794a8d5" -tag = "auto-ast" -comment = "slice_zero_" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 80 -end_line = 85 -start_context = [ - "FI_ void slice_copy_(Slice dest, Slice src) {", - "assert(dest.len >= src.len);", - "slice_assert(dest);", -] -end_context = [ - "slice_assert(src);", - "mem_copy(dest.ptr, src.ptr, src.len);", - "}", -] -content_hash = "7de25796a039e09854d504f8e460ab4e" -tag = "auto-ast" -comment = "slice_copy_" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 97 -end_line = 101 -start_context = [ - "FI_ void farena_init(FArena_R arena, Slice mem) { assert(arena != nullptr);", - "arena->start = mem.ptr;", - "arena->capacity = mem.len;", -] -end_context = [ - "arena->capacity = mem.len;", - "arena->used = 0;", - "}", -] -content_hash = "617c059807c0e5dd7afce6d3abeecafe" -tag = "auto-ast" -comment = "farena_init" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 102 -end_line = 102 -start_context = [ - "FI_ FArena farena_make(Slice mem) { FArena a; farena_init(& a, mem); return a; }", - "I_ Slice farena_push(FArena_R arena, U4 amount, Opt_farena o) {", - "if (amount == 0) { return (Slice){}; }", -] -end_context = [ - "arena->used = 0;", - "}", - "FI_ FArena farena_make(Slice mem) { FArena a; farena_init(& a, mem); return a; }", -] -content_hash = "9d363bd198113760e78cec92363c322f" -tag = "auto-ast" -comment = "farena_make" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 103 -end_line = 109 -start_context = [ - "I_ Slice farena_push(FArena_R arena, U4 amount, Opt_farena o) {", - "if (amount == 0) { return (Slice){}; }", - "U4 desired = amount * (o.type_width == 0 ? 1 : o.type_width);", -] -end_context = [ - "mem_bump(arena->start, arena->capacity, & arena->used, to_commit);", - "return (Slice){ arena->start + arena->used, to_commit };", - "}", -] -content_hash = "7135c9a3012ae8075b7f7c14c06ed44f" -tag = "auto-ast" -comment = "farena_push" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 110 -end_line = 110 -start_context = [ - "FI_ void farena_reset(FArena_R arena) { arena->used = 0; }", - "FI_ void farena_rewind(FArena_R arena, U4 save_point) {", - "U4 end = arena->start + arena->used; assert_bounds(save_point, arena->start, end);", -] -end_context = [ - "return (Slice){ arena->start + arena->used, to_commit };", - "}", - "FI_ void farena_reset(FArena_R arena) { arena->used = 0; }", -] -content_hash = "c6394b2ff2e3410f4932cb7f71e09fe1" -tag = "auto-ast" -comment = "farena_reset" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 111 -end_line = 114 -start_context = [ - "FI_ void farena_rewind(FArena_R arena, U4 save_point) {", - "U4 end = arena->start + arena->used; assert_bounds(save_point, arena->start, end);", - "arena->used -= save_point - arena->start;", -] -end_context = [ - "U4 end = arena->start + arena->used; assert_bounds(save_point, arena->start, end);", - "arena->used -= save_point - arena->start;", - "}", -] -content_hash = "be85abf344785179f8dcd6ddb5bf6111" -tag = "auto-ast" -comment = "farena_rewind" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 115 -end_line = 115 -start_context = [ - "FI_ U4 farena_save(FArena arena) { return arena.used; }", - "#define farena_push_(arena, amount, ...) farena_push((arena), (amount), opt_(farena, __VA_ARGS__))", - "#define farena_push_type(arena, type, ...) C_(type*, farena_push((arena), 1, opt_(farena, .type_width=S_(type), __VA_ARGS__)).ptr)", -] -end_context = [ - "arena->used -= save_point - arena->start;", - "}", - "FI_ U4 farena_save(FArena arena) { return arena.used; }", -] -content_hash = "0bb48e8fe40fc1d25b9a6a25308dcb4d" -tag = "auto-ast" -comment = "farena_save" - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/mips.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false - -[discussions.main.context_snapshot.ast_mask] - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 227 -end_line = 259 -start_context = [ - "internal", - "Code CodeBlob_(mips_flush_icache) {", - "add_ui(rstack_ptr, rstack_ptr, -8), /* sp -= 8 */", -] -end_context = [ - "asm_mips_flush_icache();", - "}", - "// TAPE & EMITTERS", -] -content_hash = "28b6b2d96d691fd0bd1a7e95335949c5" -tag = "auto-ast" -comment = "CodeBlob_" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 239 -end_line = 239 -start_context = [ - "FI_ void mips_flush_icache(void) { C_(VoidFn*, codeblob_mips_flush_icache)(); }", - "#define clb_system \"$2\", \"$8\", \"$9\", \"$31\", \"memory\"", - "#define asm_mips_flush_icache() asm volatile( asm_inline( \\", -] -end_context = [ - "add_ui(rstack_ptr, rstack_ptr, 8) /* sp += 8 (BD) */", - "};", - "FI_ void mips_flush_icache(void) { C_(VoidFn*, codeblob_mips_flush_icache)(); }", -] -content_hash = "832cbb9b398e03d4738db6bee82b8661" -tag = "auto-ast" -comment = "mips_flush_icache" - -[[discussions.main.context_snapshot.custom_slices]] -start_line = 255 -end_line = 257 -start_context = [ - "void test_mips_asm() {", - "asm_mips_flush_icache();", - "}", -] -end_context = [ - "void test_mips_asm() {", - "asm_mips_flush_icache();", - "}", -] -content_hash = "570955f25a7ce5352230e2ac8adde058" -tag = "auto-ast" -comment = "test_mips_asm" - -[[discussions.main.context_snapshot]] -path = "C:/projects/Pikuma/ps1/code/duffle/strings.h" -auto_aggregate = true -force_full = false -view_mode = "full" -ast_signatures = false -ast_definitions = false -custom_slices = [] - -[discussions.main.context_snapshot.ast_mask] +context_snapshot = [] [discussions.docs] git_commit = "68e895cb8a0144061d1e3b959b7c9f7f98a0c7ed" diff --git a/manualslop_layout.ini b/manualslop_layout.ini index 0febf32e..ddfe6f69 100644 --- a/manualslop_layout.ini +++ b/manualslop_layout.ini @@ -44,20 +44,20 @@ Collapsed=0 DockId=0x00000010,0 [Window][Message] -Pos=1430,28 -Size=1670,1875 +Pos=1276,28 +Size=1495,1608 Collapsed=0 DockId=0x00000006,0 [Window][Response] Pos=0,28 -Size=1428,1875 +Size=1274,1608 Collapsed=0 DockId=0x00000010,5 [Window][Tool Calls] -Pos=1430,28 -Size=1670,1875 +Pos=1276,28 +Size=1495,1608 Collapsed=0 DockId=0x00000006,3 @@ -77,7 +77,7 @@ DockId=0xAFC85805,2 [Window][Theme] Pos=0,28 -Size=1428,1875 +Size=1274,1608 Collapsed=0 DockId=0x00000010,0 @@ -105,26 +105,26 @@ Collapsed=0 DockId=0x0000000D,0 [Window][Discussion Hub] -Pos=1430,28 -Size=1670,1875 +Pos=1276,28 +Size=1495,1608 Collapsed=0 DockId=0x00000006,1 [Window][Operations Hub] Pos=0,28 -Size=1428,1875 +Size=1274,1608 Collapsed=0 DockId=0x00000010,4 [Window][Files & Media] Pos=0,28 -Size=1428,1875 +Size=1274,1608 Collapsed=0 DockId=0x00000010,2 [Window][AI Settings] Pos=0,28 -Size=1428,1875 +Size=1274,1608 Collapsed=0 DockId=0x00000010,3 @@ -140,8 +140,8 @@ Collapsed=0 DockId=0x00000006,2 [Window][Log Management] -Pos=1430,28 -Size=1670,1875 +Pos=1276,28 +Size=1495,1608 Collapsed=0 DockId=0x00000006,2 @@ -173,7 +173,7 @@ DockId=0x00000004,0 [Window][Approve PowerShell Command] Pos=649,435 -Size=381,329 +Size=1628,763 Collapsed=0 [Window][Last Script Output] @@ -342,8 +342,8 @@ Size=1658,1320 Collapsed=0 [Window][Persona Editor] -Pos=331,138 -Size=1823,1516 +Pos=782,139 +Size=1790,1516 Collapsed=0 [Window][Prompt Presets Manager] @@ -410,7 +410,7 @@ DockId=0x00000006,1 [Window][Project Settings] Pos=0,28 -Size=1428,1875 +Size=1274,1608 Collapsed=0 DockId=0x00000010,1 @@ -516,17 +516,18 @@ Size=1801,1532 Collapsed=0 [Window][Structural File Editor] -Pos=154,172 +Pos=156,171 Size=2176,1441 Collapsed=0 [Window][###Text_Viewer_Unified] -Pos=850,302 -Size=1123,916 +Pos=0,28 +Size=1274,1608 Collapsed=0 +DockId=0x00000010,6 [Window][Command Palette##manual_slop] -Pos=1196,784 +Pos=1295,781 Size=600,400 Collapsed=0 @@ -586,7 +587,7 @@ RefScale=20 Column 0 Width=60 Column 1 Width=89 Column 2 Weight=1.0000 -Column 3 Width=149 +Column 3 Width=228 [Table][0x2C515046,4] RefScale=20 @@ -647,13 +648,13 @@ Column 1 Weight=1.0000 [Table][0x1DA1F4A6,2] RefScale=20 Column 0 Weight=1.0000 -Column 1 Width=120 +Column 1 Width=509 [Table][0x5B562C13,3] RefScale=20 Column 0 Weight=1.0000 Column 1 Width=100 -Column 2 Width=186 +Column 2 Width=185 [Table][0x17AC2E33,4] RefScale=20 @@ -678,9 +679,9 @@ Column 2 Width=150 [Table][0x7804123E,3] RefScale=20 -Column 0 Width=20 +Column 0 Width=99 Column 1 Weight=1.0000 -Column 2 Width=684 +Column 2 Width=627 [Table][0x09B0112E,3] RefScale=20 @@ -695,7 +696,7 @@ Column 1 Width=30 [Table][0x9D36FCE8,2] RefScale=20 -Column 0 Width=742 +Column 0 Width=857 Column 1 Weight=1.0000 [Table][0xD9B78BEB,4] @@ -813,17 +814,24 @@ Column 3 Weight=79.8470 [Table][0x1CFFB223,4] +[Table][0x70E15D09,5] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 +Column 2 Weight=1.0000 +Column 3 Weight=1.0000 +Column 4 Weight=1.0000 + [Docking][Data] DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02 -DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,28 Size=3100,1875 Split=X +DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,28 Size=2771,1608 Split=X DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2357,1183 Split=X DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2 - DockNode ID=0x00000005 Parent=0x0000000B SizeRef=948,1681 Split=Y Selected=0x3F1379AF - DockNode ID=0x00000010 Parent=0x00000005 SizeRef=983,1140 CentralNode=1 Selected=0x418C7449 + DockNode ID=0x00000005 Parent=0x0000000B SizeRef=1274,1681 Split=Y Selected=0x3F1379AF + DockNode ID=0x00000010 Parent=0x00000005 SizeRef=983,1140 CentralNode=1 Selected=0x1DCB2623 DockNode ID=0x00000011 Parent=0x00000005 SizeRef=983,184 Selected=0x432BAE4E - DockNode ID=0x00000006 Parent=0x0000000B SizeRef=1670,1681 Selected=0x6F2B5B04 + DockNode ID=0x00000006 Parent=0x0000000B SizeRef=1495,1681 Selected=0x6F2B5B04 DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6 DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=488,1183 Selected=0x3AEC3498 diff --git a/project_history.toml b/project_history.toml index 2c9c6096..de6f192a 100644 --- a/project_history.toml +++ b/project_history.toml @@ -9,5 +9,5 @@ active = "main" [discussions.main] git_commit = "" -last_updated = "2026-06-03T13:49:29" +last_updated = "2026-06-04T20:08:39" history = [] diff --git a/src/paths.py b/src/paths.py index 78c20ac0..f0b2632c 100644 --- a/src/paths.py +++ b/src/paths.py @@ -93,6 +93,19 @@ def get_project_personas_path(project_root: Path) -> Path: """ return project_root / "project_personas.toml" +def get_global_themes_path() -> Path: + """ + [C: src/theme_2.py:load_themes_from_disk] + """ + root_dir = Path(__file__).resolve().parent.parent + return Path(os.environ.get("SLOP_GLOBAL_THEMES", root_dir / "themes")) + +def get_project_themes_path(project_root: Path) -> Path: + """ + [C: src/theme_2.py:load_themes_from_disk] + """ + return project_root / "project_themes.toml" + def get_global_workspace_profiles_path() -> Path: """ [C: src/workspace_manager.py:WorkspaceManager._get_path, src/workspace_manager.py:WorkspaceManager.load_all_profiles]