Fix a Zoltan bug! ;-)

tag_switch.m:
	Fix a Zoltan bug! ;-)
	This was the bug causing the "Software error: no failure continuation"
	errors.  The problem was that when Zoltan changed the field
	in switches from a determism to can_fail/cannot_fail, he accidentally
	inverted the sense of a test, causing the code to generate the
	"fail" case only for tag switches which can never fail.
This commit is contained in:
Fergus Henderson
1995-04-14 14:40:45 +00:00
parent 596eac55c5
commit 1ff5c5fdb0

View File

@@ -76,10 +76,10 @@ tag_switch__generate(Cases, Var, CodeModel, CanFail, EndLabel, Code) -->
% we generate FailCode and EndCode here because the last case within
% a primary tag may not be the last case overall
(
{ CanFail = can_fail },
{ CanFail = cannot_fail },
{ FailCode = empty }
;
{ CanFail = cannot_fail },
{ CanFail = can_fail },
code_info__generate_failure(FailCode1),
{ FailCode = tree(
node([label(FailLabel) - "switch has failed"]),