<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style><span class="swb"><div>That's something for future research. Initially I
just want to get pure Pascal procedures working, and that's the most
important since it's cross-platform. Analysing assembler routines will
require a different kind of interpretation, and it will likely involve
only allowing a certain subset of opcodes and dropping out if it spots a
memory operand that doesn't point to the local stack (unless it's a LEA
instruction).</div>
<div><br>
</div><div>For the first iteration, specifying 'pure' on a pure
assembler routine will probably just throw a warning and ignore the
directive, much like what currently happens with 'inline'. I can see
the use of pure, pure assembler routines (that's going to get confusing
very quickly!) because of operations such as x86's ROR and BSR that
don't have direct Pascal equivalents.<br>
</div><div><br>
</div><div>Gareth<br>
</div> </span><br>
<br>
<span style="font-weight: bold;">On Mon 09/07/18 03:07 , "Dmitry Boyarintsev" skalogryz.lists@gmail.com sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT:0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"><div dir="ltr"><br>
<div class="gmail_extra"><div class="gmail_quote">On Sun, Jul 8, 2018 at 8:15 PM, J. Gareth Moreton <span dir="ltr"><<a href="javascript:top.opencompose('gareth@moreton-family.com','','','')" target="_blank">gareth@moreton-family.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, if any parameters are variables, then the function is not evaluated. My intention is that the purity of a function is only determined when it comes to evaluating it in an expression, but because of how complex functions can become, the "pure" directive hints to the compiler that the given function is pure and it should attempt the laborous task of evaluating it, rather than the opposite approach of attempting to evaluate all functions with constant actual parameters and potentially increasing the compilation time by several orders of magnitude (don't forget it might be attempting to do the same thing with system functions if the project is undergoing a full build).</blockquote>
<div><br>
</div><div> if FPC assembler reader powerful enough to analyze and trust assembler functions marked as pure?</div><div><br>
</div><div>thanks,</div><div>Dmitry</div></div></div></div>
</blockquote></HTML>