[ruamoko] Add pr_type_size array to types.[rh]

This commit is contained in:
Bill Currie 2021-06-04 13:29:27 +09:00
parent 53b553e892
commit 5e29cecf44
2 changed files with 19 additions and 1 deletions

View File

@ -92,5 +92,6 @@ typedef struct qfot_type_encodings_s {
@extern string ty_meta_name[7];
@extern string pr_type_name[ev_type_count];
@extern int pr_type_size[ev_type_count];
#endif

View File

@ -11,6 +11,23 @@ string ty_meta_name[7] = {
"alias",
};
int pr_type_size[ev_type_count] = {
1, // ev_void
1, // ev_string
1, // ev_float
3, // ev_vector
1, // ev_entity
1, // ev_field
1, // ev_func
1, // ev_pointer
4, // ev_quat
1, // ev_integer
1, // ev_uinteger
0, // ev_short value in opcode
2, // ev_double
0, // ev_invalid not a valid/simple type
};
string pr_type_name[ev_type_count] = {
"void",
"string",
@ -24,6 +41,6 @@ string pr_type_name[ev_type_count] = {
"integer",
"uinteger",
"short",
"double"
"double",
"invalid",
};