Hi,

As you might now, we abuse the literals of compiled methods to hold on to the 
class and the literal. (and the place used to store the literal is used for
additional properties if there are some).

So right now we have the problem that #literals just returns all the literals 
and clients do “allButLast” to filter out the class binging, but they ignore 
the selector.

#hasLiteral: doe the filtering *and* it filters the last two. All quite 
confusing.

So, this is true:

(Object >> #yourself) literals includes: #yourself.
(Object >> #yourself) hasLiteralSuchThat: [ :lit | lit = #yourself].


but this is false:

(Object >> #yourself) hasLiteral: #yourself.
(Object >> #yourself) hasLiteralThorough: #yourself.

I suggest we make this simpler by:

-> #allLiterals return all the literals, even the abused last two
-> #literals returns what you think it should: the true literals of the method, 
without the last two abused fields.
-> fix all cases of “literals allButLast”, there are not many.

        https://github.com/pharo-project/pharo/pull/1502/files 
<https://github.com/pharo-project/pharo/pull/1502/files>

Is there any reason why this could be bad? 

        Marcus

Reply via email to