diff options
author | dos-reis <gdr@axiomatics.org> | 2007-12-10 00:16:40 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-12-10 00:16:40 +0000 |
commit | 0d6564c18ff92a96f98c235b82a0da82556e5098 (patch) | |
tree | f192385e4384c35e51dc53cfb71bf1259f124027 /src | |
parent | ec1632426a56a5ba9771ed31abfd747510b185b9 (diff) | |
download | open-axiom-0d6564c18ff92a96f98c235b82a0da82556e5098.tar.gz |
* br-saturn.boot (compDefineCapsuleFunction): Remove.
(postSignature): Likewise.
(postDoubleSharp): Likewise.
Diffstat (limited to 'src')
-rw-r--r-- | src/interp/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/br-saturn.boot | 116 | ||||
-rw-r--r-- | src/interp/postpar.boot | 1 |
3 files changed, 6 insertions, 117 deletions
diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index 43b6b849..34dafa84 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,9 @@ +2007-12-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * br-saturn.boot (compDefineCapsuleFunction): Remove. + (postSignature): Likewise. + (postDoubleSharp): Likewise. + 2007-12-08 Gabriel Dos Reis <gdr@cs.tamu.edu> Add support for quasiquotation. diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index f7f071f0..1a3c653f 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -1638,122 +1638,6 @@ dbSort(x,y) == OBEY STRCONC('"rm ", sin, '".text") ---======================================================================= --- from define.boot ---======================================================================= -----------------------> (override in define.boot.pamphlet) -compDefineCapsuleFunction(df is ['DEF,form,signature,specialCases,body], - m,oldE,$prefix,$formalArgList) == - [lineNumber,:specialCases] := specialCases - e := oldE - --1. bind global variables - $form: local - $op: local - $functionStats: local:= [0,0] - $argumentConditionList: local - $finalEnv: local - --used by ReplaceExitEtc to get a common environment - $initCapsuleErrorCount: local:= #$semanticErrorStack - $insideCapsuleFunctionIfTrue: local:= true - $CapsuleModemapFrame: local:= e - $CapsuleDomainsInScope: local:= get("$DomainsInScope","special",e) - $insideExpressionIfTrue: local:= true - $returnMode:= m - [$op,:argl]:= form - $form:= [$op,:argl] - argl:= stripOffArgumentConditions argl - $formalArgList:= [:argl,:$formalArgList] - - --let target and local signatures help determine modes of arguments - argModeList:= - identSig:= hasSigInTargetCategory(argl,form,first signature,e) => - (e:= checkAndDeclare(argl,form,identSig,e); rest identSig) - [getArgumentModeOrMoan(a,form,e) for a in argl] - argModeList:= stripOffSubdomainConditions(argModeList,argl) - signature':= [first signature,:argModeList] - if null identSig then --make $op a local function - oldE := put($op,'mode,['Mapping,:signature'],oldE) - - --obtain target type if not given - if null first signature' then signature':= - identSig => identSig - getSignature($op,rest signature',e) or return nil - - --replace ##1,.. in signature by arguments --- pp signature' - signature':= SUBLISLIS(argl,$FormalFunctionParameterList,signature') --- pp '"------after----" --- pp signature' - e:= giveFormalParametersValues(argl,e) - - $signatureOfForm:= signature' --this global is bound in compCapsuleItems - $functionLocations := [[[$op,$signatureOfForm],:lineNumber], - :$functionLocations] - e:= addDomain(first signature',e) - e:= compArgumentConditions e - - if $profileCompiler then - for x in argl for t in rest signature' repeat profileRecord('arguments,x,t) - - - --4. introduce needed domains into extendedEnv - for domain in signature' repeat e:= addDomain(domain,e) - - --6. compile body in environment with extended environment - rettype:= resolve(signature'.target,$returnMode) - - localOrExported := - null member($op,$formalArgList) and - getmode($op,e) is ['Mapping,:.] => 'local - 'exported - - --6a skip if compiling only certain items but not this one - -- could be moved closer to the top - formattedSig := formatUnabbreviated ['Mapping,:signature'] - $compileOnlyCertainItems and _ - not member($op, $compileOnlyCertainItems) => - sayBrightly ['" skipping ", localOrExported,:bright $op] - [nil,['Mapping,:signature'],oldE] - sayBrightly ['" compiling ",localOrExported, - :bright $op,'": ",:formattedSig] - - T := CATCH('compCapsuleBody, compOrCroak(body,rettype,e)) - or ["",rettype,e] ---+ - NRTassignCapsuleFunctionSlot($op,signature') - if $newCompCompare=true then - SAY '"The old compiler generates:" - prTriple T --- A THROW to the above CATCH occurs if too many semantic errors occur --- see stackSemanticError - catchTag:= MKQ GENSYM() - fun:= - body':= replaceExitEtc(T.expr,catchTag,"TAGGEDreturn",$returnMode) - body':= addArgumentConditions(body',$op) - finalBody:= ["CATCH",catchTag,body'] - compileCases([$op,["LAM",[:argl,'_$],finalBody]],oldE) - $functorStats:= addStats($functorStats,$functionStats) - - --- 7. give operator a 'value property - val:= [fun,signature',e] - [fun,['Mapping,:signature'],oldE] -- oldE:= put($op,'value,removeEnv val,e) - ---from postpar ---------------------> NEW DEFINITION (override in postpar.boot.pamphlet) -postSignature ['Signature,op,sig] == - sig is ["->",:.] => - sig1:= postType sig - op:= postAtom (STRINGP op => INTERN op; op) - ["SIGNATURE",op,:removeSuperfluousMapping killColons postDoubleSharp sig1] - -postDoubleSharp sig == - sig is [['Mapping,target,:r]] => - -- replace #1,... by ##1,... - [['Mapping, SUBLISLIS($FormalFunctionParameterList, $FormalMapVariableList, target), - :r]] - sig - -- override in br-util.boot.pamphlet bcConform1 form == main where main() == diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot index e8a6007a..93a886b3 100644 --- a/src/interp/postpar.boot +++ b/src/interp/postpar.boot @@ -401,7 +401,6 @@ postSemiColon u == postBlock ["Block",:postFlattenLeft(u,";")] postSequence ["Sequence",:l] == ['(elt $ makeRecord),:postTranList l] ---------------------> NEW DEFINITION (see br-saturn.boot.pamphlet) postSignature ["Signature",op,sig] == sig is ["->",:.] => sig1:= postType sig |