From bd7d826e17d7719188598a9149403d544d1c45bc Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 25 Oct 2009 02:39:57 +0000 Subject: * lib/cfuns-c.c (oa_spawn): New. (oa_allocate_process_argv): Likewise. --- src/interp/define.boot | 28 ++++++++++++---------------- src/interp/functor.boot | 13 +++++-------- src/interp/nruncomp.boot | 11 +++++------ 3 files changed, 22 insertions(+), 30 deletions(-) (limited to 'src/interp') diff --git a/src/interp/define.boot b/src/interp/define.boot index eb08520f..b21cdb7e 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -588,7 +588,7 @@ compDefineFunctor(df,m,e,prefix,fal) == compDefineFunctor1(df is ['DEF,form,signature,nils,body], m,$e,$prefix,$formalArgList) == --- 1. bind global variables + -- 1. bind global variables $addForm: local := nil $subdomain: local := false $functionStats: local:= [0,0] @@ -602,8 +602,7 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body], $functorForm: local := nil $functorLocalParameters: local := nil $CheckVectorList: local := nil - --prevents CheckVector from printing out same message twice - $getDomainCode: local -- code for getting views + $getDomainCode: local := nil -- code for getting views $insideFunctorIfTrue: local:= true $setelt: local := "setShellEntry" $genSDVar: local:= 0 @@ -629,9 +628,7 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body], stackAndThrow('" cannot produce category object: %1pb",[target]) $compileExportsOnly => compDefineExports(form, ds.1, signature',$e) $domainShell:= COPY_-SEQ ds ---+ copy needed since slot1 is reset; compMake.. can return a cached vector attributeList := ds.2 --see below under "loadTimeAlist" ---+ 7 lines for $NRT follow $condAlist: local := nil $uncondAlist: local := nil $NRTslot1PredicateList: local := predicatesFromAttributes attributeList @@ -653,14 +650,14 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body], parSignature:= SUBLIS($pairlis,signature') parForm:= SUBLIS($pairlis,form) --- (3.1) now make a list of the functor's local parameters; for --- domain D in argl,check its signature: if domain, its type is Join(A1,..,An); --- in this case, D is replaced by D1,..,Dn (gensyms) which are set --- to the A1,..,An view of D + -- (3.1) now make a list of the functor's local parameters; for + -- domain D in argl,check its signature: if domain, its type is Join(A1,..,An); + -- in this case, D is replaced by D1,..,Dn (gensyms) which are set + -- to the A1,..,An view of D makeFunctorArgumentParameters(argl,rest signature',first signature') $functorLocalParameters := argl --- 4. compile body in environment of %type declarations for arguments + -- 4. compile body in environment of %type declarations for arguments op':= $op rettype:= signature'.target -- If this functor is defined as instantiation of a functor @@ -686,7 +683,7 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body], augmentLisplibModemapsFromFunctor(parForm,operationAlist,parSignature) reportOnFunctorCompilation() --- 5. give operator a 'modemap property + -- 5. give operator a 'modemap property if $LISPLIB then modemap:= [[parForm,:parSignature],[true,op']] $lisplibModemap:= modemap @@ -771,12 +768,11 @@ reportOnFunctorCompilation() == displayMissingFunctions() == null $CheckVectorList => nil - loc := nil - exp := nil + loc := nil -- list of local operation signatures + exp := nil -- list of exported operation signatures for [[op,sig,:.],:pred] in $CheckVectorList | null pred repeat - null member(op,$formalArgList) and - getmode(op,$e) is ['Mapping,:.] => - loc := [[op,sig],:loc] + not member(op,$formalArgList) and getmode(op,$e) is ['Mapping,:.] => + loc := [[op,sig],:loc] exp := [[op,sig],:exp] if loc then sayBrightly ['%l,:bright '" Missing Local Functions:"] diff --git a/src/interp/functor.boot b/src/interp/functor.boot index f023faab..06b14c50 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -744,21 +744,18 @@ CheckVector(vec,name,catvecListMaker) == for i in 6..MAXINDEX vec repeat v:= vec.i v=true => nil - null v => nil - --a domain, which setVector4part3 will fill in + null v => nil --a domain, which setVector4part3 will fill in atom v => systemErrorHere ["CheckVector",v] atom first v => - --It's a secondary view of a domain, which we - --must generate code to fill in + --It's a secondary view of a domain, which we + --must generate code to fill in for x in $catNames for y in catvecListMaker repeat - if y=v then code:= - [["setShellEntry",name,i,x],:code] + if y=v then + code := [["setShellEntry",name,i,x],:code] if name='$ then assoc(first v,$CheckVectorList) => nil $CheckVectorList:= [[first v,:makeMissingFunctionEntry(condAlist,i)],:$CheckVectorList] --- member(first v,$CheckVectorList) => nil --- $CheckVectorList:= [first v,:$CheckVectorList] code makeMissingFunctionEntry(alist,i) == diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index f74d2afb..79aa917a 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -465,7 +465,7 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) == :predBitVectorCode2,storeOperationCode] $CheckVectorList := NRTcheckVector domainShell ---CODE: part 1 + --CODE: part 1 codePart1:= [:devaluateCode,createDomainCode, createViewCode,setVector0Code, slot3Code,:slamCode] where devaluateCode:= [["%LET",b,['devaluate,a]] for [a,:b] in $devaluateList] @@ -478,7 +478,7 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) == isCategoryPackageName opOf $definition => nil [NRTaddToSlam($definition,'$)] ---CODE: part 3 + --CODE: part 3 $ConstantAssignments := [NRTputInLocalReferences code for code in $ConstantAssignments] codePart3:= [:constantCode1, @@ -489,7 +489,7 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) == -- The above line is needed to get the recursion -- Integer => FontTable => NonNegativeInteger => Integer -- right. Otherwise NNI has 'unset' for 0 and 1 --- setVector4c:= setVector4part3($catNames,$catvecList) + -- setVector4c:= setVector4part3($catNames,$catvecList) -- In particular, setVector4part3 and setVector5, -- which generate calls to local domain-instantiators, -- must come after operations are set in the vector. @@ -516,14 +516,13 @@ NRTcheckVector domainShell == -- (b) NIL -- item is a domain; will be filled in by setVector4part3 -- (c) categoryForm-- it was a domain view; now irrelevant -- (d) op-signature-- store missing function info in $CheckVectorList - v:= domainShell.i + v := domainShell.i v=true => nil --item is marked; ignore v=nil => nil --a domain, which setVector4part3 will fill in atom v => systemErrorHere '"CheckVector" atom first v => nil --category form; ignore assoc(first v,alist) => nil - alist:= - [[first v,:$SetFunctions.i],:alist] + alist := [[first v,:$SetFunctions.i],:alist] alist mkDomainCatName id == INTERN STRCONC(id,";CAT") -- cgit v1.2.3