[M3devel] temporary records lack typeids
Jay K
jay.krell at cornell.edu
Thu Apr 11 10:28:22 CEST 2013
It'd be nice if temporary records had typeids.
Specifically, it'd be nice if closures, instead of being "3 word CGType.Struct" where more like
declare_record 3 fields typeidxxx
declare_field integer marker
declare_field address function_pointer
declare_field address static_link
declare_typename closure = typeidxxx
Then:
1) they'd be viewable somewhat in a debugger
note that the static_link is up to the backend to define.
It is also a pointer to a struct, but the frontend doesn't know that
2) I could soon dispense with my mechanism for declaring structs with size but not particular fields.
i.e.
#define M3STRUCT(n) m3struct_##n##_t
#define M3STRUCT1(n) typedef struct { volatile UINT8 a[n]; } M3STRUCT(n);
#define M3STRUCT2(n) typedef struct { volatile UINT16 a[(n)/2]; } M3STRUCT(n);
#define M3STRUCT4(n) typedef struct { volatile UINT32 a[(n)/4]; } M3STRUCT(n);
#define M3STRUCT8(n) typedef struct { volatile UINT64 a[(n)/8]; } M3STRUCT(n);
...
M3STRUCT8(8)
M3STRUCT8(24)
...
M3STRUCT(24) L_32_L_33 = { 0 };
all structs were using this, but now likely only closures are..er...what is that 8 byte struct?
That is also something I'll remove soon, unfinished work making uplevel structs strongly typed.
Maybe a long standing bug in the C backend also. I'll know soon..
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130411/9d59ee77/attachment-0001.html>
More information about the M3devel
mailing list