<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Il 26/12/2017 18:26, Sven Barth via fpc-devel ha scritto:<br>
</p>
<blockquote type="cite"
cite="mid:CAFMUeB9_6n0-Fa4GhBMe54U=M5F5+SzXMKeXVusYfEwb=bgKfQ@mail.gmail.com">
<div dir="auto">
<div class="gmail_extra" dir="auto">
<div class="gmail_quote">Am 26.12.2017 13:33 schrieb "Giuliano
Colla" <<a href="mailto:giuliano.colla@fastwebnet.it"
moz-do-not-send="true">giuliano.colla@fastwebnet.it</a>>:<br
type="attribution">
<blockquote class="quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>If the idea is not rejected, then a number of
refinements (which I'm ready to implement) are
required to make the feature generally available:<br>
</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">My following remarks are independent of an
eventual acceptance of the feature :</div>
<div dir="auto"><br>
</div>
<div class="gmail_extra" dir="auto">
<div class="gmail_quote">
<blockquote class="quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>- All architectures should be supported (now it's
only for x86_64 - symcpu.pas).<br>
</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto">It might be possible to implement this in a
platform independent way that might simply need to expand the
capabilites of "absolute". <br>
</div>
</div>
</blockquote>
<br>
The feature in itself is platform independent.<br>
<br>
The only catch is that in pdecvar.pas (where variable declaration is
handled) there's a per platform hook for each symbol type, in order
to allow for special handling of some features.<br>
For consistency I did follow the same rule, which is used for all
the other declarations, disregarding whether they're platform
independent or not. <br>
As a consequence, for each supported platform you must add in its
specific symcpu.pas a type entry:<br>
<br>
tcpubasedvarsym = class(tbasedvarsym)<br>
end;<br>
tcpubasedvarsymclass = class of tcpubasedvarsym;<br>
<br>
and a line of code:<br>
<br>
cbasedvarsym:=tcpubasedvarsym;<br>
<br>
As this is tedious, I've only done it for the platform I'm using
(x86_64/symcpu.pas). To deploy the feature, the same lines must be
added in each platform symcpu.pas unit. There's no more that that.<br>
<br>
<blockquote type="cite"
cite="mid:CAFMUeB9_6n0-Fa4GhBMe54U=M5F5+SzXMKeXVusYfEwb=bgKfQ@mail.gmail.com">
<div dir="auto">
<div class="gmail_extra" dir="auto">
<div class="gmail_quote">
<blockquote class="quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p> </p>
<p>- It should be decided if to make the feature
generally available, or conditioned by an {$IFDEF
FPCHASBASED}<br>
</p>
<p>- It should be decided if the feature should be
available in all modes or only in a selected number of
modes (what of TurboPascal Mode or Delphi Mode?).</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto">Rule of thumb: new features added as a separate
mode switch, no FPC_HAS_* define necessary as by definition
this can be done with version checks (there is only one trunk
version, namely the current one). </div>
<div class="gmail_extra" dir="auto">
<div class="gmail_quote">
<blockquote class="quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>- It should be decided if error messages should be
specific for the BASED construct or common to the
ABSOLUTE one, slightly rephrasing the error message.</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto">Might be one or the other depending on the
message. </div>
<div class="gmail_extra" dir="auto">
<div class="gmail_quote">
<blockquote class="quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>- It should be decided if internal error # which
currently keep the same number of the nearby ABSOLUTE
internal error should be given new values.</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto">Internal errors shall always be unique as they
are used to find the error location, even for copy pasted
code.</div>
<div dir="auto"><br>
</div>
</div>
</blockquote>
<br>
What's the rule to avoiding clashes? I gathered sort of YYYYMMDD##
is it correct?<br>
<br>
Giuliano<br>
<br>
<br>
<br>
</body>
</html>