diff options
author | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-06 23:25:26 -0800 |
---|---|---|
committer | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-06 23:25:26 -0800 |
commit | 3453d3a52c3809ffd6b5f80d3ab71dde4b9ba8e1 (patch) | |
tree | 1e9d59a5a26190bb019c6ef123ffb974f94d2d23 /src/interp | |
parent | 7552dba60fd95c427d341e4e9088b1c79b90d223 (diff) | |
download | open-axiom-3453d3a52c3809ffd6b5f80d3ab71dde4b9ba8e1.tar.gz |
Remove $insideCategoryIfTrue. Replace with call to new function dbForCategory?
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/c-util.boot | 6 | ||||
-rw-r--r-- | src/interp/compiler.boot | 2 | ||||
-rw-r--r-- | src/interp/database.boot | 2 | ||||
-rw-r--r-- | src/interp/define.boot | 4 | ||||
-rw-r--r-- | src/interp/sys-globals.boot | 5 |
5 files changed, 9 insertions, 10 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 84b6df23..58706ec0 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2015, Gabriel Dos Reis. +-- Copyright (C) 2007-2016, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -225,6 +225,10 @@ macro dbSubstituteQueries(db,x) == dbSubstituteAllQuantified(db,x) == applySubst([:dbQuerySubst db,:dbFormalSubst db],x) +++ This predicate holds if this DB is for a category constructor. +dbForCategory? db == + db ~= nil and dbConstructorKind db is 'category + --% $SetCategory == '(SetCategory) diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 4825382a..0ff039f3 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1697,7 +1697,7 @@ compColon([":",f,t],m,e) == t:= t isnt [.,:.] and (t':= assoc(t,getDomainsInScope e)) => t' t = $Category and categoryInstance? f => t - isDomainForm(t,e) and not $insideCategoryIfTrue => + not dbForCategory? db and isDomainForm(t,e) => e := addDomain(db,t,e) t isDomainForm(t,e) or isCategoryForm(t,e) => t diff --git a/src/interp/database.boot b/src/interp/database.boot index be21edfe..7f0d11b3 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2013, Gabriel Dos Reis. +-- Copyright (C) 2007-2016, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without diff --git a/src/interp/define.boot b/src/interp/define.boot index 767521ab..63a5f31c 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -843,7 +843,6 @@ compDefine1(db,form,m,e) == (sig := getSignatureFromMode(lhs,e)) => -- here signature of lhs is determined by a previous declaration compDefine1(db,['DEF,lhs,[sig.target,:signature.source],rhs],m,e) - if signature.target=$Category then $insideCategoryIfTrue:= true -- RDJ (11/83): when argument and return types are all declared, -- or arguments have types declared in the environment, @@ -1109,7 +1108,6 @@ compDefineCategory2(db,form,signature,body,m,e,$formalArgList) == --1. bind global variables $prefix: local := nil $op: local := form.op - $insideCategoryIfTrue: local := true $definition: local := form --used by DomainSubstitutionFunction $form: local := nil $extraParms: local := nil @@ -2339,7 +2337,7 @@ compCapsuleInner(db,itemList,m,e) == if $addForm ~= nil then data := ['add,$addForm,data] code := - $insideCategoryIfTrue and not $insideCategoryPackageIfTrue => data + dbForCategory? db => data buildFunctor(db,$signature,data,localParList,e) [MKPF([:$getDomainCode,code],"PROGN"),m,e] diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index ae2d5f80..65aa9a4f 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2014, Gabriel Dos Reis. +-- Copyright (C) 2007-2016, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -106,9 +106,6 @@ $inLispVM := true $insideCapsuleFunctionIfTrue := false ++ -$insideCategoryIfTrue := false - -++ $insideCoerceInteractiveHardIfTrue := false ++ |