You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use int, long and jit_type_sys_int to represent numeric values, and size_t to store string lengths. We need to check if all these types are the same, especially when you switch between jit and regular context.
The text was updated successfully, but these errors were encountered:
We probably only need long and jit_type_sys_long when we deal with numeric values, and size_t when working with string lengths, where we have to investigate what the identical type to a size_t is in libjit.
As for libjit and the size_t typedef, a simple grep on the libjit header files revealed this to me.
/* TODO: the proper place for this is jit-def.h and it's going to depend on the platform. */
typedef unsigned int jit_size_t;
But as their TODO suggests it indeed depends on platform. Just like int, unsigned int is 32 bit with both 32 and 64 bit binaries, while sizeof(size_t) returns 8 for 64 bit binaries and 4 for 32 bit binaries. I think jit_type_sys_ulong is a better solution as it is the same size as size_t in both 32 and 64 bit binaries.
We currently use int, long and jit_type_sys_int to represent numeric values, and size_t to store string lengths. We need to check if all these types are the same, especially when you switch between jit and regular context.
The text was updated successfully, but these errors were encountered: