This is a mistake. Meant to commit Collections. Will try and delete asap. Please ignore the commit.<br><br><div class="gmail_quote">On Sat, Jul 17, 2010 at 4:54 PM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Eliot Miranda uploaded a new version of Compiler to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Compiler-eem.148.mcz" target="_blank">http://source.squeak.org/trunk/Compiler-eem.148.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Compiler-eem.148<br>
Author: eem<br>
Time: 17 July 2010, 4:54:07.87 pm<br>
UUID: 5f5463f2-9924-4c05-95c9-0badbf699034<br>
Ancestors: Compiler-jcg.147<br>
<br>
Collection>>fold: and SequenceableCollection>>copyUpThrough:, extensions used by Cog VMMaker.<br>
Change to older semantics of Character>>hex for Cog VMMaker.<br>
<br>
=============== Diff against Compiler-jcg.147 ===============<br>
<br>
Item was changed:<br>
----- Method: Compiler>>evaluate:in:to:notifying:ifFail:logged: (in category 'public access') -----<br>
evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag<br>
+ "Compiles the sourceStream into a parse tree, then generates code into<br>
+ a method. If aContext is not nil, the text can refer to temporaries in that<br>
+ context (the Debugger uses this). If aRequestor is not nil, then it will receive<br>
+ a notify:at: message before the attempt to evaluate is aborted. Finally, the<br>
+ compiled method is invoked from here via withArgs:executeMethod:, hence<br>
+ the system no longer creates Doit method litter on errors."<br>
- "Compiles the sourceStream into a parse tree, then generates code into a<br>
- method. This method is then installed in the receiver's class so that it<br>
- can be invoked. In other words, if receiver is not nil, then the text can<br>
- refer to instance variables of that receiver (the Inspector uses this). If<br>
- aContext is not nil, the text can refer to temporaries in that context (the<br>
- Debugger uses this). If aRequestor is not nil, then it will receive a<br>
- notify:at: message before the attempt to evaluate is aborted. Finally, the<br>
- compiled method is invoked from here as DoIt or (in the case of<br>
- evaluation in aContext) DoItIn:. The method is subsequently removed<br>
- from the class, but this will not get done if the invocation causes an<br>
- error which is terminated. Such garbage can be removed by executing:<br>
- Smalltalk allBehaviorsDo: [:cl | cl removeSelector: #DoIt; removeSelector:<br>
- #DoItIn:]."<br>
<br>
| methodNode method value toLog itsSelection itsSelectionString |<br>
class := (aContext == nil ifTrue: [receiver] ifFalse: [aContext receiver]) class.<br>
self from: textOrStream class: class context: aContext notifying: aRequestor.<br>
+ methodNode := self translate: sourceStream noPattern: true ifFail: [^failBlock value].<br>
- methodNode := self translate: sourceStream noPattern: true ifFail:<br>
- [^failBlock value].<br>
<br>
+ method := self interactive<br>
+ ifTrue: [methodNode generateWithTempNames]<br>
+ ifFalse: [methodNode generate].<br>
+<br>
- method := self interactive ifTrue: [ methodNode generateWithTempNames ]<br>
- ifFalse: [methodNode generate].<br>
-<br>
value := receiver<br>
withArgs: (context ifNil: [#()] ifNotNil: [{context}])<br>
executeMethod: method.<br>
<br>
+ logFlag ifTrue:<br>
+ [toLog := ((requestor respondsTo: #selection)<br>
- logFlag ifTrue:[<br>
- toLog := ((requestor respondsTo: #selection)<br>
and:[(itsSelection := requestor selection) notNil<br>
and:[(itsSelectionString := itsSelection asString) isEmptyOrNil not]])<br>
ifTrue:[itsSelectionString]<br>
ifFalse:[sourceStream contents].<br>
SystemChangeNotifier uniqueInstance evaluated: toLog context: aContext].<br>
^ value!<br>
<br>
<br>
</blockquote></div><br>