[Newbies] [] whileTrue: [] implementation
Bert Freudenberg
bert at freudenbergs.de
Tue Oct 4 16:57:19 UTC 2011
On 04.10.2011, at 18:41, Erlis Vidal wrote:
> Can I add methods to literal blocks?
Yes.
> Where do I implement those methods?
In class BlockClosure.
> In case your answer is in BlockClosures, why I don't see any ifTrue: in the while implementation?
Because the compiler generates a jump byte code for whileTrue: directly. In a browser on the whileTrue: method, click the "source" button to switch to showing byte codes.
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20111004/e0f8afd2/attachment-0001.htm
More information about the Beginners
mailing list