[FIX] decompFixes-ls

Lex Spoon lex at cc.gatech.edu
Fri Jan 30 04:51:30 UTC 2004


from preamble:

"Change Set:		decompFixes-ls
Date:			30 January 2004
Author:			Lex Spoon

Fixes the decompiler bug posted by Ned Konz on 11 February 2003.  The
issue is that if the last case in a case statement returns from the
method, the decompiler gets confused trying to parse the otherwise:
branch.  This changeset has the decompiler track all non-return exits
from the case statement, so that it has enough information to do a right
thing.

The changeset also adds a couple of methods that the decompiler is
relying on.

After loading this changeset, Ned's example decompiles correctly.  Also,
decompiling and recompiling everything leaves a running system.  The
test is included for future use as [Decompiler recompileAllTest].


s0: evt
	evt caseOf: {
		[ #Entry ] -> [ self log: 's0-ENTRY;'. ^nil ].
		[ #Exit ] -> [ self log: 's0-EXIT;'. ^nil ].
		[ #Init ] -> [ self log: 's0-INIT;'. self initProtected: #s1:. ^nil ].
		[ #e ] -> [ self log: 's0-E;'. self tran: #s211:. ^nil ].
	} otherwise:  [ ^#top: ]"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decompFixes-ls.cs.gz
Type: application/octet-stream
Size: 3178 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040130/4941e0cd/decompFixes-ls.cs.obj


More information about the Squeak-dev mailing list