From 52956b84e708277f7f96ec5189866237a76a308a Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 6 Mar 2011 23:10:47 +0000 Subject: * interp/i-eval.boot (mkEvalable): Simplify. (mkEvalableMapping): Remove. (mkEvalableRecord): Likewise. (mkEvalableUnion): Likewise. --- src/ChangeLog | 9 ++++++++- src/interp/i-eval.boot | 23 ++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 12f9caeb..336f1501 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,11 @@ -2011-03-06 Gabriel Dos Reis +2011-03-06 Gabriel Dos Reis + + * interp/i-eval.boot (mkEvalable): Simplify. + (mkEvalableMapping): Remove. + (mkEvalableRecord): Likewise. + (mkEvalableUnion): Likewise. + +2011-03-06 Gabriel Dos Reis * interp/g-opt.boot ($VMsideEffectFreeOperators): Include %c2s. * interp/lisp-backend.boot: Translate it. diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot index e857253d..56e5fc33 100644 --- a/src/interp/i-eval.boot +++ b/src/interp/i-eval.boot @@ -49,12 +49,12 @@ evalDomain form == mkEvalable form == form is [op,:argl] => - op="QUOTE" => form - op="WRAPPED" => mkEvalable devaluate argl - op="Record" => mkEvalableRecord form - op="Union" => mkEvalableUnion form - op="Mapping"=> mkEvalableMapping form - op="Enumeration" => form + op is "QUOTE" => form + op is ":" => [op,second form,mkEvalable third form] + op is "WRAPPED" => mkEvalable devaluate argl + op in '(Record Union Mapping) => + [op,:[mkEvalable arg for arg in argl]] + op is 'Enumeration => form -- a niladic constructor instantiation goes by itself constructor? op and argl = nil => form loadIfNecessary op @@ -75,17 +75,6 @@ mkEvalable form == FBPIP form => BPINAME form form -mkEvalableMapping form == - [first form,:[mkEvalable d for d in rest form]] - -mkEvalableRecord form == - [first form,:[[":",n,mkEvalable d] for [":",n,d] in rest form]] - -mkEvalableUnion form == - isTaggedUnion form => - [first form,:[[":",n,mkEvalable d] for [":",n,d] in rest form]] - [first form,:[mkEvalable d for d in rest form]] - evaluateType0 form == -- Takes a parsed, unabbreviated type and evaluates it, replacing -- type valued variables with their values, and calling bottomUp -- cgit v1.2.3