From 2f2cf5024ab894aa083d87f1e008528d5a5c717b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 13 Dec 2007 14:34:08 +0000 Subject: * c-util.boot (isAlmostSimple): A `case' expresion with a simple identified as first operand is a simple-expression. --- src/interp/ChangeLog | 5 +++++ src/interp/c-util.boot | 1 + 2 files changed, 6 insertions(+) (limited to 'src/interp') diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index 84afa26c..81b92178 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,8 @@ +2007-12-13 Gabriel Dos Reis + + * c-util.boot (isAlmostSimple): A `case' expresion with a simple + identified as first operand is a simple-expression. + 2007-12-12 Gabriel Dos Reis * parse.boot: Register parsers by name, not by pointers. diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index d5b8492e..05a65bb7 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -382,6 +382,7 @@ isAlmostSimple x == op="LET" => IDENTP y => (setAssignment LIST x; y) (setAssignment [["LET",g:= genVariable(),:l],["LET",y,g]]; g) + op = "case" and IDENTP y => x isSideEffectFree op => [op,:mapInto(rest x, function fn)] $assignmentList:= "failed" setAssignment x == -- cgit v1.2.3