-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Luca Barbieri wrote: > Well, the alternative is to copy&paste this into ir_lower_jumps and > other similar passes. > > I added a new class instead of changing ir_visitor so that subclasses > that need to examine all leaves will get a compile error if not > updated when new leaves are introduced. This is debatable though, > since you need to add the function to ir_visitor anyway.
The problem with the default navigation is that code breaks in mysterious ways when new node types are added. We've encountered this a couple times with the hierarchical visitor. If the visitor base class is pure virtual, the compiler will tell you all the places that need to be updated when a new node type is added. The cases where we've had this problem with the hierarchical visitor have been a bitch to debug. The extra bit of cut-and-paste seems like a small price to pay. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyGm8QACgkQX1gOwKyEAw/VewCdFIpsLJYu5FzH7UbTzEhN226C 5vMAnRru51eHfHT7EiTz434hXAa91Xhc =b9ES -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
