more progress on grime for code2

This commit is contained in:
2025-10-12 01:52:08 -04:00
parent 983cac0660
commit 54ff97b6c1
14 changed files with 1225 additions and 297 deletions

View File

@@ -1,8 +1,19 @@
package grime
// Context :: struct {
// }
Context :: struct {
allocator: AllocatorInfo,
temp_allocator: AllocatorInfo,
assertion_failure_proc: Assertion_Failure_Proc,
logger: Logger,
random_generator: Random_Generator,
// context_usr :: #force_inline proc( $ Type : typeid ) -> (^Type) {
// return cast(^Type) context.user_ptr
// }
user_ptr: rawptr,
user_index: int,
// Internal use only
_internal: rawptr,
}
context_usr :: #force_inline proc( $ Type : typeid ) -> (^Type) {
return cast(^Type) context.user_ptr
}