150 lines
24 KiB
HTML
150 lines
24 KiB
HTML
<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>CLHS: Standard Generic Function MAKE-LOAD-FORM</TITLE>
|
|
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
|
|
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
|
|
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
|
|
<LINK REL=TOP HREF="../Front/index.htm">
|
|
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
|
|
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
|
|
<LINK REL=PREV HREF="f_mk_i_1.htm">
|
|
<LINK REL=UP HREF="c_object.htm">
|
|
<LINK REL=NEXT HREF="f_mk_l_1.htm">
|
|
</HEAD>
|
|
<BODY>
|
|
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="f_mk_i_1.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="c_object.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="f_mk_l_1.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
<A NAME="make-load-form"><I>Standard Generic Function</I> <B>MAKE-LOAD-FORM</B></A> <P>
|
|
<P><B>Syntax:</B><P>
|
|
<P>
|
|
|
|
<B>make-load-form</B> <I>object <TT>&optional</TT> environment</I> => <I>creation-form[, initialization-form]</I><P>
|
|
<P>
|
|
<P><B>Method Signatures:</B><P>
|
|
<P>
|
|
|
|
<B>make-load-form</B> <I>(<I>object</I><B> <A REL=DEFINITION HREF="t_std_ob.htm#standard-object">standard-object</A></B>) <TT>&optional</TT> environment</I><P>
|
|
|
|
<B>make-load-form</B> <I>(<I>object</I><B> <A REL=DEFINITION HREF="t_stu_ob.htm#structure-object">structure-object</A></B>) <TT>&optional</TT> environment</I><P>
|
|
|
|
<B>make-load-form</B> <I>(<I>object</I><B> <A REL=DEFINITION HREF="e_cnd.htm#condition">condition</A></B>) <TT>&optional</TT> environment</I><P>
|
|
|
|
<B>make-load-form</B> <I>(<I>object</I><B> <A REL=DEFINITION HREF="t_class.htm#class">class</A></B>) <TT>&optional</TT> environment</I><P>
|
|
<P>
|
|
<P><B>Arguments and Values:</B><P>
|
|
<P>
|
|
<I>object</I>---an <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A>. <P>
|
|
<I>environment</I>---an <A REL=DEFINITION HREF="26_glo_e.htm#environment_object"><I>environment object</I></A>. <P>
|
|
<I>creation-form</I>---a <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A>. <P>
|
|
<I>initialization-form</I>---a <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A>. <P>
|
|
<P><B>Description:</B><P>
|
|
<P>
|
|
The <A REL=DEFINITION HREF="26_glo_g.htm#generic_function"><I>generic function</I></A> <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> creates and returns one or two <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>forms</I></A>, a <I>creation-form</I> and an <I>initialization-form</I>, that enable <A REL=DEFINITION HREF="f_load.htm#load"><B>load</B></A> to construct an <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> equivalent to <I>object</I>. <I>Environment</I> is an <A REL=DEFINITION HREF="26_glo_e.htm#environment_object"><I>environment object</I></A> corresponding to the <A REL=DEFINITION HREF="26_glo_l.htm#lexical_environment"><I>lexical environment</I></A> in which the <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>forms</I></A> will be processed. <P>
|
|
The <A REL=DEFINITION HREF="26_glo_f.htm#file_compiler"><I>file compiler</I></A> calls <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> to process certain <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>classes</I></A> of <A REL=DEFINITION HREF="26_glo_l.htm#literal"><I>literal</I></A> <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A>; see <A REL=CHILD HREF="03_bdd.htm">Section 3.2.4.4 (Additional Constraints on Externalizable Objects)</A>. <P>
|
|
<A REL=DEFINITION HREF="26_glo_c.htm#conforming_program"><I>Conforming programs</I></A> may call <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> directly, providing <I>object</I> is a <A REL=DEFINITION HREF="26_glo_g.htm#generalized_instance"><I>generalized instance</I></A> of <A REL=DEFINITION HREF="t_std_ob.htm#standard-object"><B>standard-object</B></A>, <A REL=DEFINITION HREF="t_stu_ob.htm#structure-object"><B>structure-object</B></A>, or <A REL=DEFINITION HREF="e_cnd.htm#condition"><B>condition</B></A>. <P>
|
|
The creation form is a <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A> that, when evaluated at <A REL=DEFINITION HREF="f_load.htm#load"><B>load</B></A> time, should return an <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> that is equivalent to <I>object</I>. The exact meaning of equivalent depends on the <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> of <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> and is up to the programmer who defines a <A REL=DEFINITION HREF="26_glo_m.htm#method"><I>method</I></A> for <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A>; see <A REL=CHILD HREF="03_bd.htm">Section 3.2.4 (Literal Objects in Compiled Files)</A>. <P>
|
|
The initialization form is a <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A> that, when evaluated at <A REL=DEFINITION HREF="f_load.htm#load"><B>load</B></A> time, should perform further initialization of the <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A>. The value returned by the initialization form is ignored. If <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> returns only one value, the initialization form is <A REL=DEFINITION HREF="a_nil.htm#nil"><B>nil</B></A>, which has no effect. If <I>object</I> appears as a constant in the initialization form, at <A REL=DEFINITION HREF="f_load.htm#load"><B>load</B></A> time it will be replaced by the equivalent <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> constructed by the creation form; this is how the further initialization gains access to the <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A>. <P>
|
|
Both the <I>creation-form</I> and the <I>initialization-form</I> may contain references to any <A REL=DEFINITION HREF="26_glo_e.htm#externalizable_object"><I>externalizable object</I></A>. However, there must not be any circular dependencies in creation forms. An example of a circular dependency is when the creation form for the object <TT>X</TT> contains a reference to the object <TT>Y</TT>, and the creation form for the object <TT>Y</TT> contains a reference to the object <TT>X</TT>. Initialization forms are not subject to any restriction against circular dependencies, which is the reason that initialization forms exist; see the example of circular data structures below. <P>
|
|
The creation form for an <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> is always <I>evaluated</I> before the initialization form for that <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A>. When either the creation form or the initialization form references other <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> that have not been referenced earlier in the <A REL=DEFINITION HREF="26_glo_f.htm#file"><I>file</I></A> being <I>compiled</I>, the <A REL=DEFINITION HREF="26_glo_c.htm#compiler"><I>compiler</I></A> ensures that all of the referenced <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> have been created before <I>evaluating</I> the referencing <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A>. When the referenced <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> is of a <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> which the <A REL=DEFINITION HREF="26_glo_f.htm#file_compiler"><I>file compiler</I></A> processes using <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A>, this involves <I>evaluating</I> the creation form returned for it. (This is the reason for the prohibition against circular references among creation forms). <P>
|
|
Each initialization form is <I>evaluated</I> as soon as possible after its associated creation form, as determined by data flow. If the initialization form for an <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> does not reference any other <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> not referenced earlier in the <A REL=DEFINITION HREF="26_glo_f.htm#file"><I>file</I></A> and processed by the <A REL=DEFINITION HREF="26_glo_f.htm#file_compiler"><I>file compiler</I></A> using <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A>, the initialization form is evaluated immediately after the creation form. If a creation or initialization form F does contain references to such <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A>, the creation forms for those other objects are evaluated before F, and the initialization forms for those other <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> are also evaluated before F whenever they do not depend on the <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> created or initialized by F. Where these rules do not uniquely determine an order of <A REL=DEFINITION HREF="26_glo_e.htm#evaluation"><I>evaluation</I></A> between two creation/initialization forms, the order of <A REL=DEFINITION HREF="26_glo_e.htm#evaluation"><I>evaluation</I></A> is unspecified. <P>
|
|
While these creation and initialization forms are being evaluated, the <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> are possibly in an uninitialized state, analogous to the state of an <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> between the time it has been created by <A REL=DEFINITION HREF="f_alloca.htm#allocate-instance"><B>allocate-instance</B></A> and it has been processed fully by <A REL=DEFINITION HREF="f_init_i.htm#initialize-instance"><B>initialize-instance</B></A>. Programmers writing <A REL=DEFINITION HREF="26_glo_m.htm#method"><I>methods</I></A> for <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> must take care in manipulating <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> not to depend on <A REL=DEFINITION HREF="26_glo_s.htm#slot"><I>slots</I></A> that have not yet been initialized. <P>
|
|
It is <A REL=DEFINITION HREF="26_glo_i.htm#implementation-dependent"><I>implementation-dependent</I></A> whether <A REL=DEFINITION HREF="f_load.htm#load"><B>load</B></A> calls <A REL=DEFINITION HREF="f_eval.htm#eval"><B>eval</B></A> on the <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>forms</I></A> or does some other operation that has an equivalent effect. For example, the <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>forms</I></A> might be translated into different but equivalent <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>forms</I></A> and then evaluated, they might be compiled and the resulting functions called by <A REL=DEFINITION HREF="f_load.htm#load"><B>load</B></A>, or they might be interpreted by a special-purpose function different from <A REL=DEFINITION HREF="f_eval.htm#eval"><B>eval</B></A>. All that is required is that the effect be equivalent to evaluating the <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>forms</I></A>. <P>
|
|
The <A REL=DEFINITION HREF="26_glo_m.htm#method"><I>method</I></A> <A REL=DEFINITION HREF="26_glo_s.htm#specialized"><I>specialized</I></A> on <A REL=DEFINITION HREF="t_class.htm#class"><B>class</B></A> returns a creation <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A> using the <A REL=DEFINITION HREF="26_glo_n.htm#name"><I>name</I></A> of the <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>class</I></A> if the <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>class</I></A> has a <A REL=DEFINITION HREF="26_glo_p.htm#proper_name"><I>proper name</I></A> in <I>environment</I>, signaling an error of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="e_error.htm#error"><B>error</B></A> if it does not have a <A REL=DEFINITION HREF="26_glo_p.htm#proper_name"><I>proper name</I></A>. <A REL=DEFINITION HREF="26_glo_e.htm#evaluation"><I>Evaluation</I></A> of the creation <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A> uses the <A REL=DEFINITION HREF="26_glo_n.htm#name"><I>name</I></A> to find the <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>class</I></A> with that <A REL=DEFINITION HREF="26_glo_n.htm#name"><I>name</I></A>, as if by <I>calling</I> <A REL=DEFINITION HREF="f_find_c.htm#find-class"><B>find-class</B></A>. If a <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>class</I></A> with that <A REL=DEFINITION HREF="26_glo_n.htm#name"><I>name</I></A> has not been defined, then a <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>class</I></A> may be computed in an <A REL=DEFINITION HREF="26_glo_i.htm#implementation-defined"><I>implementation-defined</I></A> manner. If a <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>class</I></A> cannot be returned as the result of <I>evaluating</I> the creation <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>form</I></A>, then an error of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="e_error.htm#error"><B>error</B></A> is signaled. <P>
|
|
Both <A REL=DEFINITION HREF="26_glo_c.htm#conforming_implementation"><I>conforming implementations</I></A> and <A REL=DEFINITION HREF="26_glo_c.htm#conforming_program"><I>conforming programs</I></A> may further <A REL=DEFINITION HREF="26_glo_s.htm#specialize"><I>specialize</I></A> <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A>. <P>
|
|
<P><B>Examples:</B><P>
|
|
<P>
|
|
<PRE>
|
|
(defclass obj ()
|
|
((x :initarg :x :reader obj-x)
|
|
(y :initarg :y :reader obj-y)
|
|
(dist :accessor obj-dist)))
|
|
=> #<STANDARD-CLASS OBJ 250020030>
|
|
(defmethod shared-initialize :after ((self obj) slot-names &rest keys)
|
|
(declare (ignore slot-names keys))
|
|
(unless (slot-boundp self 'dist)
|
|
(setf (obj-dist self)
|
|
(sqrt (+ (expt (obj-x self) 2) (expt (obj-y self) 2))))))
|
|
=> #<STANDARD-METHOD SHARED-INITIALIZE (:AFTER) (OBJ T) 26266714>
|
|
(defmethod make-load-form ((self obj) &optional environment)
|
|
(declare (ignore environment))
|
|
;; Note that this definition only works because X and Y do not
|
|
;; contain information which refers back to the object itself.
|
|
;; For a more general solution to this problem, see revised example below.
|
|
`(make-instance ',(class-of self)
|
|
:x ',(obj-x self) :y ',(obj-y self)))
|
|
=> #<STANDARD-METHOD MAKE-LOAD-FORM (OBJ) 26267532>
|
|
(setq obj1 (make-instance 'obj :x 3.0 :y 4.0)) => #<OBJ 26274136>
|
|
(obj-dist obj1) => 5.0
|
|
(make-load-form obj1) => (MAKE-INSTANCE 'OBJ :X '3.0 :Y '4.0)
|
|
</PRE>
|
|
</TT> <P>
|
|
In the above example, an equivalent <A REL=DEFINITION HREF="26_glo_i.htm#instance"><I>instance</I></A> of <TT>obj</TT> is reconstructed by using the values of two of its <A REL=DEFINITION HREF="26_glo_s.htm#slot"><I>slots</I></A>. The value of the third <A REL=DEFINITION HREF="26_glo_s.htm#slot"><I>slot</I></A> is derived from those two values. <P>
|
|
Another way to write the <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> <A REL=DEFINITION HREF="26_glo_m.htm#method"><I>method</I></A> in that example is to use <A REL=DEFINITION HREF="f_mk_l_1.htm#make-load-form-saving-slots"><B>make-load-form-saving-slots</B></A>. The code it generates might yield a slightly different result from the <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> <A REL=DEFINITION HREF="26_glo_m.htm#method"><I>method</I></A> shown above, but the operational effect will be the same. For example: <P>
|
|
<PRE>
|
|
;; Redefine method defined above.
|
|
(defmethod make-load-form ((self obj) &optional environment)
|
|
(make-load-form-saving-slots self
|
|
:slot-names '(x y)
|
|
:environment environment))
|
|
=> #<STANDARD-METHOD MAKE-LOAD-FORM (OBJ) 42755655>
|
|
;; Try MAKE-LOAD-FORM on object created above.
|
|
(make-load-form obj1)
|
|
=> (ALLOCATE-INSTANCE '#<STANDARD-CLASS OBJ 250020030>),
|
|
(PROGN
|
|
(SETF (SLOT-VALUE '#<OBJ 26274136> 'X) '3.0)
|
|
(SETF (SLOT-VALUE '#<OBJ 26274136> 'Y) '4.0)
|
|
(INITIALIZE-INSTANCE '#<OBJ 26274136>))
|
|
</PRE>
|
|
</TT> <P>
|
|
In the following example, <A REL=DEFINITION HREF="26_glo_i.htm#instance"><I>instances</I></A> of <TT>my-frob</TT> are ``interned'' in some way. An equivalent <A REL=DEFINITION HREF="26_glo_i.htm#instance"><I>instance</I></A> is reconstructed by using the value of the name slot as a key for searching existing <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A>. In this case the programmer has chosen to create a new <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> if no existing <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> is found; alternatively an error could have been signaled in that case. <P>
|
|
<PRE>
|
|
(defclass my-frob ()
|
|
((name :initarg :name :reader my-name)))
|
|
(defmethod make-load-form ((self my-frob) &optional environment)
|
|
(declare (ignore environment))
|
|
`(find-my-frob ',(my-name self) :if-does-not-exist :create))
|
|
</PRE>
|
|
</TT> <P>
|
|
In the following example, the data structure to be dumped is circular, because each parent has a list of its children and each child has a reference back to its parent. If <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> is called on one <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> in such a structure, the creation form creates an equivalent <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> and fills in the children slot, which forces creation of equivalent <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> for all of its children, grandchildren, etc. At this point none of the parent <A REL=DEFINITION HREF="26_glo_s.htm#slot"><I>slots</I></A> have been filled in. The initialization form fills in the parent <A REL=DEFINITION HREF="26_glo_s.htm#slot"><I>slot</I></A>, which forces creation of an equivalent <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> for the parent if it was not already created. Thus the entire tree is recreated at <A REL=DEFINITION HREF="f_load.htm#load"><B>load</B></A> time. At compile time, <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> is called once for each <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> in the tree. All of the creation forms are evaluated, in <A REL=DEFINITION HREF="26_glo_i.htm#implementation-dependent"><I>implementation-dependent</I></A> order, and then all of the initialization forms are evaluated, also in <A REL=DEFINITION HREF="26_glo_i.htm#implementation-dependent"><I>implementation-dependent</I></A> order. <P>
|
|
<PRE>
|
|
(defclass tree-with-parent () ((parent :accessor tree-parent)
|
|
(children :initarg :children)))
|
|
(defmethod make-load-form ((x tree-with-parent) &optional environment)
|
|
(declare (ignore environment))
|
|
(values
|
|
;; creation form
|
|
`(make-instance ',(class-of x) :children ',(slot-value x 'children))
|
|
;; initialization form
|
|
`(setf (tree-parent ',x) ',(slot-value x 'parent))))
|
|
</PRE>
|
|
</TT> <P>
|
|
In the following example, the data structure to be dumped has no special properties and an equivalent structure can be reconstructed simply by reconstructing the <A REL=DEFINITION HREF="26_glo_s.htm#slot"><I>slots</I></A>' contents. <P>
|
|
<PRE>
|
|
(defstruct my-struct a b c)
|
|
(defmethod make-load-form ((s my-struct) &optional environment)
|
|
(make-load-form-saving-slots s :environment environment))
|
|
</PRE>
|
|
</TT> <P>
|
|
<P><B>Affected By:</B> None.
|
|
<P>
|
|
<P><B>Exceptional Situations:</B><P>
|
|
<P>
|
|
The <A REL=DEFINITION HREF="26_glo_m.htm#method"><I>methods</I></A> <A REL=DEFINITION HREF="26_glo_s.htm#specialized"><I>specialized</I></A> on <A REL=DEFINITION HREF="t_std_ob.htm#standard-object"><B>standard-object</B></A>, <A REL=DEFINITION HREF="t_stu_ob.htm#structure-object"><B>structure-object</B></A>, and <A REL=DEFINITION HREF="e_cnd.htm#condition"><B>condition</B></A> all signal an error of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="e_error.htm#error"><B>error</B></A>. <P>
|
|
It is <A REL=DEFINITION HREF="26_glo_i.htm#implementation-dependent"><I>implementation-dependent</I></A> whether <I>calling</I> <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> on a <A REL=DEFINITION HREF="26_glo_g.htm#generalized_instance"><I>generalized instance</I></A> of a <A REL=DEFINITION HREF="26_glo_s.htm#system_class"><I>system class</I></A> signals an error or returns creation and initialization <A REL=DEFINITION HREF="26_glo_f.htm#form"><I>forms</I></A>. <P>
|
|
<P><B>See Also:</B><P>
|
|
<P>
|
|
<A REL=DEFINITION HREF="f_cmp_fi.htm#compile-file"><B>compile-file</B></A>, <A REL=DEFINITION HREF="f_mk_l_1.htm#make-load-form-saving-slots"><B>make-load-form-saving-slots</B></A>, <A REL=CHILD HREF="03_bdd.htm">Section 3.2.4.4 (Additional Constraints on Externalizable Objects)</A> <A REL=CHILD HREF="03_a.htm">Section 3.1 (Evaluation)</A>, <A REL=CHILD HREF="03_b.htm">Section 3.2 (Compilation)</A> <P>
|
|
<P><B>Notes:</B><P>
|
|
<P>
|
|
The <A REL=DEFINITION HREF="26_glo_f.htm#file_compiler"><I>file compiler</I></A> calls <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A> in specific circumstances detailed in <A REL=CHILD HREF="03_bdd.htm">Section 3.2.4.4 (Additional Constraints on Externalizable Objects)</A>. <P>
|
|
Some <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementations</I></A> may provide facilities for defining new <A REL=DEFINITION HREF="26_glo_s.htm#subclass"><I>subclasses</I></A> of <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>classes</I></A> which are specified as <A REL=DEFINITION HREF="26_glo_s.htm#system_class"><I>system classes</I></A>. (Some likely candidates include <A REL=DEFINITION HREF="t_generi.htm#generic-function"><B>generic-function</B></A>, <A REL=DEFINITION HREF="t_method.htm#method"><B>method</B></A>, and <A REL=DEFINITION HREF="t_stream.htm#stream"><B>stream</B></A>). Such <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementations</I></A> should document how the <A REL=DEFINITION HREF="26_glo_f.htm#file_compiler"><I>file compiler</I></A> processes <A REL=DEFINITION HREF="26_glo_i.htm#instance"><I>instances</I></A> of such <A REL=DEFINITION HREF="26_glo_c.htm#class"><I>classes</I></A> when encountered as <A REL=DEFINITION HREF="26_glo_l.htm#literal"><I>literal</I></A> <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A>, and should document any relevant <A REL=DEFINITION HREF="26_glo_m.htm#method"><I>methods</I></A> for <A REL=DEFINITION HREF="#make-load-form"><B>make-load-form</B></A>. <P>
|
|
<P><HR>The following <A REL=META HREF="../Front/X3J13Iss.htm">X3J13 cleanup issues</A>, <I>not part of the specification</I>, apply to this section:<P><UL><LI> <A REL=CHILD HREF="../Issues/iss215.htm">LOAD-OBJECTS:MAKE-LOAD-FORM</A><LI> <A REL=CHILD HREF="../Issues/iss236.htm">MAKE-LOAD-FORM-CONFUSION:REWRITE</A><P></UL><HR>
|
|
|
|
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
|
|
|
|
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
|
|
</BODY>
|
|
</HTML>
|