[fpc-devel] Debug compiler
Ondrej Pokorny
lazarus at kluug.net
Mon Nov 9 00:06:53 CET 2015
I see that Sven refactored the compiler and added texprflags. Thanks
Sven! I uploaded a new patch that takes advantage of texprflags.
/property-enumerator-4.patch/
On 31.10.2015 12:06, Jonas Maebe wrote:
> * don't use the "is" operator unless there is absolutely no other way
> to achieve the same effect. In the compiler, every node has a
> "nodetype" field that can be used to determine the kind instead (which
> is much faster than "is"
Fixed with "enumeratorn" nodetype.
> * I'm not sure such a "virtual node" is the best approach. I don't
> think we have that anywhere else in the compiler, so unless there is
> no cleaner way, we shouldn't introduce this concept (if some nodes are
> used differently from other nodes --other than the special error
> node--, then maintenance and reasoning becomes harder)
Nothing changed in this respect. I still use tenumeratornode.
> * don't add extra (semi-)global variables such as the
> tscannerfile.inforin field unless there is absolutely no other way to
> achieve the same effect. It's usually a quick hack, and there are way
> too many of those in the compiler already (I've removed a number of
> them over the years, but there are plenty left)
Fixed with texprflags and forin parameter.
> * like for all other node types, create a "tenumeratornodeclass =
> tclass of tenumeratornode" type, a "cenumeratornode:
> tenumeratornodeclass = tenumerator;" global variable and always use
> cenumeratornode.create() (so that the node class can be overridden by
> an architecture-specific class if necessary)
Implemented.
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151109/035902f0/attachment.html>
More information about the fpc-devel
mailing list