22
33#include < string>
44
5- /* * Specifies the storage type for a field entity.
5+ /* * Specifies the storage type for a field entity / value .
66 * GLOBAL are globally declared fields, i.e. outside of any type definition.
77 * STATIC and VIRTUAL are statically allocated fields within a type definition.
88 * VIRTUAL fields are like STATIC but subject to polymorphic lookup.
99 * INSTANCEMETHOD is a special case, where the function pointer is static/virtual and the 'self' ref is provided in runtime
1010 * INSTANCE fields are members of type instances (i.e. object members).
11- * STACK fields are regular "auto" variables, including function arguments.
12- * GLOBAL, STATIC, VIRTUAL are compile-time-allocated.
11+ * STACK fields are regular "auto" variables, including function arguments, bound to a field declaration.
12+ * UNBOUND_STACK indicates a value that is allocated on the stack, but not (yet) bound to a field declaration.
13+ * NOSTORAGE indicates an unallocated / temporary / register value, also known as rvalue.
1314 */
1415enum TxFieldStorage : int {
15- TXS_NOSTORAGE, TXS_GLOBAL, TXS_STATIC, TXS_VIRTUAL, TXS_INSTANCEMETHOD, TXS_INSTANCE, TXS_STACK
16+ TXS_NOSTORAGE, TXS_GLOBAL, TXS_STATIC, TXS_VIRTUAL, TXS_INSTANCEMETHOD, TXS_INSTANCE, TXS_STACK, TXS_UNBOUND_STACK,
1617};
1718
1819inline std::string to_string ( TxFieldStorage storage ) {
@@ -31,6 +32,8 @@ inline std::string to_string( TxFieldStorage storage ) {
3132 return " TXS_INSTANCE" ;
3233 case TXS_STACK:
3334 return " TXS_STACK" ;
35+ case TXS_UNBOUND_STACK:
36+ return " TXS_UNBOUND_STACK" ;
3437 }
3538 return " -unknown TxFieldStorage value " + std::to_string ((int )storage) + " -" ;
3639}
0 commit comments