diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/define.boot | 2 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 27 |
3 files changed, 21 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 92225468..e8aef8cf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-11-24 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/lisplib.boot (compDefineExports): Tidy. + * interp/define.boot (compDefineFunctor1): Adjust call. + 2008-11-23 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/i-output.boot ($RecordSeparator): New. diff --git a/src/interp/define.boot b/src/interp/define.boot index bfcfa996..fe88c86e 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -590,7 +590,7 @@ compDefineFunctor1(df is ['DEF,form,signature,$functorSpecialCases,body], $e:= giveFormalParametersValues(argl,$e) [ds,.,$e]:= compMakeCategoryObject(target,$e) or return stackAndThrow('" cannot produce category object: %1pb",[target]) - $compileExportsOnly => compDefineExports($op, ds.1, signature',$e) + $compileExportsOnly => compDefineExports(form, ds.1, signature',$e) $domainShell:= COPY_-SEQ ds --+ copy needed since slot1 is reset; compMake.. can return a cached vector attributeList := disallowNilAttribute ds.2 --see below under "loadTimeAlist" diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index fe0972da..79b4ec24 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -705,24 +705,27 @@ getIndexTable dir == nil) --% -compDefineExports(op,ops,sig,e) == +compDefineExports(form,ops,sig,e) == not $LISPLIB => systemErrorHere "compDefineExports" + op := first form -- Ensure constructor parameters appear as formals sig := SUBLIS($pairlis, sig) ops := SUBLIS($pairlis,ops) - -- Since we don't compile the capsule, the slot numbers are + form := SUBLIS($pairlis,form) + -- In case we are not compiling the capsule, the slot numbers are -- most likely bogus. Nullify them so people don't think they -- bear any meaningful semantics (well, they should not think -- these are forwarding either). - for entry in ops repeat - fixupSigloc entry where - fixupSigloc entry == - [opsig,pred,funsel] := entry - if pred ^= 'T then - rplac(second entry, simpBool pred) - funsel is [op,a,:.] and op in '(ELT CONST) => - rplac(third entry,[op,a,nil]) - ops := listSort(function GGREATERP, ops, function first) + if $compileExportsOnly then + for entry in ops repeat + fixupSigloc entry where + fixupSigloc entry == + [opsig,pred,funsel] := entry + if pred ^= 'T then + rplac(second entry, simpBool pred) + funsel is [op,a,:.] and op in '(ELT CONST) => + rplac(third entry,[op,a,nil]) + ops := listSort(function GGREATERP, ops, function first) libName := getConstructorAbbreviation op exportsFile := strconc(STRING libName,'".sig") removeFile exportsFile @@ -730,7 +733,7 @@ compDefineExports(op,ops,sig,e) == PRETTYPRINT( ["SETQ", "$CategoryFrame", ["put", quoteForm op, quoteForm "isFunctor", quoteForm ops, - ["addModemap", quoteForm op, quoteForm first sig, + ["addModemap", quoteForm op, quoteForm form, quoteForm sig, true, quoteForm op, ["put", quoteForm op, quoteForm "mode", quoteForm ["Mapping",:sig], "$CategoryFrame"]]]], s)) |