diff options
-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) |