Dear all, What does <DYN> (or say "dynamic node" that is generated by paser and used by cg in compilation stage) represent? What are the corresponding D lanauge futures of this? Any examples? TIA! Regards, TJ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070808/75f0abad/attachment.html>
Michael Shapiro
2007-Aug-09 00:48 UTC
[dtrace-discuss] What is <DYN> in dtrace source code?
> Dear all, > > What does <DYN> (or say "dynamic node" that is generated by paser and used > by cg in compilation stage) represent? > What are the corresponding D lanauge futures of this? Any examples?Not sure how you got here, but DT_DYN_TYPE is my special sentinel value for parse tree nodes that are of some "dynamic" type that basically means that the code looking at this parse node needs to look at the associated identifier object (dt_ident_t) and execute some type-specific code in order to make sense of this entity. This is used for things like translators and aggregations. By assigning these entities a reserved type identifier within the static type space, it simplies a large amount of the other code that handles static type checking by obviating the need for that other code to understand any of these things, since the "dynamic" type will fail to compare to other normal static types like integer, float, string etc. -Mike -- Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/
Oh, I see! Thank you, Mike. Regards, TJ 2007/8/9, Michael Shapiro <mws at zion.eng.sun.com>:> > > > Dear all, > > > > What does <DYN> (or say "dynamic node" that is generated by paser and > used > > by cg in compilation stage) represent? > > What are the corresponding D lanauge futures of this? Any examples? > > Not sure how you got here, but DT_DYN_TYPE is my special sentinel > value for parse tree nodes that are of some "dynamic" type that basically > means that the code looking at this parse node needs to look at the > associated identifier object (dt_ident_t) and execute some type-specific > code in order to make sense of this entity. This is used for things > like translators and aggregations. > > By assigning these entities a reserved type identifier within the static > type space, it simplies a large amount of the other code that handles > static type checking by obviating the need for that other code to > understand any of these things, since the "dynamic" type will fail > to compare to other normal static types like integer, float, string etc. > > -Mike > > -- > Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/ >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070809/d79f8dd0/attachment.html>