aboutsummaryrefslogtreecommitdiff
path: root/src/testsuite
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-11-11 05:53:12 +0000
committerdos-reis <gdr@axiomatics.org>2011-11-11 05:53:12 +0000
commit218672555b561f73b25f07168d16b24c56a494d4 (patch)
tree338b08b7e17b286e194242949b74bdfa0595eb4d /src/testsuite
parentecd77af5ce74ac002bd6550bed79eae5a3704c35 (diff)
downloadopen-axiom-218672555b561f73b25f07168d16b24c56a494d4.tar.gz
* interp/compiler.boot (applyMapping): Emit special call for
domain producing mapping variables. (compWithMappingMode): Coerce constructors to function objets. (compFormWithModemap): Constructor calls are direct calls. Everything else is ordinary indirect call. * interp/g-opt.boot (optCall): Handle function objects. * interp/nruncomp.boot (NRTencode): Encode the elaboration of atomic forms, not the source level form. * testsuite/compiler/ctor-mapping.spad: New.
Diffstat (limited to 'src/testsuite')
-rw-r--r--src/testsuite/compiler/ctor-mapping.spad17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testsuite/compiler/ctor-mapping.spad b/src/testsuite/compiler/ctor-mapping.spad
new file mode 100644
index 00000000..4f7a58d2
--- /dev/null
+++ b/src/testsuite/compiler/ctor-mapping.spad
@@ -0,0 +1,17 @@
+++ Contributed by Gabriel Dos Reis; November 2011.
+++ Test conversion of constructors to function objects and
+++ elaboration of domain producting function parameters.
+
+)abbrev package BAR Bar
+Bar(F: Type -> Type): Public == Private where
+ Public == Type with
+ bar: () -> Type
+ Private == add
+ bar() == F Integer
+
+
+)abbrev package FOO Foo
+Foo(): Type with
+ foo: () -> Type
+ == add
+ foo() == bar()$Bar(List)