[Cuis-dev] [DEFECT] De-compling code uses #storeOn:

Gerald Klix cuis.01 at klix.ch
Fri Dec 10 07:22:41 PST 2021


Hi all, Hi Juan,

There is a defect in de-compiling code.
After de-compiling the resulting method node
is pretty printed. Constants defined with
a back-tick are "printed" by using #storeOn:,
which -- IHMO -- is dangerous as this
example method source proves:

--- snip ---
boom
	"Decompile me ..."

	^ `Smalltalk asDictionary` size
--- snap ---

The problem got much worse, when #linesOfCode
was based on #decompiledString.
Just selecting a package containing such a
method in the package browser
will cause the VM or the OS to run out of memory.

I think we need something like #printDecompiledOn:
which should do something sensible,
like sending #store: but limiting
the output size.


Best Regards,

Gerald


More information about the Cuis-dev mailing list