aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/boot/utility.boot6
-rw-r--r--src/interp/Makefile.in8
-rw-r--r--src/interp/c-util.boot37
-rw-r--r--src/interp/compiler.boot4
5 files changed, 57 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6718e907..98e0770e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2013-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * interp/compiler.boot (categoryInstance?): New.
+ (compColon): Use it for category definitions.
+ * interp/c-util.boot: Add accessors for infovec parts.
+ * boot/utility.boot (invertSubst): New. Export.
+ * interp/Makefile.in ($(SAVESYS)): Remove --sysdb and --system-algebra.
+
2013-06-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* interp/define.boot (getvalue): Rename from GetValue.
diff --git a/src/boot/utility.boot b/src/boot/utility.boot
index cdc6d05d..839e9b1a 100644
--- a/src/boot/utility.boot
+++ b/src/boot/utility.boot
@@ -1,4 +1,4 @@
--- Copyright (C) 2012, Gabriel Dos Reis.
+-- Copyright (C) 2012-2013, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@ module utility (objectMember?, symbolMember?, stringMember?,
lastNode, append, append!, copyList, substitute, substitute!,
setDifference, setUnion, setIntersection,
symbolAssoc, applySubst, applySubst!, applySubstNQ, objectAssoc,
+ invertSubst,
remove, removeSymbol, atomic?, every?, any?, take, takeWhile, drop,
copyTree, finishLine, stringPrefix?, stringSuffix?,
findChar, charPosition) where
@@ -281,6 +282,9 @@ applySubstNQ(sl,t) ==
symbol? t and (p := symbolAssoc(t,sl)) => rest p
t
+invertSubst sl ==
+ [[rest x,:first x] for x in sl]
+
--% set operations
setDifference(x,y) ==
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