Reimplement #ordered again

This commit is contained in:
Ginger Bill
2017-05-12 10:27:14 +01:00
parent 87f1a62ca4
commit 45eecc0905
6 changed files with 40 additions and 37 deletions
+7 -7
View File
@@ -25,7 +25,7 @@ Calling_Convention :: enum {
FAST = 3,
}
Type_Info_Record :: struct {
Type_Info_Record :: struct #ordered {
types: []^Type_Info,
names: []string,
offsets: []int, // offsets may not be used in tuples
@@ -144,13 +144,13 @@ Allocator_Mode :: enum u8 {
Allocator_Proc :: #type proc(allocator_data: rawptr, mode: Allocator_Mode,
size, alignment: int,
old_memory: rawptr, old_size: int, flags: u64) -> rawptr;
Allocator :: struct {
Allocator :: struct #ordered {
procedure: Allocator_Proc,
data: rawptr,
}
Context :: struct {
Context :: struct #ordered {
thread_id: int,
allocator: Allocator,
@@ -559,18 +559,18 @@ __default_hash_string :: proc(s: string) -> u64 {
__INITIAL_MAP_CAP :: 16;
__Map_Key :: struct {
__Map_Key :: struct #ordered {
hash: u64,
str: string,
}
__Map_Find_Result :: struct {
__Map_Find_Result :: struct #ordered {
hash_index: int,
entry_prev: int,
entry_index: int,
}
__Map_Entry_Header :: struct {
__Map_Entry_Header :: struct #ordered {
key: __Map_Key,
next: int,
/*
@@ -578,7 +578,7 @@ __Map_Entry_Header :: struct {
*/
}
__Map_Header :: struct {
__Map_Header :: struct #ordered {
m: ^raw.Dynamic_Map,
is_key_string: bool,
entry_size: int,