diff options
author | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-09 23:18:22 -0800 |
---|---|---|
committer | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-09 23:18:22 -0800 |
commit | 3465292862da54d168542b62be13790de0cd5988 (patch) | |
tree | 259d52b741cba3391877c529b6261edb71fb00f6 /src | |
parent | ea62b3a837416bea218f7a52db80505b8d271dc3 (diff) | |
download | open-axiom-3465292862da54d168542b62be13790de0cd5988.tar.gz |
Switch getDualSignature to avoiding interpreter database
Now that OpenAxiom emits the dual signature data also directly in the
generated executable code for a constructor, there is no no need to
consult the interpreter data base for that information. This change
relies on the previous commit, e.g. getDualSignature should be
considered invalid for builtin constructors. Any instanbility caused
by this patch should be considered a latent bug that should be given
high priority fixing.
Diffstat (limited to 'src')
-rw-r--r-- | src/algebra/Makefile.am | 11 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 10 | ||||
-rw-r--r-- | src/interp/daase.lisp | 12 | ||||
-rw-r--r-- | src/interp/database.boot | 6 | ||||
-rw-r--r-- | src/interp/nrunfast.boot | 2 |
5 files changed, 23 insertions, 18 deletions
diff --git a/src/algebra/Makefile.am b/src/algebra/Makefile.am index 966b1e50..2bbe75f7 100644 --- a/src/algebra/Makefile.am +++ b/src/algebra/Makefile.am @@ -412,7 +412,8 @@ strap-0/FINRALG.$(FASLEXT): strap-0/COMRING.$(FASLEXT) \ strap-0/NORMRETR.$(FASLEXT): strap-0/FAXF.$(FASLEXT) strap-0/FAXF.$(FASLEXT): strap-0/XF.$(FASLEXT) strap-0/COMPLEX.$(FASLEXT): strap-0/COMPCAT.$(FASLEXT) -strap-0/COMPCAT.$(FASLEXT): strap-0/COMRING.$(FASLEXT) +strap-0/COMPCAT.$(FASLEXT): strap-0/COMRING.$(FASLEXT) \ + strap-0/MONOGEN.$(FASLEXT) strap-0/MSET.$(FASLEXT): strap-0/MSETAGG.$(FASLEXT) strap-0/MSETAGG.$(FASLEXT): strap-0/MDAGG.$(FASLEXT) strap-0/AN.$(FASLEXT): strap-0/ACF.$(FASLEXT) @@ -1125,6 +1126,7 @@ strap-1/CATAST.$(FASLEXT): strap-0/CTORKIND.$(FASLEXT) strap-1/HEADAST.$(FASLEXT): strap-0/PARAMAST.$(FASLEXT) strap-1/ITFORM.$(FASLEXT): strap-0/IRFORM.$(FASLEXT) strap-1/LINBASIS.$(FASLEXT): strap-0/DBASIS.$(FASLEXT) +strap-1/FR2.$(FASLEXT): strap-0/COMPLEX.$(FASLEXT) # Bootstrap stage 2 dependencies. # At this stage we recompile everything from stage 1, including @@ -1689,7 +1691,7 @@ strap-2/CATAST.$(FASLEXT): strap-1/CTORKIND.$(FASLEXT) strap-2/TYPEAST.$(FASLEXT): strap-1/SPADAST.$(FASLEXT) strap-2/IRFORM.$(FASLEXT): strap-1/ITFORM.$(FASLEXT) strap-2/LINELT.$(FASLEXT): strap-1/LINBASIS.$(FASLEXT) - +strap-2/FR2.$(FASLEXT): strap-1/COMPLEX.$(FASLEXT) # @@ -2170,6 +2172,9 @@ oa_algebra_layer_0_objects = \ $(addprefix $(OUT)/, \ $(addsuffix .$(FASLEXT),$(oa_algebra_layer_0))) +# FIXME: +$(OUT)/ES.$(FASLEXT): strap-2/INFORM.$(FASLEXT) + $(OUT)/VOID.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/HOMOTOP.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/KRCFROM.$(FASLEXT) $(OUT)/ITUPLE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/STREAM.$(FASLEXT) @@ -2391,6 +2396,8 @@ $(OUT)/LINDEP.$(FASLEXT): strap-2/LSMP.$(FASLEXT) \ strap-2/MATCAT2.$(FASLEXT) strap-2/VECTOR2.$(FASLEXT) $(OUT)/POLY.$(FASLEXT): strap-2/INDE.$(FASLEXT) +# FIXME: +$(OUT)/FR2.$(FASLEXT): strap-2/COMPLEX.$(FASLEXT) oa_algebra_layer_9 = \ DLP EAB IPADIC MAGMA QUEUE MATLIN \ diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index fd9f582f..ee2cb183 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -1914,7 +1914,8 @@ strap-0/FINRALG.$(FASLEXT): strap-0/COMRING.$(FASLEXT) \ strap-0/NORMRETR.$(FASLEXT): strap-0/FAXF.$(FASLEXT) strap-0/FAXF.$(FASLEXT): strap-0/XF.$(FASLEXT) strap-0/COMPLEX.$(FASLEXT): strap-0/COMPCAT.$(FASLEXT) -strap-0/COMPCAT.$(FASLEXT): strap-0/COMRING.$(FASLEXT) +strap-0/COMPCAT.$(FASLEXT): strap-0/COMRING.$(FASLEXT) \ + strap-0/MONOGEN.$(FASLEXT) strap-0/MSET.$(FASLEXT): strap-0/MSETAGG.$(FASLEXT) strap-0/MSETAGG.$(FASLEXT): strap-0/MDAGG.$(FASLEXT) strap-0/AN.$(FASLEXT): strap-0/ACF.$(FASLEXT) @@ -2627,6 +2628,7 @@ strap-1/CATAST.$(FASLEXT): strap-0/CTORKIND.$(FASLEXT) strap-1/HEADAST.$(FASLEXT): strap-0/PARAMAST.$(FASLEXT) strap-1/ITFORM.$(FASLEXT): strap-0/IRFORM.$(FASLEXT) strap-1/LINBASIS.$(FASLEXT): strap-0/DBASIS.$(FASLEXT) +strap-1/FR2.$(FASLEXT): strap-0/COMPLEX.$(FASLEXT) # Bootstrap stage 2 dependencies. # At this stage we recompile everything from stage 1, including @@ -3191,6 +3193,7 @@ strap-2/CATAST.$(FASLEXT): strap-1/CTORKIND.$(FASLEXT) strap-2/TYPEAST.$(FASLEXT): strap-1/SPADAST.$(FASLEXT) strap-2/IRFORM.$(FASLEXT): strap-1/ITFORM.$(FASLEXT) strap-2/LINELT.$(FASLEXT): strap-1/LINBASIS.$(FASLEXT) +strap-2/FR2.$(FASLEXT): strap-1/COMPLEX.$(FASLEXT) # # @@ -3499,6 +3502,9 @@ $(OUT)/COMOPC.$(FASLEXT): $(OUT)/BINOPC.$(FASLEXT) $(OUT)/COMOP.$(FASLEXT): $(OUT)/COMOPC.$(FASLEXT) $(OUT)/KOERCE.$(FASLEXT) +# FIXME: +$(OUT)/ES.$(FASLEXT): strap-2/INFORM.$(FASLEXT) + $(OUT)/VOID.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/HOMOTOP.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/KRCFROM.$(FASLEXT) $(OUT)/ITUPLE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/STREAM.$(FASLEXT) @@ -3585,6 +3591,8 @@ $(OUT)/LINDEP.$(FASLEXT): strap-2/LSMP.$(FASLEXT) \ strap-2/MATCAT2.$(FASLEXT) strap-2/VECTOR2.$(FASLEXT) $(OUT)/POLY.$(FASLEXT): strap-2/INDE.$(FASLEXT) +# FIXME: +$(OUT)/FR2.$(FASLEXT): strap-2/COMPLEX.$(FASLEXT) # FIXME: Investigate circularity $(OUT)/CPIMA.$(FASLEXT): strap-2/MONOGEN.$(FASLEXT) \ diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp index 213ffdf4..dd862ebd 100644 --- a/src/interp/daase.lisp +++ b/src/interp/daase.lisp @@ -637,12 +637,6 @@ (and (eq key 'hascategory) (consp constructor))) (let ((struct (and (symbolp constructor) (|constructorDB| constructor)))) (case key -; note that abbreviation, constructorkind and cosig are heavy hitters -; thus they occur first in the list of things to check - (cosig - (setq stream *interp-stream*) - (when struct - (setq data (|dbDualSignature| struct)))) (operation (setq stream *operation-stream*) (setq data (gethash constructor *operation-hash*))) @@ -722,10 +716,6 @@ (setf (gethash constructor *operation-hash*) data)) (hascategory (setf (gethash constructor |$HasCategoryTable|) data)) - (constructorkind - (setf (|dbConstructorKind| struct) data)) - (cosig - (setf (|dbDualSignature| struct) data)) (constructormodemap (setf (|dbConstructorModemap| struct) data)) (constructorcategory @@ -736,8 +726,6 @@ (setf (|dbModemaps| struct) data)) (object (setf (|dbModule| struct) data)) - (abbreviation - (setf (|dbAbbreviation| struct) data)) (constructor (setf (|dbConstructor| struct) data)) (ancestors diff --git a/src/interp/database.boot b/src/interp/database.boot index 7f01fdb3..01034700 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -149,8 +149,10 @@ getConstructorArgsFromDB ctor == ++ parameter type at the corresponding position is a category. getDualSignature: %Symbol -> %Form getDualSignature ctor == - db := constructorDB ctor or return nil - dbDualSignature db or GETDATABASE(ctor,'COSIG) + db := constructorDB ctor + if not dbBeingDefined? db then + loadDBIfNecessary db + dbDualSignature db getConstructorPredicates: %Symbol -> %List %Thing getConstructorPredicates ctor == diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index a2cbd0a3..c160002f 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -403,7 +403,7 @@ lazyMatch(source,lazyt,dollar,domain) == lazyMatchArgDollarCheck(s,d,dollarName,domainName) == #s ~= #d => nil scoSig := - s.op in '(Union Mapping Record) => [true for x in s.args] + s.op in '(Union Mapping Record _:) => [true for x in s.args] getDualSignature s.op or return nil and/[fn for x in s.args for arg in d.args for xt in scoSig] where fn() == |