mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Change u32 to u32le
This commit is contained in:
@@ -3,8 +3,8 @@ package odin_doc_format
|
|||||||
import "core:mem"
|
import "core:mem"
|
||||||
|
|
||||||
Array :: struct($T: typeid) {
|
Array :: struct($T: typeid) {
|
||||||
offset: u32,
|
offset: u32le,
|
||||||
length: u32,
|
length: u32le,
|
||||||
}
|
}
|
||||||
|
|
||||||
String :: distinct Array(byte);
|
String :: distinct Array(byte);
|
||||||
@@ -28,11 +28,11 @@ Magic_String :: "odindoc\x00";
|
|||||||
|
|
||||||
Header_Base :: struct {
|
Header_Base :: struct {
|
||||||
magic: [8]byte,
|
magic: [8]byte,
|
||||||
_: u32,
|
_: u32le,
|
||||||
version: Version_Type,
|
version: Version_Type,
|
||||||
total_size: u32,
|
total_size: u32le,
|
||||||
header_size: u32,
|
header_size: u32le,
|
||||||
hash: u32,
|
hash: u32le,
|
||||||
}
|
}
|
||||||
|
|
||||||
Header :: struct {
|
Header :: struct {
|
||||||
@@ -45,17 +45,17 @@ Header :: struct {
|
|||||||
types: Array(Type),
|
types: Array(Type),
|
||||||
}
|
}
|
||||||
|
|
||||||
File_Index :: distinct u32;
|
File_Index :: distinct u32le;
|
||||||
Pkg_Index :: distinct u32;
|
Pkg_Index :: distinct u32le;
|
||||||
Entity_Index :: distinct u32;
|
Entity_Index :: distinct u32le;
|
||||||
Type_Index :: distinct u32;
|
Type_Index :: distinct u32le;
|
||||||
|
|
||||||
|
|
||||||
Position :: struct {
|
Position :: struct {
|
||||||
file: File_Index,
|
file: File_Index,
|
||||||
line: u32,
|
line: u32le,
|
||||||
column: u32,
|
column: u32le,
|
||||||
offset: u32,
|
offset: u32le,
|
||||||
};
|
};
|
||||||
|
|
||||||
File :: struct {
|
File :: struct {
|
||||||
@@ -71,7 +71,7 @@ Pkg :: struct {
|
|||||||
entities: Array(Entity_Index),
|
entities: Array(Entity_Index),
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity_Kind :: enum u32 {
|
Entity_Kind :: enum u32le {
|
||||||
Invalid = 0,
|
Invalid = 0,
|
||||||
Constant = 1,
|
Constant = 1,
|
||||||
Variable = 2,
|
Variable = 2,
|
||||||
@@ -82,7 +82,7 @@ Entity_Kind :: enum u32 {
|
|||||||
Library_Name = 7,
|
Library_Name = 7,
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity_Flag :: enum u32 {
|
Entity_Flag :: enum u32le {
|
||||||
Foreign = 0,
|
Foreign = 0,
|
||||||
Export = 1,
|
Export = 1,
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ Entity_Flag :: enum u32 {
|
|||||||
Var_Thread_Local = 9,
|
Var_Thread_Local = 9,
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity_Flags :: distinct bit_set[Entity_Flag; u32];
|
Entity_Flags :: distinct bit_set[Entity_Flag; u32le];
|
||||||
|
|
||||||
Entity :: struct {
|
Entity :: struct {
|
||||||
kind: Entity_Kind,
|
kind: Entity_Kind,
|
||||||
@@ -107,7 +107,7 @@ Entity :: struct {
|
|||||||
name: String,
|
name: String,
|
||||||
type: Type_Index,
|
type: Type_Index,
|
||||||
init_string: String,
|
init_string: String,
|
||||||
_: u32,
|
_: u32le,
|
||||||
comment: String,
|
comment: String,
|
||||||
docs: String,
|
docs: String,
|
||||||
foreign_library: Entity_Index,
|
foreign_library: Entity_Index,
|
||||||
@@ -122,7 +122,7 @@ Attribute :: struct {
|
|||||||
value: String,
|
value: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
Type_Kind :: enum u32 {
|
Type_Kind :: enum u32le {
|
||||||
Invalid = 0,
|
Invalid = 0,
|
||||||
Basic = 1,
|
Basic = 1,
|
||||||
Named = 2,
|
Named = 2,
|
||||||
@@ -151,12 +151,12 @@ Type_Elems_Cap :: 4;
|
|||||||
|
|
||||||
Type :: struct {
|
Type :: struct {
|
||||||
kind: Type_Kind,
|
kind: Type_Kind,
|
||||||
flags: u32, // Type_Kind specific
|
flags: u32le, // Type_Kind specific
|
||||||
name: String,
|
name: String,
|
||||||
custom_align: String,
|
custom_align: String,
|
||||||
|
|
||||||
// Used by some types
|
// Used by some types
|
||||||
elem_count_len: u32,
|
elem_count_len: u32le,
|
||||||
elem_counts: [Type_Elems_Cap]u64,
|
elem_counts: [Type_Elems_Cap]u64,
|
||||||
|
|
||||||
// Each of these is esed by some types, not all
|
// Each of these is esed by some types, not all
|
||||||
@@ -166,27 +166,27 @@ Type :: struct {
|
|||||||
where_clauses: Array(String), // Struct, Union
|
where_clauses: Array(String), // Struct, Union
|
||||||
}
|
}
|
||||||
|
|
||||||
Type_Flags_Basic :: distinct bit_set[Type_Flag_Basic; u32];
|
Type_Flags_Basic :: distinct bit_set[Type_Flag_Basic; u32le];
|
||||||
Type_Flag_Basic :: enum u32 {
|
Type_Flag_Basic :: enum u32le {
|
||||||
Untyped = 1,
|
Untyped = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
Type_Flags_Struct :: distinct bit_set[Type_Flag_Struct; u32];
|
Type_Flags_Struct :: distinct bit_set[Type_Flag_Struct; u32le];
|
||||||
Type_Flag_Struct :: enum u32 {
|
Type_Flag_Struct :: enum u32le {
|
||||||
Polymorphic = 0,
|
Polymorphic = 0,
|
||||||
Packed = 1,
|
Packed = 1,
|
||||||
Raw_Union = 2,
|
Raw_Union = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
Type_Flags_Union :: distinct bit_set[Type_Flag_Union; u32];
|
Type_Flags_Union :: distinct bit_set[Type_Flag_Union; u32le];
|
||||||
Type_Flag_Union :: enum u32 {
|
Type_Flag_Union :: enum u32le {
|
||||||
Polymorphic = 0,
|
Polymorphic = 0,
|
||||||
No_Nil = 1,
|
No_Nil = 1,
|
||||||
Maybe = 2,
|
Maybe = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
Type_Flags_Proc :: distinct bit_set[Type_Flag_Proc; u32];
|
Type_Flags_Proc :: distinct bit_set[Type_Flag_Proc; u32le];
|
||||||
Type_Flag_Proc :: enum u32 {
|
Type_Flag_Proc :: enum u32le {
|
||||||
Polymorphic = 0,
|
Polymorphic = 0,
|
||||||
Diverging = 1,
|
Diverging = 1,
|
||||||
Optional_Ok = 2,
|
Optional_Ok = 2,
|
||||||
@@ -194,16 +194,16 @@ Type_Flag_Proc :: enum u32 {
|
|||||||
C_Vararg = 4,
|
C_Vararg = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
Type_Flags_BitSet :: distinct bit_set[Type_Flag_BitSet; u32];
|
Type_Flags_BitSet :: distinct bit_set[Type_Flag_BitSet; u32le];
|
||||||
Type_Flag_BitSet :: enum u32 {
|
Type_Flag_BitSet :: enum u32le {
|
||||||
Range = 1,
|
Range = 1,
|
||||||
Op_Lt = 2,
|
Op_Lt = 2,
|
||||||
Op_Lt_Eq = 3,
|
Op_Lt_Eq = 3,
|
||||||
Underlying_Type = 4,
|
Underlying_Type = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
Type_Flags_SimdVector :: distinct bit_set[Type_Flag_SimdVector; u32];
|
Type_Flags_SimdVector :: distinct bit_set[Type_Flag_SimdVector; u32le];
|
||||||
Type_Flag_SimdVector :: enum u32 {
|
Type_Flag_SimdVector :: enum u32le {
|
||||||
x86_mmx = 1,
|
x86_mmx = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user