Skip to content

Commit

Permalink
Removing dependency on the formatter for printing blocks.
Browse files Browse the repository at this point in the history
This solution depends on the bytecode encoder and on the bytecode generator.
  • Loading branch information
carolahp committed Feb 29, 2020
1 parent c3914a4 commit ac2bc12
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Kernel/BlockClosure.class.st
Expand Up @@ -549,12 +549,7 @@ BlockClosure >> outerContext: aContext startpc: aStartpc numArgs: argCount copie

{ #category : #printing }
BlockClosure >> printOn: aStream [

aStream nextPutAll: ((self method hasSourceCode
or: [ "There is a decompiler"
self class environment includesKey: #FBDDecompiler ])
ifTrue: [ self sourceNode formattedCode ]
ifFalse: [ 'aBlockClosure(no source code or decompiler available)' ])
aStream nextPutAll: (self method ast sourceNodeForPC: self endPC) sourceCode
]

{ #category : #accessing }
Expand Down

0 comments on commit ac2bc12

Please sign in to comment.