From 96eba08809f7d9416840fa1d600fa777c25f9f60 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sun, 31 Jan 2016 11:46:54 -0800 Subject: Tidy spadCompileOrSetq --- src/interp/define.boot | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/interp/define.boot b/src/interp/define.boot index 7ed53af4..e41c3ac1 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -54,8 +54,6 @@ module define where compDefine1: (%Maybe %Database,%Form,%Mode,%Env) -> %Maybe %Triple -$doNotCompileJustPrint := false - --% $forceAdd := false @@ -1975,10 +1973,12 @@ compDefineCapsuleFunction(db,df is ['DEF,form,signature,body], sayBrightly ['" compiling ",localOrExported, :bright $op,'": ",:formattedSig] - T := CATCH('compCapsuleBody, compOrCroak(body,rettype,e)) - or [$ClearBodyToken,rettype,e] - -- A THROW to the above CATCH occurs if too many semantic errors occur + -- A THROW to this catch point occurs if too many semantic errors occur -- see stackSemanticError + T := CATCH('compCapsuleBody, compOrCroak(body,rettype,e)) + or return + sayBrightly ['" ",:bright $op,'" not compiled"] + [$ClearBodyToken,rettype,e] n := assignCapsuleFunctionSlot(db,$op,signature) -- Build a name for the implementation. op' := @@ -2109,7 +2109,6 @@ compile(db,u,signature) == $insideCapsuleFunctionIfTrue => putInLocalDomainReferences(db,optimizedBody) optimizedBody - $doNotCompileJustPrint => (PRETTYPRINT stuffToCompile; first u) $macroIfTrue => constructMacro stuffToCompile try spadCompileOrSetq(db,stuffToCompile) finally @@ -2121,10 +2120,6 @@ compile(db,u,signature) == ++ items defined directly or indirectly at capsule level. This is ++ also used to compile functors. spadCompileOrSetq(db,form is [nam,[lam,vl,body]]) == - --bizarre hack to take account of the existence of "known" functions - --good for performance (LISPLLIB size, BPI size, NILSEC) - CONTAINED($ClearBodyToken,body) => sayBrightly ['" ",:bright nam,'" not compiled"] - vl := cleanParameterList! vl if $optReplaceSimpleFunctions then body := replaceSimpleFunctions body -- cgit v1.2.3