On May 18, 2010, at 4:41 41PM, Lukas Renggli wrote: > >> Also, sameLiteralsAs: is a mess. >> There are no comments really revealing the intention of the 8 ifTrue/False >> branches, no refactoring to use revealing method names... >> Can anyone explain to me why numLits -1 = index is checked? > > Check the VM source/compiler on the different special literal slots > and how different kind of primitives are encoded.
Wouldn't it be nice to document this in the method as well, so > >> At least for methodReturnTop, which has 2 literals, it certainly does not >> seem like numLits -1 contains properties.... > > The two literals are the selector and the class-binding, as the method > comment says these literals are not considered for equality. Hmmm, which method comment? In my image, at the top of sameLiteralsAs: it says: "Compare my literals to those of method. This is needed to compare compiled methods." And in = "Answer whether the receiver implements the same code as aCompiledMethod." Nothing about which literals are or aren't considered for equality :( _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project