[BUG]Hourglass remains using incorrect syntax in Method
Finder
Helge Horch
Helge.Horch at munich.netsurf.de
Fri Feb 23 00:47:14 UTC 2001
At 19:34 21.02.2001 -0500, Sven <sven at dcs.uconn.edu> wrote:
>Also wondered if there was any reason that caseOf: and caseOf:
>aBlockAssociationCollection otherwise: aBlock methods had duplicate
>examples at the bottom?
But they are subtly different -- let's look at #caseOf:'s examples:
| z | z _ {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z
| z | z _ {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z
"^here"
And the second set actually says "The following are compiled in-line:"
#b caseOf: {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}
#b caseOf: {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}
You can observe the difference by pasting one of each group in turn as the
body of, say, method foo of class False, and doing a "show bytecodes" in
the browser.
BTW: Because of said code inlining, make sure to use "method source
containing it" from the browser's shifted menu to actually see the "call"
sites in the Squeak image.
Whether #caseOf: is desirable at all, I can't tell.
HTH,
Helge
More information about the Squeak-dev
mailing list
|