<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2018-04-29 21:26 GMT+02:00 Anthony Walter <span dir="ltr"><<a href="mailto:sysrpl@gmail.com" target="_blank">sysrpl@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I wanted to know from the people who make decision about what to merge, what's the status of rolling his enhancements at following location into FPC trunk?</div></div></blockquote><div><br></div><div>The key part of smart pointers (management operators) is already in trunk (as Sven said). Btw. you forgot about AddRef operator ;)</div><div><br></div><div>The problem is more complicated than just "merge" for "default field". </div><div><br></div><div>*** part 1 ***</div><div><br></div><div>The first problem<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> is slowdown for constructors</span> for classes (which already is part of trunk, trunk is a little slower than 3.0.x for constructors). The main reason of "
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">slowdown<span>"</span></span>
is new feature "management operators". The solution (and improvement) is FastRTTI which is designed for management operators and all managed types:</div><div><br></div><div><a href="https://github.com/maciej-izak/freepascal/tree/fastrtti" target="_blank">https://github.com/maciej-izak<wbr>/freepascal/tree/fastrtti</a><br></div><div><br></div><div>with these patch FPC is faster for all classes/records/objects with managed types. This patch is not only designed as patch for constructors but the gain is more general, for all managed types the result is really good - the execution of code is even few times faster when you use a lot of managed types. Compiler compilation with FastRTTI is always faster around 1%-3% (where usage of managed types is rather rare). The hardest part for me of implementation of FastRTTI was testing (I don't use AVR nor i8086 nor m68k) , but this is ready:</div><div><br></div><div><a href="https://travis-ci.org/maciej-izak/fpc-ci-tests/builds/320484786?utm_source=email&utm_medium=notification" target="_blank">https://travis-ci.org/maciej-i<wbr>zak/fpc-ci-tests/builds/320484<wbr>786?utm_source=email&utm_<wbr>medium=notification</a><br></div><div><br></div><div>this part was really depressing :P. The last thing what I must finish is renaming "holes" to "unmanaged_spaces" x) (personally I prefer the "holes" but I must agree with Sven that the "holes" term is not perfect).</div><div><br></div><div>*** part 2 ***</div><div><br></div><div>The default field. The topic is complicated on many fields, but generally we have 2 issues, raised by Jonas :</div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">- existence of @@ and @@@ operators:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/maciej-izak/PascalSmartPointers/blob/master/tests/tdefaultfield6.pp" target="_blank" style="color:rgb(17,85,204)">https://github.com/maciej-izak<wbr>/PascalSmartPointers/blob/mast<wbr>er/tests/tdefaultfield6.pp</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/maciej-izak/PascalSmartPointers/blob/master/tests/tdefaultfield14.pp" target="_blank" style="color:rgb(17,85,204)">https://github.com/maciej-izak<wbr>/PascalSmartPointers/blob/mast<wbr>er/tests/tdefaultfield14.pp</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/maciej-izak/PascalSmartPointers/blob/master/tests/tdefaultfield21.pp" target="_blank" style="color:rgb(17,85,204)">https://github.com/maciej-izak<wbr>/PascalSmartPointers/blob/mast<wbr>er/tests/tdefaultfield21.pp</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/maciej-izak/PascalSmartPointers/blob/master/tests/tdefaultfield22.pp" target="_blank" style="color:rgb(17,85,204)">https://github.com/maciej-izak<wbr>/PascalSmartPointers/blob/mast<wbr>er/tests/tdefaultfield22.pp</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">- handling procedures/methods parameters (especially for var/out which is not listed below)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/maciej-izak/PascalSmartPointers/blob/master/tests/tdefaultfield25.pp" target="_blank" style="color:rgb(17,85,204)">https://github.com/maciej-izak<wbr>/PascalSmartPointers/blob/mast<wbr>er/tests/tdefaultfield25.pp</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/maciej-izak/PascalSmartPointers/blob/master/tests/tdefaultfield26.pp" target="_blank" style="color:rgb(17,85,204)">https://github.com/maciej-izak<wbr>/PascalSmartPointers/blob/mast<wbr>er/tests/tdefaultfield26.pp</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">as solution was proposed new type kind, but IMO new kind just for default field is redundant. What with further usage of "default field" for classes and objects (maybe now it looks like nonsense but should be usefully with ARC combination with classes)? Again new types? I don't wan't to lock this path (default field for classes and objects).</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">possible alternative is "strict" modifier</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/maciej-izak/PascalSmartPointers/blob/master/tests/tdefaultfield30.pp" target="_blank" style="color:rgb(17,85,204)">https://github.com/maciej-izak<wbr>/PascalSmartPointers/blob/mast<wbr>er/tests/tdefaultfield30.pp</a></div>
<br></div><div>"strict default" may be the solution, the record with "strict default" may have more strict policy in compiler to make all of us happy. If someone needs to use "default field" as more advanced precise helpers - just use "default". If strict policy is more important (like for Jonas, some part of me agree with him) then use "strict default".</div><div><br></div><div>Technically all for smart pointers is ready.</div><div><br></div></div>-- <br><div class="gmail-m_7955749474776344681m_-328314506632174370gmail-m_-2154461451248882680m_9052038852565817037m_-3671433280501290121gmail_signature"><div dir="ltr"><div>Best regards,<br>Maciej Izak</div></div></div>
</div></div>