<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium">Hi Levente,</span><br style="color:rgb(0,0,0)"></div><div dir="ltr"><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium">    take a look at </span>Compiler-eem.421 and Kernel-eem.1320 in Inbox and see if you like the approach.</div><div><br></div><div><div>Name: Compiler-eem.421</div><div>Author: eem</div><div>Time: 25 March 2020, 9:00:37.328826 pm</div><div>UUID: 7bacb14a-f088-4fca-aa94-35dae28aa8e8</div><div>Ancestors: Compiler-nice.420</div><div><br></div><div>A suggested implementation of writable results from doits.  This scheme is careful to only make read-only collection literals that the compiler makes read-only, not e.g. numeric literals (which should always be read-only) or objects the evaluation makes read-only.</div></div><div><br></div><div><div>Name: Kernel-eem.1320</div><div>Author: eem</div><div>Time: 25 March 2020, 9:01:48.950717 pm</div><div>UUID: 5e03652f-dca4-40fb-991e-ec71a89bb282</div><div>Ancestors: Kernel-eem.1319</div><div><br></div><div>Use Compiler-eem.421 to make Object class>>readFrom: answer writable collection literals.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 1:41 AM Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Levente,<br>
<br>
<br>
> On Mar 24, 2020, at 1:15 PM, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
> <br>
> Levente Uzonyi uploaded a new version of System to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/System-ul.1148.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/System-ul.1148.mcz</a><br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: System-ul.1148<br>
> Author: ul<br>
> Time: 24 March 2020, 9:15:28.593463 pm<br>
> UUID: 79bbf013-47f5-4f3c-9e42-8f169fe22a6c<br>
> Ancestors: System-ul.1147<br>
> <br>
> - create a deep copy of the keys read from the file in SecurityManager >> #loadSecurityKeys, so that they can be modified later<br>
> <br>
> =============== Diff against System-ul.1147 ===============<br>
> <br>
> Item was changed:<br>
>  ----- Method: SecurityManager>>loadSecurityKeys (in category 'fileIn/out') -----<br>
>  loadSecurityKeys<br>
>      "SecurityManager default loadSecurityKeys"<br>
>      "Load the keys file for the current user"<br>
>      | fd loc file keys |<br>
>      self isInRestrictedMode ifTrue:[^self]. "no point in even trying"<br>
>      loc := self secureUserDirectory. "where to get it from"<br>
>      loc last = FileDirectory pathNameDelimiter ifFalse:[<br>
>          loc := loc copyWith: FileDirectory pathNameDelimiter.<br>
>      ].<br>
>      fd := FileDirectory on: loc.<br>
>      file := [fd readOnlyFileNamed: keysFileName] <br>
>              on: FileDoesNotExistException do:[:ex| nil].<br>
>      file ifNil:[^self]. "no keys file"<br>
> +    keys := (Object readFrom: file) veryDeepCopy. "Use #veryDeepCopy to make the non-writable literal objects created by the Compiler writable."<br>
> -    keys := Object readFrom: file.<br>
>      privateKeyPair := keys first.<br>
>      trustedKeys := keys last.<br>
>      file close.!<br>
<br>
Why not change Object class>>readFrom: to answer mutable objects?<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div></div></div></div></div>