From c7b9e795a73b25b3c81ecb1c8c69b8f0f944a064 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 10 Mar 2002 21:48:50 +0000 Subject: [PATCH] r1543: *** empty log message *** --- ChangeLog | 6 +++ Makefile | 4 +- doc/notes.sgml | 77 ++++++++++++++++++++++++++++ doc/ref.sgml | 4 +- doc/uffi.sgml | 2 + src/{immediates.cl => primitives.cl} | 4 +- uffi.system | 17 +++--- 7 files changed, 100 insertions(+), 14 deletions(-) create mode 100644 doc/notes.sgml rename src/{immediates.cl => primitives.cl} (98%) diff --git a/ChangeLog b/ChangeLog index ab61ff2..a64577b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +10 Mar 2002 + + * Modified input parameters to load-foreign-library + + * Added to documention + 9 Mar 2002 * Added to documentation diff --git a/Makefile b/Makefile index 57056c3..51dd113 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # Programer: Kevin M. Rosenberg, M.D. # Date Started: Mar 2002 # -# CVS Id: $Id: Makefile,v 1.9 2002/03/10 11:14:39 kevin Exp $ +# CVS Id: $Id: Makefile,v 1.10 2002/03/10 21:48:50 kevin Exp $ # # Copyright (c) 2002 by Kevin M. Rosenberg # @@ -41,7 +41,7 @@ realclean: clean docs: @(cd doc; make dist-doc) -VERSION=0.2.1 +VERSION=0.2.2 DISTDIR=uffi-${VERSION} DIST_TARBALL=${DISTDIR}.tar.gz DIST_ZIP=${DISTDIR}.zip diff --git a/doc/notes.sgml b/doc/notes.sgml new file mode 100644 index 0000000..8dfb3e5 --- /dev/null +++ b/doc/notes.sgml @@ -0,0 +1,77 @@ + + + + Programming Notes + + + Implementation Specific Notes + + + + &acl; + + + + + &lw; + + + + + &cmucl; + + + + + + + Foreign Object Representation and Access + There are two main approaches used to represent foreign + objects: an integer that represents an address in memory, and a + object that also includes run-time typing. The advantage of + run-time typing is the system can dereference pointers and perform + array access without those functions requiring a type at the cost + of additional overhead to generate and store the run-time + typing. The advantage of integer representation, at least for + &acl;, is that the compiler can generate inline code to + dereference pointers. Further, the overhead of the run-time type + information is eliminated. The disadvantage is the program must + then supply + the type to the functions to dereference objects and array. + + + + + Optimizing Code Using UFFI + + Background + + Two implementions have different techniques to optimize + (open-code) foreign objects. &acl; can open-code foreign + object + access if pointers are integers and the type of object is + specified in the access function. Thus, &uffi; represents objects + in &acl; as integers which don't have type information. + + &cmucl; works best when keeping objects as typed + objects. However, it's compiler can open-code object access when + the object type is specified in declare + commands and in :type specifiers in + defstruct and defclass. + &lw;, in converse to &acl; and &cmucl; does not do + any open coding of object access. &lw;, by default, maintains + objects with run-time typing. + + + Cross-Implementation Optimization +To fully optimize across platforms, both explicit type information +must be passed to dereferencing of pointers and arrays. Though this +optimization only helps with &acl;, &uffi; is designed to require this +type information be passed the dereference functions. Second, declarations +of type should be made in functions, structures, and classes where +foreign objects will be help. This will optimize access for &lw; + + + + + diff --git a/doc/ref.sgml b/doc/ref.sgml index 93a63f1..2935dcf 100644 --- a/doc/ref.sgml +++ b/doc/ref.sgml @@ -61,11 +61,11 @@ - Immediate Types + Primitive Types Overview - Immediate types have a single value, these include + Primitive types have a single value, these include characters, numbers, and pointers. They are all symbols in the keyword package. diff --git a/doc/uffi.sgml b/doc/uffi.sgml index 50374f4..8a3419e 100644 --- a/doc/uffi.sgml +++ b/doc/uffi.sgml @@ -13,11 +13,13 @@ defsystem"> + ]> &bookinfo; &intro; +¬es; &ref; diff --git a/src/immediates.cl b/src/primitives.cl similarity index 98% rename from src/immediates.cl rename to src/primitives.cl index 4dcfec6..c5c6450 100644 --- a/src/immediates.cl +++ b/src/primitives.cl @@ -2,14 +2,14 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: immediates.cl +;;;; Name: primitives.cl ;;;; Purpose: UFFI source to handle immediate types ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; ;;;; Copyright (c) 2002 Kevin M. Rosenberg ;;;; -;;;; $Id: immediates.cl,v 1.4 2002/03/10 17:42:35 kevin Exp $ +;;;; $Id: primitives.cl,v 1.1 2002/03/10 21:48:50 kevin Exp $ ;;;; ;;;; This file is part of the UFFI. ;;;; diff --git a/uffi.system b/uffi.system index 020d8c0..312f9be 100644 --- a/uffi.system +++ b/uffi.system @@ -9,7 +9,7 @@ ;;;; ;;;; Copyright (c) 2002 Kevin M. Rosenberg ;;;; -;;;; $Id: uffi.system,v 1.2 2002/03/09 21:53:58 kevin Exp $ +;;;; $Id: uffi.system,v 1.3 2002/03/10 21:48:50 kevin Exp $ ;;;; ;;;; This file is part of UFFI. ;;;; @@ -78,13 +78,14 @@ :binary-pathname "UFFI:src;bin;" :components ((:file "package") - (:file "immediates" :depends-on ("package")) - (:file "strings" :depends-on ("immediates")) - (:file "objects" :depends-on ("immediates")) - (:file "aggregates" :depends-on ("immediates")) - (:file "functions" :depends-on ("immediates")) - (:file "libraries" :depends-on ("package"))) - ) + (:file "primitives" :depends-on ("package")) + (:file "strings" :depends-on ("primitives")) + (:file "objects" :depends-on ("primitives")) + (:file "aggregates" :depends-on ("primitives")) + (:file "functions" :depends-on ("primitives")) + (:file "libraries" :depends-on ("package")))) + + -- 2.34.1