aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-06-14 23:39:25 +0000
committerdos-reis <gdr@axiomatics.org>2013-06-14 23:39:25 +0000
commitc35033aee6d48c9abf251594f7567026d5ef9204 (patch)
treec0fb10a8e46ea65dd83113fc51a6e4d475ddfcc9 /src/interp
parent09c021ae74c560f83d9a491d4e610681828a8028 (diff)
downloadopen-axiom-c35033aee6d48c9abf251594f7567026d5ef9204.tar.gz
compColon is now smarter about category definitions.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/Makefile.in8
-rw-r--r--src/interp/c-util.boot37
-rw-r--r--src/interp/compiler.boot4
3 files changed, 44 insertions, 5 deletions
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index 349bc2a2..7d9dbeec 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -1,6 +1,6 @@
## Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
## All rights reserved.
-## Copyright (C) 2007-2012, Gabriel Dos Reis.
+## Copyright (C) 2007-2013, Gabriel Dos Reis.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
@@ -197,11 +197,9 @@ makeint.lisp: Makefile
@ echo '#+:gcl (si::gbc-time 0)' >> makeint.lisp
@ echo '#+:GCL (si::gbc t)' >> makeint.lisp
-${SAVESYS}: database.date $(axiom_target_datadir)/msgs/s2-us.msgs $(OBJS) $(oa_target_ffi)
+$(SAVESYS): database.date $(axiom_target_datadir)/msgs/s2-us.msgs $(OBJS) $(oa_target_ffi)
$(DRIVER) --execpath=$(BOOTSYS) \
- --syslib=$(axiom_target_libdir) \
- --system="$(AXIOM)/" --system-algebra \
- --sysdb="$(axiom_src_datadir)/algebra/" \
+ --syslib=$(axiom_target_libdir) --system="$(AXIOM)/" \
--prologue="(pushnew :open-axiom-basic-system *features*)" \
--make --output=$@ --main="BOOT::|systemMain|" \
--load-directory=. $(OBJS)
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 6d7161c4..27c12319 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -237,6 +237,43 @@ dbInfovec name ==
u := property(name,'infovec) => u
nil
+++ Access to the shell template associated with an infovec.
+macro ivDomainShell iv ==
+ first iv
+
+++ Access to the operation table associated with an infovec.
+macro ivOptable iv ==
+ second iv
+
+++ Access the alist mapping an attribute to the predicate index
+++ associated with an infovec.
+macro ivAttributePredicateIndexDirectory iv ==
+ third iv
+
+++ Access to additional data in the infovec
+macro ivAdditionalData iv ==
+ fourth iv
+
+++ Access to predicate bitvector as associated with an infovec.
+macro ivPredicateBitvector iv ==
+ first ivAdditionalData iv
+
+++ Access to the vector of category default package functors
+++ associated with an infovec.
+macro ivCategoryDefaults iv ==
+ second ivAdditionalData iv
+
+++ Access to the principal ancestors of a domain shell associated
+++ with an infovec.
+macro ivPrincipalAncestors iv ==
+ third ivAdditionalData iv
+
+++ Return the exported operation descriptors bytecode vector
+++ associated with an infovec.
+ivExportBytecodes iv ==
+ [.,.,.,:vec] := ivAdditionalData iv
+ vec
+
--%
++ Token to indicate that a function body should be ignored.
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 0306d3d6..76aefd3d 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1675,6 +1675,9 @@ maybeSpliceMode m ==
(m' := isQuasiquote m) => m'
m
+categoryInstance? x ==
+ x is [c,:.] and ident? c and categoryConstructor? c
+
compColon: (%Form,%Mode,%Env) -> %Maybe %Triple
compColon([":",f,t],m,e) ==
db := currentDB e
@@ -1683,6 +1686,7 @@ compColon([":",f,t],m,e) ==
$lhsOfColon: local:= f
t:=
t isnt [.,:.] and (t':= assoc(t,getDomainsInScope e)) => t'
+ t = $Category and categoryInstance? f => t
isDomainForm(t,e) and not $insideCategoryIfTrue =>
e := addDomain(db,t,e)
t