The Inbox: Compiler-ct.420.mcz

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

The Inbox: Compiler-ct.420.mcz

commits-2
Christoph Thiede uploaded a new version of Compiler to project The Inbox:
http://source.squeak.org/inbox/Compiler-ct.420.mcz

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

Name: Compiler-ct.420
Author: ct
Time: 17 February 2020, 10:27:36.115324 am
UUID: e75e9def-1d37-b547-928f-1d86e102807e
Ancestors: Compiler-eem.416

Small refactoring: Use SmalltalkImage >> #classNamed: instead of #at:

Replaces Compiler-ct.418, which can be rejected. Thanks for the hint on the right protocol.

=============== Diff against Compiler-eem.416 ===============

Item was changed:
  ----- Method: Compiler>>evaluateCue:ifFail: (in category 'private') -----
  evaluateCue: aCue ifFail: failBlock
  "Compiles the cue source into a parse tree, then generates code into
  a method. Finally, the compiled method is invoked from here via withArgs:executeMethod:, hence the system no longer creates Doit method
  litter on errors."
 
  | methodNode method value |
  methodNode := self compileCue: aCue noPattern: true ifFail: [^failBlock value].
 
  method := self interactive
  ifTrue: [methodNode generateWithTempNames]
  ifFalse: [methodNode generate].
 
  value := cue receiver
  withArgs: (cue context ifNil: [#()] ifNotNil: [{cue context}])
  executeMethod: method.
+ ^ value!
- ^ value
- !

Item was changed:
  ----- Method: Compiler>>evaluateCue:ifFail:logged: (in category 'private') -----
  evaluateCue: aCue ifFail: failBlock logged: logFlag
  "Compiles the cue source into a parse tree, then generates code into
  a method. Finally, the compiled method is invoked from here via withArgs:executeMethod:, hence the system no longer creates Doit method
  litter on errors."
 
  | value |
  value := self evaluateCue: aCue ifFail: [^failBlock value].
  logFlag ifTrue:
  [SystemChangeNotifier uniqueInstance evaluated: cue stringToLog context: cue context].
+ ^ value!
- ^ value
- !

Item was changed:
  ----- Method: MethodNode>>asColorizedSmalltalk80Text (in category 'converting') -----
  asColorizedSmalltalk80Text
  "Answer a colorized Smalltalk-80-syntax string description of the parse tree whose root is the receiver."
 
  | printText |
  printText := self printString asText.
+ ^ (Smalltalk classNamed: #SHTextStylerST80)
- ^(Smalltalk at: #SHTextStylerST80 ifAbsent: [nil])
  ifNotNil: [:stylerClass| stylerClass new styledTextFor: printText]
  ifNil: [printText]!