diff options
author | dos-reis <gdr@axiomatics.org> | 2012-02-19 21:53:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2012-02-19 21:53:52 +0000 |
commit | e4d42fad6ae663b5fdae7d6fae8f3aba51575849 (patch) | |
tree | d4431e3948efbd4d1974d9180ea2b546dee392ad /src | |
parent | a1e31762f7c4c0c47295324b1039848150396246 (diff) | |
download | open-axiom-e4d42fad6ae663b5fdae7d6fae8f3aba51575849.tar.gz |
* interp/compiler.boot (compBuiltinDomain): Compute the exports
from parentsOfBuiltinInstance.
* interp/buildom.boot (parentsOfBuiltinInstance): Tidy.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/buildom.boot | 8 | ||||
-rw-r--r-- | src/interp/compiler.boot | 8 |
3 files changed, 16 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 27687105..32ed8418 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2012-02-19 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/compiler.boot (compBuiltinDomain): Compute the exports + from parentsOfBuiltinInstance. + * interp/buildom.boot (parentsOfBuiltinInstance): Tidy. + +2012-02-19 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/compiler.boot (compBuiltinDomain): Rename from compCat. 2012-02-19 Gabriel Dos Reis <gdr@cs.tamu.edu> diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot index 1acc3560..449ae06f 100644 --- a/src/interp/buildom.boot +++ b/src/interp/buildom.boot @@ -696,10 +696,10 @@ parentsOfBuiltinInstance form == op is 'MappingCategory => nil -- [[$Type,:true]] op is 'EnumerationCategory => [[$SetCategory,:true]] -- builtin domains - op is 'Mapping => [['MappingCategory,:args],:true] - op is 'Record => [['RecordCategory,:args],:true] - op is 'Union => [['UnionCategory,:args],:true] - op is 'Enumeration => [['EnumerationCategory,:args],:true] + op is 'Mapping => [[['MappingCategory,:args],:true],[$SetCategory,:true]] + op is 'Record => [[['RecordCategory,:args],:true]] + op is 'Union => [[['UnionCategory,:args],:true]] + op is 'Enumeration => [[['EnumerationCategory,:args],:true]] nil $CapitalLetters == diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 83112679..06c617be 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2011, Gabriel Dos Reis. +-- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -2027,8 +2027,12 @@ compBuiltinDomain(form is [functorName,:argl],m,e) == fn := property(functorName,"makeFunctionList") or return nil diagnoseUnknownType(form,e) [funList,e]:= FUNCALL(fn,form,form,e) + exports := [cat for x in parentsOfBuiltinInstance form] + where cat() == + x.rest is true => x.first + ['IF,x.rest,['ATTRIBUTE,x.first],'%noBranch] catForm:= - ["Join",$SetCategory,["CATEGORY","domain",: + ["Join",:exports,["CATEGORY","domain",: [["SIGNATURE",op,sig] for [op,sig,.] in funList | op~="="]]] --RDJ: for coercion purposes, it necessary to know it's a Set; I'm not --sure if it uses any of the other signatures(see extendsCategoryForm) |