Author: theraven
Date: Sat Dec 6 16:33:03 2008
New Revision: 4064
URL: http://svn.gna.org/viewcvs/etoile?rev=4064&view=rev
Log:
Upward funarg support in Smalltalk / LangaugeKit. You can now -retain a
BlockClosure and it Just Works™ (ignoring all of the bugs that are probably
still in there).
Example:
$ cat retainblock.st
NSObject subclass: SmalltalkTool [
| block |
run [
self setBlock.
self callBlock.
]
setBlock [
| a |
a := 'Local variable'.
block := [ a log. ].
]
callBlock [
'Testing retained block:' log.
block value.
]
]
$ edlc -f retainblock.st
2008-12-06 15:30:24.483 edlc[23528] Testing retained block:
2008-12-06 15:30:24.522 edlc[23528] Local variable
Modified:
trunk/Etoile/Languages/LanguageKit/CodeGenLexicalScope.cpp
trunk/Etoile/Languages/LanguageKit/CodeGenModule.cpp
trunk/Etoile/Languages/LanguageKit/CodeGenModule.h
trunk/Etoile/Languages/SmalltalkKit/Support/BlockClosure.h
trunk/Etoile/Languages/SmalltalkKit/Support/BlockClosure.m
_______________________________________________
Etoile-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-cvs