<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I see that Sven refactored the compiler
and added texprflags. Thanks Sven! I uploaded a new patch that
takes advantage of texprflags.<br>
<br>
<i>property-enumerator-4.patch</i><br>
<br>
On 31.10.2015 12:06, Jonas Maebe wrote:<br>
</div>
<blockquote cite="mid:5634A0C7.3060503@elis.ugent.be" type="cite">*
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"
<br>
</blockquote>
<br>
Fixed with "enumeratorn" nodetype.<br>
<br>
<blockquote cite="mid:5634A0C7.3060503@elis.ugent.be" type="cite">*
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)
<br>
</blockquote>
<br>
Nothing changed in this respect. I still use tenumeratornode.<br>
<br>
<blockquote cite="mid:5634A0C7.3060503@elis.ugent.be" type="cite">*
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)
<br>
</blockquote>
<br>
Fixed with texprflags and forin parameter.<br>
<br>
<blockquote cite="mid:5634A0C7.3060503@elis.ugent.be" type="cite">*
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)
<br>
</blockquote>
<br>
Implemented.<br>
<br>
Ondrej<br>
</body>
</html>