[squeak-dev] Symbol class>>findInterned: deprecated???

Eliot Miranda eliot.miranda at gmail.com
Tue Jun 14 22:27:27 UTC 2022


Hi All,

  I've just run into what I think is a bad mistake.  My understanding of
Symbol class>>findInterned: is that it answers a Symbol if its (string)
argument already exists as a Symbol, and answers nil otherwise.  Indeed
looking at Collections-mt.935, 13 April 2021, this is the case:

Symbol class>>*findInterned:*aString

    self hasInterned:aString ifTrue:[:symbol| ^symbol].
    ^nil.

In Collections-nice.936,13 April 2021 it was deprecated, but the new method
in 60Deprecated-nice.95, 13 April 2021 reads:

Symbol class>>*findInterned:*aString
   self flag: #deprecated. "use lookup: instead, they are synonym"
   ^self lookup: aString

But lookup: *always* interns:

Symbol intern: 'union {
sqIntptr_t valword;
struct { int low, high; } valleint64;
struct { int high, low; } valbeint64;
double valflt64;
struct { void *addr; sqIntptr_t size; } valstruct;
}' #'union {
sqIntptr_t valword;
struct { int low, high; } valleint64;
struct { int high, low; } valbeint64;
double valflt64;
struct { void *addr; sqIntptr_t size; } valstruct;
}'

So I think it is *urgent* that we undeprecate findInterne3d: and restore
its old meaning.  I apologixze for not finding this earlier.  i just ran
VMMaker today after an update and that triggered the bug for the first
time.  I'm guessing the update flushed symbols.

I'm going to make this change now.

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220614/fd864471/attachment.html>


More information about the Squeak-dev mailing list