The Trunk: Compiler-eem.148.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Compiler-eem.148.mcz

commits-2
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.148.mcz

==================== Summary ====================

Name: Compiler-eem.148
Author: eem
Time: 17 July 2010, 4:54:07.87 pm
UUID: 5f5463f2-9924-4c05-95c9-0badbf699034
Ancestors: Compiler-jcg.147

Collection>>fold: and SequenceableCollection>>copyUpThrough:, extensions used by Cog VMMaker.
Change to older semantics of Character>>hex for Cog VMMaker.

=============== Diff against Compiler-jcg.147 ===============

Item was changed:
  ----- Method: Compiler>>evaluate:in:to:notifying:ifFail:logged: (in category 'public access') -----
  evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag
+ "Compiles the sourceStream into a parse tree, then generates code into
+ a method. If aContext is not nil, the text can refer to temporaries in that
+ context (the Debugger uses this). If aRequestor is not nil, then it will receive
+ a notify:at: message before the attempt to evaluate is aborted. Finally, the
+ compiled method is invoked from here via withArgs:executeMethod:, hence
+ the system no longer creates Doit method litter on errors."
- "Compiles the sourceStream into a parse tree, then generates code into a
- method. This method is then installed in the receiver's class so that it
- can be invoked. In other words, if receiver is not nil, then the text can
- refer to instance variables of that receiver (the Inspector uses this). If
- aContext is not nil, the text can refer to temporaries in that context (the
- Debugger uses this). If aRequestor is not nil, then it will receive a
- notify:at: message before the attempt to evaluate is aborted. Finally, the
- compiled method is invoked from here as DoIt or (in the case of
- evaluation in aContext) DoItIn:. The method is subsequently removed
- from the class, but this will not get done if the invocation causes an
- error which is terminated. Such garbage can be removed by executing:
- Smalltalk allBehaviorsDo: [:cl | cl removeSelector: #DoIt; removeSelector:
- #DoItIn:]."
 
  | methodNode method value toLog itsSelection itsSelectionString |
  class := (aContext == nil ifTrue: [receiver] ifFalse: [aContext receiver]) class.
  self from: textOrStream class: class context: aContext notifying: aRequestor.
+ methodNode := self translate: sourceStream noPattern: true ifFail: [^failBlock value].
- methodNode := self translate: sourceStream noPattern: true ifFail:
- [^failBlock value].
 
+ method := self interactive
+ ifTrue: [methodNode generateWithTempNames]
+ ifFalse: [methodNode generate].
+
- method := self interactive ifTrue: [ methodNode generateWithTempNames ]
- ifFalse: [methodNode generate].
-
  value := receiver
  withArgs: (context ifNil: [#()] ifNotNil: [{context}])
  executeMethod: method.
 
+ logFlag ifTrue:
+ [toLog := ((requestor respondsTo: #selection)  
- logFlag ifTrue:[
- toLog := ((requestor respondsTo: #selection)  
  and:[(itsSelection := requestor selection) notNil
  and:[(itsSelectionString := itsSelection asString) isEmptyOrNil not]])
  ifTrue:[itsSelectionString]
  ifFalse:[sourceStream contents].
  SystemChangeNotifier uniqueInstance evaluated: toLog context: aContext].
  ^ value!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Compiler-eem.148.mcz

Eliot Miranda-2
This is a mistake.  Meant to commit Collections.  Will try and delete asap.  Please ignore the commit.

On Sat, Jul 17, 2010 at 4:54 PM, <[hidden email]> wrote:
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.148.mcz

==================== Summary ====================

Name: Compiler-eem.148
Author: eem
Time: 17 July 2010, 4:54:07.87 pm
UUID: 5f5463f2-9924-4c05-95c9-0badbf699034
Ancestors: Compiler-jcg.147

Collection>>fold: and SequenceableCollection>>copyUpThrough:, extensions used by Cog VMMaker.
Change to older semantics of Character>>hex for Cog VMMaker.

=============== Diff against Compiler-jcg.147 ===============

Item was changed:
 ----- Method: Compiler>>evaluate:in:to:notifying:ifFail:logged: (in category 'public access') -----
 evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag
+       "Compiles the sourceStream into a parse tree, then generates code into
+        a method. If aContext is not nil, the text can refer to temporaries in that
+        context (the Debugger uses this). If aRequestor is not nil, then it will receive
+        a notify:at: message before the attempt to evaluate is aborted. Finally, the
+        compiled method is invoked from here via withArgs:executeMethod:, hence
+        the system no longer creates Doit method litter on errors."
-       "Compiles the sourceStream into a parse tree, then generates code into a
-       method. This method is then installed in the receiver's class so that it
-       can be invoked. In other words, if receiver is not nil, then the text can
-       refer to instance variables of that receiver (the Inspector uses this). If
-       aContext is not nil, the text can refer to temporaries in that context (the
-       Debugger uses this). If aRequestor is not nil, then it will receive a
-       notify:at: message before the attempt to evaluate is aborted. Finally, the
-       compiled method is invoked from here as DoIt or (in the case of
-       evaluation in aContext) DoItIn:. The method is subsequently removed
-       from the class, but this will not get done if the invocation causes an
-       error which is terminated. Such garbage can be removed by executing:
-       Smalltalk allBehaviorsDo: [:cl | cl removeSelector: #DoIt; removeSelector:
-       #DoItIn:]."

       | methodNode method value toLog itsSelection itsSelectionString |
       class := (aContext == nil ifTrue: [receiver] ifFalse: [aContext receiver]) class.
       self from: textOrStream class: class context: aContext notifying: aRequestor.
+       methodNode := self translate: sourceStream noPattern: true ifFail: [^failBlock value].
-       methodNode := self translate: sourceStream noPattern: true ifFail:
-               [^failBlock value].

+       method := self interactive
+                               ifTrue: [methodNode generateWithTempNames]
+                               ifFalse: [methodNode generate].
+
-       method := self interactive ifTrue: [    methodNode generateWithTempNames ]
-               ifFalse: [methodNode generate].
-
       value := receiver
                               withArgs: (context ifNil: [#()] ifNotNil: [{context}])
                               executeMethod: method.

+       logFlag ifTrue:
+               [toLog := ((requestor respondsTo: #selection)
-       logFlag ifTrue:[
-               toLog := ((requestor respondsTo: #selection)
                       and:[(itsSelection := requestor selection) notNil
                       and:[(itsSelectionString := itsSelection asString) isEmptyOrNil not]])
                               ifTrue:[itsSelectionString]
                               ifFalse:[sourceStream contents].
               SystemChangeNotifier uniqueInstance evaluated: toLog context: aContext].
       ^ value!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Compiler-eem.148.mcz

Eliot Miranda-2
In reply to this post by commits-2
Could an admin delete this version?

TIA
Eliot

On Sat, Jul 17, 2010 at 4:54 PM, <[hidden email]> wrote:
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.148.mcz

==================== Summary ====================

Name: Compiler-eem.148
Author: eem
Time: 17 July 2010, 4:54:07.87 pm
UUID: 5f5463f2-9924-4c05-95c9-0badbf699034
Ancestors: Compiler-jcg.147

Collection>>fold: and SequenceableCollection>>copyUpThrough:, extensions used by Cog VMMaker.
Change to older semantics of Character>>hex for Cog VMMaker.

=============== Diff against Compiler-jcg.147 ===============

Item was changed:
 ----- Method: Compiler>>evaluate:in:to:notifying:ifFail:logged: (in category 'public access') -----
 evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag
+       "Compiles the sourceStream into a parse tree, then generates code into
+        a method. If aContext is not nil, the text can refer to temporaries in that
+        context (the Debugger uses this). If aRequestor is not nil, then it will receive
+        a notify:at: message before the attempt to evaluate is aborted. Finally, the
+        compiled method is invoked from here via withArgs:executeMethod:, hence
+        the system no longer creates Doit method litter on errors."
-       "Compiles the sourceStream into a parse tree, then generates code into a
-       method. This method is then installed in the receiver's class so that it
-       can be invoked. In other words, if receiver is not nil, then the text can
-       refer to instance variables of that receiver (the Inspector uses this). If
-       aContext is not nil, the text can refer to temporaries in that context (the
-       Debugger uses this). If aRequestor is not nil, then it will receive a
-       notify:at: message before the attempt to evaluate is aborted. Finally, the
-       compiled method is invoked from here as DoIt or (in the case of
-       evaluation in aContext) DoItIn:. The method is subsequently removed
-       from the class, but this will not get done if the invocation causes an
-       error which is terminated. Such garbage can be removed by executing:
-       Smalltalk allBehaviorsDo: [:cl | cl removeSelector: #DoIt; removeSelector:
-       #DoItIn:]."

       | methodNode method value toLog itsSelection itsSelectionString |
       class := (aContext == nil ifTrue: [receiver] ifFalse: [aContext receiver]) class.
       self from: textOrStream class: class context: aContext notifying: aRequestor.
+       methodNode := self translate: sourceStream noPattern: true ifFail: [^failBlock value].
-       methodNode := self translate: sourceStream noPattern: true ifFail:
-               [^failBlock value].

+       method := self interactive
+                               ifTrue: [methodNode generateWithTempNames]
+                               ifFalse: [methodNode generate].
+
-       method := self interactive ifTrue: [    methodNode generateWithTempNames ]
-               ifFalse: [methodNode generate].
-
       value := receiver
                               withArgs: (context ifNil: [#()] ifNotNil: [{context}])
                               executeMethod: method.

+       logFlag ifTrue:
+               [toLog := ((requestor respondsTo: #selection)
-       logFlag ifTrue:[
-               toLog := ((requestor respondsTo: #selection)
                       and:[(itsSelection := requestor selection) notNil
                       and:[(itsSelectionString := itsSelection asString) isEmptyOrNil not]])
                               ifTrue:[itsSelectionString]
                               ifFalse:[sourceStream contents].
               SystemChangeNotifier uniqueInstance evaluated: toLog context: aContext].
       ^ value!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Compiler-eem.148.mcz

Ken Causey-3
Done.

Ken

On Sat, 2010-07-17 at 16:59 -0700, Eliot Miranda wrote:

> Could an admin delete this version?
>
>
> TIA
> Eliot
>
> On Sat, Jul 17, 2010 at 4:54 PM, <[hidden email]> wrote:
>         Eliot Miranda uploaded a new version of Compiler to project
>         The Trunk:
>         http://source.squeak.org/trunk/Compiler-eem.148.mcz
>        
>         ==================== Summary ====================
>        
>         Name: Compiler-eem.148
>         Author: eem
>         Time: 17 July 2010, 4:54:07.87 pm
>         UUID: 5f5463f2-9924-4c05-95c9-0badbf699034
>         Ancestors: Compiler-jcg.147
>        
>         Collection>>fold: and SequenceableCollection>>copyUpThrough:,
>         extensions used by Cog VMMaker.
>         Change to older semantics of Character>>hex for Cog VMMaker.
>        




signature.asc (197 bytes) Download Attachment