diff --git a/system/BLOCKLOOKUP.DFASL b/system/BLOCKLOOKUP.DFASL index 7167867..e5abfcd 100644 Binary files a/system/BLOCKLOOKUP.DFASL and b/system/BLOCKLOOKUP.DFASL differ diff --git a/system/INSPECT-PATCH.DFASL b/system/INSPECT-PATCH.DFASL index 81bd7c0..91b4a74 100644 Binary files a/system/INSPECT-PATCH.DFASL and b/system/INSPECT-PATCH.DFASL differ diff --git a/system/LOADLOOPS.DFASL b/system/LOADLOOPS.DFASL index 49570d1..9384aef 100644 Binary files a/system/LOADLOOPS.DFASL and b/system/LOADLOOPS.DFASL differ diff --git a/system/LOOPS-FILEPKG.DFASL b/system/LOOPS-FILEPKG.DFASL index c70160a..8ac431d 100644 Binary files a/system/LOOPS-FILEPKG.DFASL and b/system/LOOPS-FILEPKG.DFASL differ diff --git a/system/LOOPS-TTYEDIT.DFASL b/system/LOOPS-TTYEDIT.DFASL index 69710a5..af8e397 100644 Binary files a/system/LOOPS-TTYEDIT.DFASL and b/system/LOOPS-TTYEDIT.DFASL differ diff --git a/system/LOOPSACCESS.DFASL b/system/LOOPSACCESS.DFASL index 8b3d509..95a702e 100644 Binary files a/system/LOOPSACCESS.DFASL and b/system/LOOPSACCESS.DFASL differ diff --git a/system/LOOPSACTIVEVALUES.DFASL b/system/LOOPSACTIVEVALUES.DFASL index 77af932..37e7e7f 100644 Binary files a/system/LOOPSACTIVEVALUES.DFASL and b/system/LOOPSACTIVEVALUES.DFASL differ diff --git a/system/LOOPSBROWSE.DFASL b/system/LOOPSBROWSE.DFASL index caaf596..d59d154 100644 Binary files a/system/LOOPSBROWSE.DFASL and b/system/LOOPSBROWSE.DFASL differ diff --git a/system/LOOPSDATATYPES.DFASL b/system/LOOPSDATATYPES.DFASL index 683b731..c1074d3 100644 Binary files a/system/LOOPSDATATYPES.DFASL and b/system/LOOPSDATATYPES.DFASL differ diff --git a/system/LOOPSDEBUG.DFASL b/system/LOOPSDEBUG.DFASL index 5cc095c..78d2074 100644 Binary files a/system/LOOPSDEBUG.DFASL and b/system/LOOPSDEBUG.DFASL differ diff --git a/system/LOOPSEDIT.DFASL b/system/LOOPSEDIT.DFASL index 6c39da6..d113e28 100644 Binary files a/system/LOOPSEDIT.DFASL and b/system/LOOPSEDIT.DFASL differ diff --git a/system/LOOPSINSPECT.DFASL b/system/LOOPSINSPECT.DFASL index eead07f..5e50ec8 100644 Binary files a/system/LOOPSINSPECT.DFASL and b/system/LOOPSINSPECT.DFASL differ diff --git a/system/LOOPSKERNEL b/system/LOOPSKERNEL index d0d8138..1a0bbb9 100644 --- a/system/LOOPSKERNEL +++ b/system/LOOPSKERNEL @@ -1,13 +1,14 @@ -(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10) -(FILECREATED "15-Jun-93 12:34:16" {DSK}release>loops>2.0>src>LOOPSKERNEL.;3 139600 +(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) - changes to%: (METHODS Class.MakeEditSource) +(FILECREATED "19-Aug-2022 14:47:13" {DSK}larry>loops>system>LOOPSKERNEL.;2 137227 - previous date%: " 6-Nov-91 13:03:28" {DSK}release>loops>2.0>src>LOOPSKERNEL.;2) + :CHANGES-TO (VARS LOOPSKERNELCOMS) + + :PREVIOUS-DATE "15-Jun-93 12:34:16" {DSK}larry>loops>system>LOOPSKERNEL.;1) (* ; " -Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xerox Corporation. All rights reserved. +Copyright (c) 1983-1988, 1990-1991, 1993 by Venue & Xerox Corporation. ") (PRETTYCOMPRINT LOOPSKERNELCOMS) @@ -56,6 +57,7 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe Tofu.SuperMethodNotFound) (FNS MakeMethodMenu MethodMenuWhenSelectedFn SelectFile) (DECLARE%: EVAL@COMPILE DONTCOPY (EXPORT (MACROS \PutValueOnly)) + DONTEVAL@LOAD (FILES (LOADCOMP) LOOPSDATATYPES LOOPSACTIVEVALUES LOOPSMETHODS)) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA METHCOM) @@ -74,11 +76,11 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe (* ;;; "Functions called by kernel classses") -(RPAQQ KERNELFNS (AddCIV AddCV AddIV AllSubClasses ClassName CopyCVToIV CopyDeepDescr - CopyInstance CopyLoopsStruc DeleteIV DumpInstanceFacts EnsureFnLoaded - FixSelectorSpelling \LoopsFixSpell \LoopsDwim \FixSelectorSpelling - GetMethodObj GetMethodObj! IVSublis METHCOM MapIVs MapIVs! NewWithValues - OldClass SendMessageNotUnderstood SubsTree TypeInMethods WhoHas)) +(RPAQQ KERNELFNS (AddCIV AddCV AddIV AllSubClasses ClassName CopyCVToIV CopyDeepDescr CopyInstance + CopyLoopsStruc DeleteIV DumpInstanceFacts EnsureFnLoaded FixSelectorSpelling + \LoopsFixSpell \LoopsDwim \FixSelectorSpelling GetMethodObj GetMethodObj! + IVSublis METHCOM MapIVs MapIVs! NewWithValues OldClass + SendMessageNotUnderstood SubsTree TypeInMethods WhoHas)) (DEFINEQ (AddCIV @@ -630,17 +632,17 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe (* ;;; "The kenel classes themselves") -(RPAQQ KERNELCLASSES (AbstractClass Class DestroyedClass DestroyedObject MetaClass Method Object - Tofu)) +(RPAQQ KERNELCLASSES (AbstractClass Class DestroyedClass DestroyedObject MetaClass Method Object Tofu + )) (DEFCLASSES AbstractClass Class DestroyedClass DestroyedObject MetaClass Method Object Tofu) (DEFCLASS AbstractClass (MetaClass MetaClass doc (* * Abstract classes are placeholders in the inheritance network, which cannot - themselves be instantiated.) + themselves be instantiated.) - Edited%: (* mjs%: "30-JUN-82 16:41") + Edited%: (* mjs%: "30-JUN-82 16:41") ) (Supers MetaClass)) @@ -649,49 +651,49 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe (* * This is the default metaClass for all classes) - Edited%: (* smL "18-Sep-86 15:04") + Edited%: (* smL "18-Sep-86 15:04") ) (Supers Object)) (DEFCLASS DestroyedClass - (MetaClass AbstractClass Edited%:  (* kmk%: "13-Dec-84 15:46") - doc (* Becomes the class for any - destroyed class) + (MetaClass AbstractClass Edited%: (* kmk%: "13-Dec-84 15:46") + doc (* Becomes the class for any destroyed + class) ) (Supers AbstractClass)) (DEFCLASS DestroyedObject - (MetaClass Class Edited%:  (* TheCollaborators%: "15-Oct-84 16:23") + (MetaClass Class Edited%: (* TheCollaborators%: "15-Oct-84 16:23") ) (Supers Object)) (DEFCLASS MetaClass - (MetaClass MetaClass Edited%:  (* mjs%: "30-JUN-82 16:38")) + (MetaClass MetaClass Edited%: (* mjs%: "30-JUN-82 16:38")) (Supers Class)) (DEFCLASS Method (MetaClass Class doc (* Connects class to function - implementing method, plus properties) + implementing method, plus properties) Edited%: (* smL " 9-May-86 14:40") ) (Supers Object) (ClassVariables (ivProperties (doc args category) doc (* names of IVs which should be made - properties of the method) + properties of the method) )) - (InstanceVariables (className NIL doc (* name of class in which this - method appears)) + (InstanceVariables (className NIL doc (* name of class in which this method + appears)) (selector NIL doc (* An atom which is the selector for - the method;)) + the method;)) (method NIL doc (* Atom name of function which does the work other properties of this IV are - properties of the method) + properties of the method) ) (args NIL doc (* arguments of the method)) (doc NIL doc (* documentation of the method)) (category NIL doc (* if a LITATOM, a public method. - If a LIST, internal)))) + If a LIST, internal)))) (DEFCLASS Object (MetaClass Class doc (* Default behavior stored here.) @@ -701,7 +703,7 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe (DEFCLASS Tofu (MetaClass AbstractClass doc (* Minimum super for objects in - system.) + system.) Edited%: (* ; "Edited 30-Nov-87 09:24 by jrb:") ) (Supers)) @@ -1166,7 +1168,7 @@ the default datatype printing mechanism." (category (Tofu))) -(Method ((Class AllInstances) self) (* ; "smL 19-May-86 09:49") +(Method ((Class AllInstances) self) (* ; "smL 19-May-86 09:49") "Find all instances that you can. Used IndexedObject if possible" [COND ((_ self Subclass ($ IndexedObject)) @@ -1185,13 +1187,12 @@ the default datatype printing mechanism." (category (Tofu))) (OR (NULL includeCategories) (LISTP includeCategories) (ERROR "Not a list of categories:" includeCategories)) - (for sel in (OR okSelectors (_ self ListAttribute 'Selectors)) - bind (allCategories _ (COPY includeCategories)) + (for sel in (OR okSelectors (_ self ListAttribute 'Selectors)) bind (allCategories _ (COPY + includeCategories + )) do (for cat inside (@ (GetMethodObj! self sel) - category) when (NOT (MEMB cat allCategories)) - do (SETQ allCategories (NCONC1 allCategories cat))) finally (RETURN - allCategories - ))) + category) when (NOT (MEMB cat allCategories)) + do (SETQ allCategories (NCONC1 allCategories cat))) finally (RETURN allCategories))) (Method ((Class CVMissing) self object varName propName typeFlag newValue) (* ; "smL 21-Apr-86 10:32") @@ -1205,7 +1206,7 @@ the default datatype printing mechanism." (category (Tofu))) then NoValueFound else NotSetValue)) -(Method ((Class CategorizeMethods) self categorization) (* ; "smL 31-Oct-86 14:01") +(Method ((Class CategorizeMethods) self categorization) (* ; "smL 31-Oct-86 14:01") "Change the categorization according to the categorization argument, which must be in format: ((category (selectors ...)) ...) --- If this argument isn't provided, then prompt the user to EDIT a form in this syntax that represents the current categorization --- Note that a selector can be in more than one category" (* ;;; "") @@ -1217,15 +1218,13 @@ the default datatype printing mechanism." (category (Tofu))) (* ;; "") (if (NULL categorization) - then [SETQ categorization (for cat in (_ self AllMethodCategories - '(Any Public Internal)) - bind (selectors _ (_ self ListAttribute 'Selectors)) - collect (LIST cat (_ self SelectorsInCategories cat - selectors)] - (EDITE categorization)) (* ; "Strip out any pseudo-categories") + then [SETQ categorization (for cat in (_ self AllMethodCategories '(Any Public Internal)) + bind (selectors _ (_ self ListAttribute 'Selectors)) + collect (LIST cat (_ self SelectorsInCategories cat selectors)] + (EDITE categorization)) (* ; "Strip out any pseudo-categories") (SETQ categorization (for cat-descr in categorization when [NOT (MEMB (CAR cat-descr) - '(Any Public] collect cat-descr)) + '(Any Public] collect cat-descr)) (* ;; "") @@ -1233,11 +1232,10 @@ the default datatype printing mechanism." (category (Tofu))) (* ;; "") - [for sel in (_ self ListAttribute 'Selectors) - when (for each in categorization thereis (MEMB sel (CADR each))) + [for sel in (_ self ListAttribute 'Selectors) when (for each in categorization + thereis (MEMB sel (CADR each))) do (_ self ChangeMethodCategory sel (for each in categorization - when (MEMB sel (CADR each)) - collect (CAR each)))]) + when (MEMB sel (CADR each)) collect (CAR each)))]) (Method ((Class ChangeMethodCategory) self selector newCategory) (* ; "smL 21-Aug-86 15:11") @@ -1246,39 +1244,36 @@ the default datatype printing mechanism." (category (Tofu))) self)))] (if (AND selector (GetMethodObj self selector)) then [SETQ newCategory - (OR newCategory - (LET [(choice (MENU (create MENU - ITEMS _ (CONS '*other* - (for cat - in (SORT (_ self - AllMethodCategories) - ) - collect (LIST cat))) - CENTERFLG _ T - TITLE _ "New method category"] - (if (EQ choice '*other*) - then (PromptRead "New Category: " PROMPTWINDOW) - else (CAR choice] - (if newCategory - then (COND - ((LISTP newCategory) (* ; "Lists replace old categories") - - (* ;; "Categories can only be atoms") - - (if (for c in newCategory thereis (NOT (CL:SYMBOLP - c))) - then (ERROR "Non-symbol in Category list") - else (change (@ (GetMethodObj self selector) - category) - newCategory))) - ((CL:SYMBOLP newCategory) (* ; "Atoms are added") - (push (@ (GetMethodObj self selector) + (OR newCategory + (LET [(choice (MENU (create MENU + ITEMS _ (CONS '*other* + (for cat + in (SORT (_ self AllMethodCategories)) + collect (LIST cat))) + CENTERFLG _ T + TITLE _ "New method category"] + (if (EQ choice '*other*) + then (PromptRead "New Category: " PROMPTWINDOW) + else (CAR choice] + (if newCategory + then (COND + ((LISTP newCategory) (* ; "Lists replace old categories") + + (* ;; "Categories can only be atoms") + + (if (for c in newCategory thereis (NOT (CL:SYMBOLP c))) + then (ERROR "Non-symbol in Category list") + else (change (@ (GetMethodObj self selector) category) - newCategory)) - (T (ERROR "Non-symbol in Category list"))) - (_ (GetMethodObj self selector) - ObjectModified) - newCategory))) + newCategory))) + ((CL:SYMBOLP newCategory) (* ; "Atoms are added") + (push (@ (GetMethodObj self selector) + category) + newCategory)) + (T (ERROR "Non-symbol in Category list"))) + (_ (GetMethodObj self selector) + ObjectModified) + newCategory))) (Method ((Class CreateInstance) self oldObject oldInstanceFlg) (* ; "dgb: 13-OCT-83 22:06") @@ -1298,16 +1293,16 @@ it blank . If oldInstanceFlg=T, then it does not mark the object as modified." (RETURN (PROMPTPRINT "No method defined."))) (RETURN (DefineMethod self selector args exp file methodType)))) -(Method ((Class DelFromFile) self) (* ; "smL 8-Apr-87 13:05") +(Method ((Class DelFromFile) self) (* ; "smL 8-Apr-87 13:05") "Delete a class from a file" (LET [(files (WHEREIS (ClassName self) 'CLASSES] (if files then (DELFROMFILES (ClassName self) - 'CLASSES files) + 'CLASSES files) else T))) -(Method ((Class EM!) self selector) (* ; "smL 15-Jan-87 16:55") +(Method ((Class EM!) self selector) (* ; "smL 15-Jan-87 16:55") "Edit in place, make local or specialize method" (PROG (items classForMethod) (OR selector (SETQ selector (_ self PickSelector (CONCAT "EM!: " (ClassName self)) @@ -1340,7 +1335,7 @@ it blank . If oldInstanceFlg=T, then it does not mark the object as modified." (RETURN NIL] (RETURN (_ classForMethod EditMethod selector)))) -(Method ((Class Edit) self commands) (* ; "smL 13-May-86 13:14") +(Method ((Class Edit) self commands) (* ; "smL 13-May-86 13:14") "Use Interlisp editor on source of class" [PROG (editResult (editSource (_ self MakeEditSource))) LP [SETQ editResult (NLSETQ (EDITE editSource commands (ClassName self) @@ -1354,7 +1349,7 @@ it blank . If oldInstanceFlg=T, then it does not mark the object as modified." (GO LP))) (RETURN (SETQ LASTCLASS (ClassName self]) -(Method ((Class Edit!) self commands) (* ; "dgb: 31-OCT-83 09:11") +(Method ((Class Edit!) self commands) (* ; "dgb: 31-OCT-83 09:11") "Use Interlisp editor on source of class including inherited values" [PROG ((editSource (_ self MakeFullEditSource))) LP (COND @@ -1374,39 +1369,35 @@ it blank . If oldInstanceFlg=T, then it does not mark the object as modified." then NIL elseif (NULL method) then (LET [(allSelectors (_ self ListAttribute! 'Selectors)] - (if (MEMB selector allSelectors) - then (* The method is an inherited one) - (if (EQ 'Y (ASKUSER NIL NIL (CONCAT selector - " is not a local method of " - self + (if (MEMB selector allSelectors) + then (* The method is an inherited one) + (if (EQ 'Y (ASKUSER NIL NIL (CONCAT selector " is not a local method of " + self ". Should I make it local for editing? " - ))) - then (SETQ method (_ self MakeLocalMethod selector))) - else (LET* [(containingForm (if (AND (BOUNDP '\SendForm) - (EQ \Obj self) - (EQ selector 'EditMethod)) - then \SendForm)) - (correctedSelector - (\LoopsFixSpell selector allSelectors - (CONS '_ containingForm) - (if (EQ 'QUOTE (CAR (CADDR containingForm))) - then (CDR (CADDR containingForm] - (if correctedSelector - then (SETQ selector correctedSelector) - (SETQ method (OR (FindLocalMethod self - correctedSelector) - (_ self MakeLocalMethod - correctedSelector)] + ))) + then (SETQ method (_ self MakeLocalMethod selector))) + else (LET* [(containingForm (if (AND (BOUNDP '\SendForm) + (EQ \Obj self) + (EQ selector 'EditMethod)) + then \SendForm)) + (correctedSelector (\LoopsFixSpell + selector allSelectors (CONS '_ containingForm) + (if (EQ 'QUOTE (CAR (CADDR containingForm))) + then (CDR (CADDR containingForm] + (if correctedSelector + then (SETQ selector correctedSelector) + (SETQ method (OR (FindLocalMethod self correctedSelector) + (_ self MakeLocalMethod correctedSelector)] (if (NULL method) then NIL elseif (NULL (CheckMethodForm self selector method)) then (PROMPTPRINT method " is not a known function.") else (if (GETDEF method 'METHOD-FNS NIL '(NOERROR NOCOPY NODWIM)) - then (EDITDEF method 'METHOD-FNS NIL commands) - else (PROMPTPRINT "Can't find source for " method T) - NIL)))) + then (EDITDEF method 'METHOD-FNS NIL commands) + else (PROMPTPRINT "Can't find source for " method T) + NIL)))) -(Method ((Class EditMethodObject) self selector) (* ; "smL 29-Jan-86 14:04") +(Method ((Class EditMethodObject) self selector) (* ; "smL 29-Jan-86 14:04") "Edit the object corresponding to the method" (PROG NIL (OR selector [SETQ selector (_ self PickSelector (CONCAT "EditMethodObject: " (ClassName @@ -1416,17 +1407,17 @@ it blank . If oldInstanceFlg=T, then it does not mark the object as modified." (RETURN NIL)) Edit))) -(Method ((Class FetchMethod) self selector) (* ; "dgb: 29-Feb-84 08:50") +(Method ((Class FetchMethod) self selector) (* ; "dgb: 29-Feb-84 08:50") "Find the name of the function which implements this method in this class" (FetchMethod self selector)) -(Method ((Class FileIn) self fileSource) (* ; "smL 19-May-86 19:15") +(Method ((Class FileIn) self fileSource) (* ; "smL 19-May-86 19:15") "Create an instance from expr, which was read from a file" (LET ((obj (_ self Old fileSource))) (_ obj InstallFileSource fileSource) (_ obj OldInstance))) -(Method ((Class FileOut) self file) (* ; "dgb: 24-Sep-84 12:57") +(Method ((Class FileOut) self file) (* ; "dgb: 24-Sep-84 12:57") "Print out a class definition to a file." [RESETVAR FIRSTCOL 16 (LET ((source (_ self MakeFileSource))) (COND @@ -1435,25 +1426,25 @@ it blank . If oldInstanceFlg=T, then it does not mark the object as modified." " is not defined as a class. Type OK to ignore this class and go on.")) (T (* ; - "Bind the flag to stop PPing embedded objects in a class") + "Bind the flag to stop PPing embedded objects in a class") (LET ((ObjectDontPPFlag T)) (printout file "(" .P2 'DEFCLASS " " .FONT LAMBDAFONT .P2 (CADR source) .FONT DEFAULTFONT 3) (if PRETTYFLG then (printout file .PPFTL (CDDR source) - ")" T T) + ")" T T) else (printout file .PPVTL (CDDR source) - ")" T] + ")" T] self) -(Method ((Class Fringe) self) (* ; "smL 11-Apr-86 15:01") +(Method ((Class Fringe) self) (* ; "smL 11-Apr-86 15:01") "List classes which have now subclasses" (for C in (_ self ListAttribute! 'Subs) when (NULL (_ (GetClassRec C) - ListAttribute - 'Subs)) collect C)) + ListAttribute + 'Subs)) collect C)) -(Method ((Class GetClassProp) self propName) (* ; "smL 27-May-86 14:11") +(Method ((Class GetClassProp) self propName) (* ; "smL 27-May-86 14:11") "Maps through a class and its metaClasses in order to find the value of a property on the class itself. Returns if property is set, or NotSetValue if none found. If propName is NIL, then returns the metaClass of the class." @@ -1461,15 +1452,15 @@ metaClass of the class." ((NULL propName) (_ self Class)) (T (bind (class _ self) - value do (COND - [[NOT (NotSetValue (SETQ value (GetClassHere class propName] - (RETURN (ExtractRealValue class NIL value propName 'CLASS] - ((EQ class (SETQ class (_ class Class))) + value do (COND + [[NOT (NotSetValue (SETQ value (GetClassHere class propName] + (RETURN (ExtractRealValue class NIL value propName 'CLASS] + ((EQ class (SETQ class (_ class Class))) (* * Lots of class in this code. SETQ replaces value of class. - Stops at any tight loop such as Metaclass) + Stops at any tight loop such as Metaclass) - (RETURN NotSetValue]) + (RETURN NotSetValue]) (Method ((Class HasAttribute) self type name propname) "Similar to HasItem, but with right semantics from start." @@ -1495,7 +1486,7 @@ metaClass of the class." (for super in (Supers self) when (_ super HasAttribute type name propname) do (RETURN T)))) -(Method ((Class HasItem) self itemName prop itemType) (* ; "mjs: 4-Dec-85 14:26") +(Method ((Class HasItem) self itemName prop itemType) (* ; "mjs: 4-Dec-85 14:26") "Generalized Has predicate for IVS, CVS, METHODS." (SELECTQ itemType ((IV IVS) @@ -1506,11 +1497,11 @@ metaClass of the class." (FindLocalMethod self itemName)) NIL)) -(Method ((Class IndexedInstances) self) (* ; "dgb: 16-May-84 19:56") +(Method ((Class IndexedInstances) self) (* ; "dgb: 16-May-84 19:56") "Find IndexedInstances of this class" (FindIndexedObjects (ClassName self))) -(Method ((Class Initialize) class self) (* ; "dgb: 18-JAN-83 17:25") +(Method ((Class Initialize) class self) (* ; "dgb: 18-JAN-83 17:25") "Run initial expression for IVs with active value defaults with ls = INITIAL or gfn = AtCreation. In that case, makes a value which is the expression in GetFn. Other active values are copied to instance by PutValue" @@ -1523,13 +1514,12 @@ List! (QUOTE IVPROPS) varName)) when (NEQ NotSetValue (SETQ value (FireInit self (FastClassInitialize class self) self) -(Method ((Class InstallEditSource) self editedDescription) - (* ; "smL 13-May-86 13:03") +(Method ((Class InstallEditSource) self editedDescription) (* ; "smL 13-May-86 13:03") "Make class conform to new edited description" [LET ((className (ClassName self))) (COND ((CheckClassSource editedDescription className) (* ; - "Dont't install the class if there are errors. Bounce back to editor") + "Dont't install the class if there are errors. Bounce back to editor") (RINGBELLS 1) (* ;; "JRB - changed from PROMPTPRINT to two PRIN1s because PROMPTPRINT clears the window,so you never get to see error message printed by CheckClassSource") @@ -1548,15 +1538,14 @@ Type ^ to return to editor ")) (PutClass self (EDITDATE NIL INITIALS) 'Edited%:]) -(Method ((Class ListAttribute) self type name) (* ; "smL 23-May-86 10:29") +(Method ((Class ListAttribute) self type name) (* ; "smL 23-May-86 10:29") "Fn to list local parts of a class." [SELECTQ (SETQ type (U-CASE type)) (IVS (APPEND (fetch (class localIVs) of self))) (CVS (APPEND (fetch cvNames of self))) ((METHODS SELECTORS) (\ListFromBlock (fetch selectors of self))) - (METHODOBJECTS (for s in (_ self ListAttribute 'Selectors) - collect (MethName self s))) + (METHODOBJECTS (for s in (_ self ListAttribute 'Selectors) collect (MethName self s))) (FUNCTIONS (\ListFromBlock (fetch methods of self))) ((SUPERS SUPERCLASSES) (for x in (fetch localSupers of self) collect (ClassName x))) @@ -1580,8 +1569,7 @@ Type ^ to return to editor ")) (for x in descr by (CDDR x) collect x)) (for x in (CDR descr) by (CDDR x) collect x]) -(Method ((Class ListAttribute!) self type name verboseFlg) - (* ; "smL 29-Sep-86 11:27") +(Method ((Class ListAttribute!) self type name verboseFlg) (* ; "smL 29-Sep-86 11:27") "Recursive version of ListAttribute message. Omits things inherited from Object and Class unless verboseFlg is T. Sets it to T for Class and Object" (COND @@ -1605,18 +1593,17 @@ verboseFlg is T. Sets it to T for Class and Object" ((SUBS SUBCLASSES) (* List all subclasses of self) (SubsTree self)) (PROG (attList) (* Here if need to recur to collect - items.) + items.) (MapSupersUnlessBadList [COND (verboseFlg NIL) (T '(Class Object Tofu] - (for item in (_ class ListAttribute type name) - do (pushnew attList item)) + (for item in (_ class ListAttribute type name) do (pushnew attList item)) self) (RETURN (SELECTQ type (CLASS (DREVERSE attList)) attList]) -(Method ((Class MakeEditSource) self) (* ; "smL 14-May-86 14:56") +(Method ((Class MakeEditSource) self) (* ; "smL 14-May-86 14:56") "Make a source for editing the class" (DECLARE (GLOBALVARS EditClassMethodsFlg)) [LIST* (CONS 'MetaClass (GetSourceMeta self)) @@ -1626,17 +1613,16 @@ verboseFlg is T. Sets it to T for Class and Object" (COND (EditClassMethodsFlg (LIST (CONS 'MethodFns (SORT (for I from 0 by 2 - bind sel (sels _ (fetch selectors - of self)) - (meths _ (fetch (class methods) - of self)) + bind sel (sels _ (fetch selectors of self)) + (meths _ (fetch (class methods) + of self)) first (if (NULL sels) - then (RETURN NIL)) + then (RETURN NIL)) eachtime (SETQ sel (\GetNthEntry sels I)) - until (NULL sel) - collect (\GetNthEntry meths I]) + until (NULL sel) collect (\GetNthEntry meths I + ]) -(Method ((Class MakeFileSource) self file) (* ; "smL 4-Apr-86 17:47") +(Method ((Class MakeFileSource) self file) (* ; "smL 4-Apr-86 17:47") "Creates a list structure source of a class to be dumped on a file" (LET (tail (cvs (GetSourceCVs self)) (ivs (GetSourceIVs self))) @@ -1647,7 +1633,7 @@ verboseFlg is T. Sets it to T for Class and Object" (Supers %,. (GetSourceSupers self)) %,. tail))) -(Method ((Class MakeFullEditSource) self) (* ; "mjs: 25-Oct-85 15:59") +(Method ((Class MakeFullEditSource) self) (* ; "mjs: 25-Oct-85 15:59") "Make source including inherited values" (LIST (CONS 'MetaClass (GetSourceMeta self)) (CONS 'Supers (GetSourceSupers self)) @@ -1660,47 +1646,44 @@ verboseFlg is T. Sets it to T for Class and Object" (@ (GetMethodObj self selector) category)) -(Method ((Class MoveToFile) self file) (* ; "smL 17-Apr-86 14:12") +(Method ((Class MoveToFile) self file) (* ; "smL 17-Apr-86 14:12") "Move this class to a file" [COND ([NULL (OR file (SETQ file (SelectFile] (printout PROMPTWINDOW "Nothing moved!")) (T (MOVEITEM file (ClassName self) 'CLASSES) - (for method in (_ self ListAttribute 'METHODS) - do (* First make sure we have the - source loaded) - (LET ((methName (MethName self method))) - (EnsureFnLoaded methName) - (MOVEITEM file methName 'METHODS]) - -(Method ((Class MoveToFile!) self file fromfiles) (* ; "smL 11-Apr-86 14:49") + (for method in (_ self ListAttribute 'METHODS) do (* First make sure we have the source + loaded) + (LET ((methName (MethName self method))) + (EnsureFnLoaded methName) + (MOVEITEM file methName 'METHODS]) + +(Method ((Class MoveToFile!) self file fromfiles) (* ; "smL 11-Apr-86 14:49") "Move this class and all its subs to file" (if (OR file (SETQ file (SelectFile))) then (_ self MoveToFile file) - (for s in (_ self ListAttribute 'Subs) - when [OR (NOT fromfiles) - (for F in fromfiles thereis (MEMBER s (FILECOMSLST - F - 'CLASSES] - do (_ ($! s) - MoveToFile! file)))) - -(Method ((Class New) self name arg1 arg2 arg3 arg4 arg5) (* ; "smL 22-May-86 14:30") + (for s in (_ self ListAttribute 'Subs) + when [OR (NOT fromfiles) + (for F in fromfiles thereis (MEMBER s (FILECOMSLST F 'CLASSES] + do (_ ($! s) + MoveToFile! file)))) + +(Method ((Class New) self name arg1 arg2 arg3 arg4 arg5) (* ; "smL 22-May-86 14:30") "Creates an instance of a particular class. The variable name if given is used to name the object." (_ (_ self CreateInstance) NewInstance name arg1 arg2 arg3 arg4 arg5)) -(Method ((Class NewClass) self init1 init2 init3) (* ; "dgb: 22-SEP-83 14:19") +(Method ((Class NewClass) self init1 init2 init3) (* ; "dgb: 22-SEP-83 14:19") "Just returns newly created class" self) -(Method ((Class NewWithValues) self description) (* ; "smL 25-Apr-86 14:30") +(Method ((Class NewWithValues) self description) (* ; "smL 25-Apr-86 14:30") "Create a new instance of the class, with initial IV values given by the description." (NewWithValues self description)) -(Method ((Class Old) self fileSource) (* ; "smL 19-May-86 19:14") +(Method ((Class Old) self fileSource) (* ; "smL 19-May-86 19:14") "Find an old object or create a new one with this uid" [LET ((names (CAR fileSource))) (NewObject self (COND @@ -1722,32 +1705,30 @@ verboseFlg is T. Sets it to T for Class and Object" (otherCategories (LDIFFERENCE allCategories okCategories)) (selectors (_ self SelectorsInCategories okCategories okSelectors))) (if (OR (AND (NULL okSelectors) - (NULL includeGenerics?)) - (AND (NULL selectors) - (NULL otherCategories))) + (NULL includeGenerics?)) + (AND (NULL selectors) + (NULL otherCategories))) then (PROMPTPRINT "No methods for class" self) else (LET ((selector (NiceMenu (NCONC selectors - [for cat in otherCategories - collect (LIST (CONCAT "** " cat - " category" " **") - (KWOTE (LIST cat] - (if includeGenerics? - then '[("** Generic methods **" - '(*generics*] - else NIL)) - title))) - (if (LITATOM selector) - then selector - elseif (EQ (CAR selector) - '*generics*) - then (_ self PickSelector title okCategories - [SORT (LDIFFERENCE (_ self ListAttribute! 'Methods NIL - T) - (_ self ListAttribute! 'Methods)]) - else (_ self PickSelector title (LIST (CAR selector)) - okSelectors)]) - -(Method ((Class Prototype) self newProtoFlg) (* ; "smL 4-Dec-85 15:43") + [for cat in otherCategories + collect (LIST (CONCAT "** " cat " category" " **" + ) + (KWOTE (LIST cat] + (if includeGenerics? + then '[("** Generic methods **" '(*generics*] + else NIL)) + title))) + (if (LITATOM selector) + then selector + elseif (EQ (CAR selector) + '*generics*) + then (_ self PickSelector title okCategories + [SORT (LDIFFERENCE (_ self ListAttribute! 'Methods NIL T) + (_ self ListAttribute! 'Methods)]) + else (_ self PickSelector title (LIST (CAR selector)) + okSelectors)]) + +(Method ((Class Prototype) self newProtoFlg) (* ; "smL 4-Dec-85 15:43") "Find an instance of class on CV Prototype, or create an puts one there. Used to send messages for effect to a prototype object If newProtoFlg=T then make sure a new prototype is created" (PROG (proto descr) @@ -1759,7 +1740,7 @@ effect to a prototype object If newProtoFlg=T then make sure a new prototype is (PutCVHere self 'Prototype (SETQ proto (_ self CreateInstance)] (RETURN proto))) -(Method ((Class Rename) self newName) (* ; "smL 31-Oct-86 09:48") +(Method ((Class Rename) self newName) (* ; "smL 31-Oct-86 09:48") "Same as SetName. Classes can have only one name" (until (NOT (NULL newName)) do (SETQ newName (HELPCHECK "Can't rename a class without specifying name. Type RETURN ' @@ -1768,17 +1749,17 @@ to continue and rename class: " self))) (SELFNAMECATMETHODS (_ self SelectorsInCategories oldName))) (_ self SetName newName) (UNMARKASCHANGED oldName 'CLASSES) (* ; "so it won't show up in (FILES?)") - (for S in SELFNAMECATMETHODS do (_ self ChangeMethodCategory S - (DSUBST newName oldName - (_ self MethodCategories S)))]) + (for S in SELFNAMECATMETHODS do (_ self ChangeMethodCategory S (DSUBST newName oldName + (_ self + MethodCategories + S)))]) -(Method ((Class RenameMethod) self oldSelector newSelector) - (* ; "dgb: 18-MAR-83 16:30") +(Method ((Class RenameMethod) self oldSelector newSelector) (* ; "dgb: 18-MAR-83 16:30") "Rename selector, and change function name" (RenameMethod (GoodClassName self) oldSelector newSelector)) -(Method ((Class ReplaceSupers) self supers) (* ; "dgb: 27-AUG-82 13:05") +(Method ((Class ReplaceSupers) self supers) (* ; "dgb: 27-AUG-82 13:05") "replace supers of class by new supers list" (OR (EQ 'NoUpdateRequired (InstallSupers self supers)) (ChangedClass self))) @@ -1791,29 +1772,27 @@ to continue and rename class: " self))) (SORT (for sel inside (OR okSelectors (_ self ListAttribute 'Selectors)) when (LET ((cat (@ (GetMethodObj! self sel) - category))) - (if (EQMEMB 'Any okCategories) - then (* ; "every method is in category Any") - T - elseif (AND (EQMEMB 'Public okCategories) - (NOT (EQMEMB 'Internal cat))) - then (* ; - "Public matches all except Internal") - T - elseif [NOT (NULL (for c inside cat - thereis (EQMEMB c okCategories] - then (* ; - "A category for the selector is present in the list of okCategories") - T)) collect sel))) - -(Method ((Class SelectorsWithBreak) self) (* ; "smL 15-Mar-85 19:07") + category))) + (if (EQMEMB 'Any okCategories) + then (* ; "every method is in category Any") + T + elseif (AND (EQMEMB 'Public okCategories) + (NOT (EQMEMB 'Internal cat))) + then (* ; + "Public matches all except Internal") + T + elseif [NOT (NULL (for c inside cat thereis (EQMEMB c okCategories] + then (* ; + "A category for the selector is present in the list of okCategories") + T)) collect sel))) + +(Method ((Class SelectorsWithBreak) self) (* ; "smL 15-Mar-85 19:07") "Returns a list of selectors whose implementations have a BREAK" (for fn bind pos (cn _ (CONCAT (ClassName self) - ".")) in BROKENFNS first (SETQ pos - (ADD1 (NCHARS cn))) + ".")) in BROKENFNS first (SETQ pos (ADD1 (NCHARS cn))) when (STRPOS cn fn 1 NIL T) collect (SUBATOM fn pos))) -(Method ((Class SetName) self newClassName) (* ; "smL 12-May-87 18:40") +(Method ((Class SetName) self newClassName) (* ; "smL 12-May-87 18:40") "Change the newClassName of the class, forgetting old name. Change the names of all methods which are of the form oldName.selector" (LET* [(oldName (ClassName self)) @@ -1826,26 +1805,26 @@ of the form oldName.selector" (T (_ self UnSetName oldName) (NameEntity self newClassName) (replace className of self with newClassName) - (for class in (fetch subClasses of self) - do (change (fetch className of class) - (DSUBST newClassName oldName DATUM)) + (for class in (fetch subClasses of self) do (change (fetch className of class) + (DSUBST newClassName oldName DATUM) + ) when (LISTP (fetch className of class))) (ChangedClass self) (for file in files do (ADDTOFILE newClassName 'CLASSES file) - (OR [NLSETQ (EDITCALLERS oldName file `((ORR (R ($ %, oldName) - ($ %, newClassName)) - NIL] - (printout NIL T "Can't rename " oldName " to " newClassName " on file " - file T))) + (OR [NLSETQ (EDITCALLERS oldName file `((ORR (R ($ %, oldName) + ($ %, newClassName)) + NIL] + (printout NIL T "Can't rename " oldName " to " newClassName " on file " file + T))) (for selector in (_ self ListAttribute 'Selectors) do (_ ($! (MethName oldName selector)) - ChangeClassName newClassName)) + ChangeClassName newClassName)) (if (_ self Subclass ($ IndexedObject)) then (RenameIndexList oldName newClassName)) self)))) -(Method ((Class Specialize) self newName) (* ; "mjs: 21-FEB-83 07:57") +(Method ((Class Specialize) self newName) (* ; "mjs: 21-FEB-83 07:57") "Creates a class with name newName with self as its only super. If newName is NIL, then makes up an unused name consisting of current name followed by integer" [OR newName (PROG ((N 0) @@ -1856,44 +1835,42 @@ unused name consisting of current name followed by integer" (_ (Class self) New newName (LIST (ClassName self)))) -(Method ((Class SpecializeMethod) self selector file) (* ; "smL 30-Oct-86 18:13") +(Method ((Class SpecializeMethod) self selector file) (* ; "smL 30-Oct-86 18:13") "Specialize method for selector given" (* ;; "First, get the selector that we should work on") (if (NULL selector) then (SETQ selector (_ self PickSelector (CONCAT "SpecializingMethod: " (ClassName self)) - NIL - [SORT (LDIFFERENCE (_ self ListAttribute! 'Methods) - (_ self ListAttribute 'Methods)] - T))) + NIL + [SORT (LDIFFERENCE (_ self ListAttribute! 'Methods) + (_ self ListAttribute 'Methods)] + T))) (* ;; "Now specialize it") [if selector then (LET [(superMethodObj (if (FetchMethod self selector) - then (for class in (Supers self) - thereis (GetMethodObj class selector) - finally (RETURN (GetMethodObj class - selector] - (if superMethodObj - then (DefineMethod self selector (COPY (@ superMethodObj args)) - [COPY `(,(OR (@ superMethodObj doc) - (CONCAT "Specialization")) - (_Super self ,selector - ,@(COPY (@ superMethodObj args)))] - file) - (change (@ (GetMethodObj self selector) - category) - (@ superMethodObj category)) - (_ self EditMethod selector) - else (PROMPTPRINT "No method for selector"]) - -(Method ((Class SubClasses) self) (* ; "smL 11-Oct-85 16:29") + then (for class in (Supers self) thereis (GetMethodObj class + selector) + finally (RETURN (GetMethodObj class selector] + (if superMethodObj + then (DefineMethod self selector (COPY (@ superMethodObj args)) + [COPY `(,(OR (@ superMethodObj doc) + (CONCAT "Specialization")) + (_Super self ,selector ,@(COPY (@ superMethodObj args)))] + file) + (change (@ (GetMethodObj self selector) + category) + (@ superMethodObj category)) + (_ self EditMethod selector) + else (PROMPTPRINT "No method for selector"]) + +(Method ((Class SubClasses) self) (* ; "smL 11-Oct-85 16:29") "Returns a list of immediate subclasses currently known for this class." (COPY (fetch subClasses of self))) -(Method ((Class Subclass) self super) (* ; "smL 18-Mar-85 14:14") +(Method ((Class Subclass) self super) (* ; "smL 18-Mar-85 14:14") "Is self a subclass of super? If it is, return super, else NIL." (MapSupersForm (COND ((EQ class superClass) @@ -1901,7 +1878,7 @@ unused name consisting of current name followed by integer" self (superClass (GetClassRec super)))) -(Method ((Class TraceMethod) self selector) (* ; "smL 8-Apr-87 19:38") +(Method ((Class TraceMethod) self selector) (* ; "smL 8-Apr-87 19:38") "Trace selected method, or give choice if selector is NIL" [SETQ selector (OR selector (_ self PickSelector (CONCAT "Trace Method: " (ClassName self)) NIL @@ -1912,52 +1889,49 @@ unused name consisting of current name followed by integer" selector] (T 'NothingTraced))) -(Method ((Class UnSetName) self name) (* ; "smL 8-Apr-87 13:14") +(Method ((Class UnSetName) self name) (* ; "smL 8-Apr-87 13:14") "Unname entity" [LET ((names (DeleteObjectName self name))) (if names - then (for name inside names - collect (LET [(files (WHEREIS name 'CLASSES] - (UNMARKASCHANGED name 'CLASSES) - (if files - then (DELFROMFILES name 'CLASSES files) - else T]) - -(Method ((DestroyedClass Destroy) self) (* ; "edited: 20-Dec-84 11:31") + then (for name inside names collect (LET [(files (WHEREIS name 'CLASSES] + (UNMARKASCHANGED name 'CLASSES) + (if files + then (DELFROMFILES name 'CLASSES files) + else T]) + +(Method ((DestroyedClass Destroy) self) (* ; "edited: 20-Dec-84 11:31") "you don't have to do anything to destroy a destroyed class" self) -(Method ((DestroyedClass Destroy!) self) (* ; "edited: 19-Dec-84 09:21") +(Method ((DestroyedClass Destroy!) self) (* ; "edited: 19-Dec-84 09:21") "Similar to DestroyedObject.Destroy! -- Nothing to do once one is dstroyed" self) -(Method ((DestroyedClass DestroyClass) self classToDestroy) - (* ; "smL 21-May-86 11:35") +(Method ((DestroyedClass DestroyClass) self classToDestroy) (* ; "smL 21-May-86 11:35") "Destroy the class specified by smashing its contents" (* ; - "First delete from knowledge of file system") + "First delete from knowledge of file system") (DELDEF (ClassName classToDestroy) 'CLASSES) (* ; - "Remove from subClasses lists of each super.") - (for super in-supers-of classToDestroy - do (replace subClasses of super with (for sub in DATUM - when (NEQ classToDestroy - (COND - ((LISTP sub) - (CAR sub)) - (T sub))) collect - sub))) + "Remove from subClasses lists of each super.") + (for super in-supers-of classToDestroy do (replace subClasses of super + with (for sub in DATUM + when (NEQ classToDestroy (COND + ((LISTP sub) + (CAR sub)) + (T sub))) + collect sub))) (* ; - "smash back pointer to the list of vars and var descriptions") + "smash back pointer to the list of vars and var descriptions") (replace otherClassDescription of classToDestroy with NIL) (replace VARNAMES of classToDestroy with NIL) - (replace VARDESCRS of classToDestroy with NIL)(* ; - "It is a classToDestroy so smash its list of subs and Supers") + (replace VARDESCRS of classToDestroy with NIL) (* ; + "It is a classToDestroy so smash its list of subs and Supers") (replace supers of classToDestroy with (LIST ($ DestroyedObject))) (replace metaClass of classToDestroy with ($ DestroyedClass)) (DeleteObjectUID classToDestroy) 'DestroyedClass) -(Method ((DestroyedClass DestroyInstance) class self) (* ; "smL 21-May-86 11:21") +(Method ((DestroyedClass DestroyInstance) class self) (* ; "smL 21-May-86 11:21") "smash back pointer to entity rec, the list of vars and var descriptions" (replace class of self with ($ DestroyedObject)) (replace iNames of self with NIL) @@ -1965,59 +1939,54 @@ unused name consisting of current name followed by integer" (replace otherIVs of self with NIL) (DeleteObjectUID self)) -(Method ((DestroyedClass SubClasses) self) (* ; "dgb: 5-OCT-83 07:56") +(Method ((DestroyedClass SubClasses) self) (* ; "dgb: 5-OCT-83 07:56") "Non subclasses" NIL) -(Method ((DestroyedObject Destroy!) self) (* ; "dgb: 27-MAY-83 11:44") +(Method ((DestroyedObject Destroy!) self) (* ; "dgb: 27-MAY-83 11:44") "Do nothing. I am already destroyed" self) -(Method ((MetaClass CreateClass) self name supers) (* ; "dgb: 22-SEP-83 14:17") +(Method ((MetaClass CreateClass) self name supers) (* ; "dgb: 22-SEP-83 14:17") "Create the data object for a class, checking the inputs" (DefineClass name supers self)) -(Method ((MetaClass DestroyInstance) classToDestroy) (* ; "smL 21-May-86 11:36") +(Method ((MetaClass DestroyInstance) classToDestroy) (* ; "smL 21-May-86 11:36") "Destroy the class specified by smashing its contents" (* ; - "First delete from knowledge of file system") + "First delete from knowledge of file system") (DELDEF (ClassName classToDestroy) 'CLASSES) (* ; - "Remove from subClasses lists of each super.") - (for superName in (_ classToDestroy ListAttribute 'Supers) bind super - when (SETQ super (GetClassRec superName)) - do (replace subClasses of super with (for sub - in (fetch subClasses - of super) - when (NEQ classToDestroy - (COND - ((LISTP sub) - (CAR sub)) - (T sub))) collect - sub))) + "Remove from subClasses lists of each super.") + (for superName in (_ classToDestroy ListAttribute 'Supers) bind super when (SETQ super + (GetClassRec superName + )) + do (replace subClasses of super with (for sub in (fetch subClasses of super) + when (NEQ classToDestroy (COND + ((LISTP sub) + (CAR sub)) + (T sub))) collect sub))) (* ; - "smash back pointer to entity rec, the list of vars and var descriptions") + "smash back pointer to entity rec, the list of vars and var descriptions") (replace otherClassDescription of classToDestroy with NIL) (replace VARNAMES of classToDestroy with NIL) - (replace VARDESCRS of classToDestroy with NIL)(* ; - "It is a classToDestroy so smash its list of subs and Supers") + (replace VARDESCRS of classToDestroy with NIL) (* ; + "It is a classToDestroy so smash its list of subs and Supers") (replace supers of classToDestroy with (LIST ($ DestroyedObject))) (replace metaClass of classToDestroy with ($ DestroyedClass)) (DeleteObjectUID classToDestroy) 'DestroyedClass) -(Method ((MetaClass New) self name supers init1 init2 init3) - (* ; "dgb: 22-SEP-83 14:20") +(Method ((MetaClass New) self name supers init1 init2 init3) (* ; "dgb: 22-SEP-83 14:20") "New method for MetaClass. Since MetaClass is its own metaClass, this needs to work correctly whether the self is Class or MetaClass or a subClass of MetaClass. Work is done by DefineClass in LOOPS." (_ (_ self CreateClass name supers) NewClass init1 init2 init3)) -(Method ((MetaClass NewWithValues) self selector superFlg) - (* ; "smL 25-Apr-86 14:32") +(Method ((MetaClass NewWithValues) self selector superFlg) (* ; "smL 25-Apr-86 14:32") "Create a new class, filled in with the given descriptor" (NewWithValues self selector superFlg)) -(Method ((Method ChangeClassName) self newClassName) (* ; "smL 14-Feb-86 16:06") +(Method ((Method ChangeClassName) self newClassName) (* ; "smL 14-Feb-86 16:06") "Change name of class -- called when className is changed" (PROG (newMethName (oldMethName (GetObjectName self)) (selector (@ selector))) @@ -2030,7 +1999,7 @@ the self is Class or MetaClass or a subClass of MetaClass. Work is done by Defin [LET* [[def (GETDEF oldMethName 'METHOD-FNS NIL '(NOCOPY] (args (COND ((LISTP (CAADR def)) (* ; - "new form for Methods. (Method (ClassName selector) . args)") + "new form for Methods. (Method (ClassName selector) . args)") (CDADR def)) (T (CAR def] (_ (GetClassRec newClassName) @@ -2054,7 +2023,7 @@ the self is Class or MetaClass or a subClass of MetaClass. Work is done by Defin (LET [(files (WHEREIS oldMethName 'METHODS] (UNMARKASCHANGED (@ method) 'METHODS) (* ; - "So old method won't show up in (FILES?)") + "So old method won't show up in (FILES?)") (_ self UnSetName oldMethName) (_ self SetName newMethName) (FlushMethodCache) @@ -2063,22 +2032,22 @@ the self is Class or MetaClass or a subClass of MetaClass. Work is done by Defin (for file in files do (ADDTOFILE newMethName 'METHODS file)) self)) -(Method ((Method DelFromFile) self) (* ; "smL 8-Apr-87 13:06") +(Method ((Method DelFromFile) self) (* ; "smL 8-Apr-87 13:06") "Delete from a file as a method" (LET [(files (WHEREIS (GetObjectName self) 'METHODS] (if files then (DELFROMFILES (GetObjectName self) - 'METHODS files) + 'METHODS files) else T))) -(Method ((Method EditMethod) self) (* ; "dgb: 27-NOV-83 16:28") +(Method ((Method EditMethod) self) (* ; "dgb: 27-NOV-83 16:28") "Edit the method defintion" (_ ($! (@ className)) EditMethod (@ selector))) -(Method ((Method FileOut) self file) (* ; "dgb: 30-OCT-83 11:24") +(Method ((Method FileOut) self file) (* ; "dgb: 30-OCT-83 11:24") "Print out filesource for methods" (PROG (pos (source (_ self MakeFileSource))) (printout file "(" .FONT DEFAULTFONT .P2 (CAR source) @@ -2091,7 +2060,7 @@ the self is Class or MetaClass or a subClass of MetaClass. Work is done by Defin ")" T)) self) -(Method ((Method MakeFileSource) self) (* ; "smL 19-Aug-86 15:01") +(Method ((Method MakeFileSource) self) (* ; "smL 19-Aug-86 15:01") "Return a form that will redefine the method object when read back in from a file - The form is (METH . )" (LET ((className (ClassName self)) (name (GetObjectName self)) @@ -2105,7 +2074,7 @@ the self is Class or MetaClass or a subClass of MetaClass. Work is done by Defin [COND ([AND (EQ name (@ method)) (NULL (CDDR (FASSOC 'method source] (* ; - "Has default name and no properties") + "Has default name and no properties") (SETQ source (DELASSOC 'method source] (CONS 'METH (NCONC (LIST (@ className) (@ selector) @@ -2113,12 +2082,12 @@ the self is Class or MetaClass or a subClass of MetaClass. Work is done by Defin (@ doc)) source)))) -(Method ((Method ObjectModified) self name reason) (* ; "smL 21-Aug-86 10:40") +(Method ((Method ObjectModified) self name reason) (* ; "smL 21-Aug-86 10:40") "sent when self modified in any way" (MARKASCHANGED (OR name (GetObjectName self)) 'METHODS reason)) -(Method ((Method OldInstance) self) (* ; "smL 27-Sep-85 11:20") +(Method ((Method OldInstance) self) (* ; "smL 27-Sep-85 11:20") "Adds Method to those known in class." (LET ((class (GetClassRec (@ className))) methClass) @@ -2136,18 +2105,17 @@ Cannot add method to class. Type OK to create class and go on.") methClass) (_ self ChangeClass methClass)))) -(Method ((Method UnSetName) self name) (* ; "smL 8-Apr-87 13:16") +(Method ((Method UnSetName) self name) (* ; "smL 8-Apr-87 13:16") "Unname entity" [LET ((names (DeleteObjectName self name))) (if names - then (for name inside names - collect (LET [(files (WHEREIS names 'METHODS] - (UNMARKASCHANGED name 'METHODS) - (if files - then (DELFROMFILES name 'METHODS files) - else T]) - -(Method ((Object ChangeClass) self newClass) (* ; "dgb: 16-May-84 20:16") + then (for name inside names collect (LET [(files (WHEREIS names 'METHODS] + (UNMARKASCHANGED name 'METHODS) + (if files + then (DELFROMFILES name 'METHODS files) + else T]) + +(Method ((Object ChangeClass) self newClass) (* ; "dgb: 16-May-84 20:16") "Change object to be new class, keeping old IVs" (PROG [(source (IVSource self)) (classRec (COND @@ -2159,41 +2127,39 @@ Cannot add method to class. Type OK to create class and go on.") (_ self OldInstance)) self) -(Method ((Object Class) self) (* ; "dgb: 27-AUG-82 13:07") +(Method ((Object Class) self) (* ; "dgb: 27-AUG-82 13:07") "Returns class of object" (Class self)) -(Method ((Object ClassName) self) (* ; "smL 25-Apr-86 14:28") +(Method ((Object ClassName) self) (* ; "smL 25-Apr-86 14:28") "Get the name of the class of self" (ClassName self)) -(Method ((Object ConformToClass) self) (* ; "smL 11-Apr-86 15:07") +(Method ((Object ConformToClass) self) (* ; "smL 11-Apr-86 15:07") "Make object have only those IVs that are defined in class" (FillInst (for descr in (IVSource self) bind (ivs _ (_ (Class self) - ListAttribute! - 'IVS)) - when (FMEMB (CAR descr) - ivs) collect descr) + ListAttribute! + 'IVS)) when (FMEMB (CAR descr) + ivs) collect descr) (BlankInstance NIL self))) -(Method ((Object DelFromFile) self) (* ; "smL 8-Apr-87 13:07") +(Method ((Object DelFromFile) self) (* ; "smL 8-Apr-87 13:07") "Remove object from any file it is on" (if (OR (HasUID? self) - (GETHASH self ObjNameTable)) - then (for name in (GetObjectNames self) - do (LET [(files (WHEREIS name 'INSTANCES] - (if files - then (DELFROMFILES name 'INSTANCES files) - else T))) - else (* No names, so can't be on any file) - NIL)) - -(Method ((Object Destroy) self) (* ; "dgb: 26-DEC-83 22:44") + (GETHASH self ObjNameTable)) + then (for name in (GetObjectNames self) do (LET [(files (WHEREIS name 'INSTANCES] + (if files + then (DELFROMFILES name 'INSTANCES files) + else T))) + else (* No names, so can't be on any file) + NIL)) + +(Method ((Object Destroy) self) (* ; "dgb: 26-DEC-83 22:44") "All the work is normally done by the class in DestroyInstance" (_ (Class self) DestroyInstance self)) -(Method ((Object Destroy!) self) (* ; "dgb: 28-Jan-85 22:35") +(Method ((Object Destroy!) self) (* ; "dgb: 28-Jan-85 22:35") "Same as Object.Destroy except when self is a class" (_ self Destroy)) @@ -2202,40 +2168,38 @@ Cannot add method to class. Type OK to create class and go on.") "Message form of DoMethod. Maximum of 10 arguments allowed" (DoMethod self selector class arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10)) -(Method ((Object Edit) self commands) (* ; "dgb: 4-OCT-83 11:34") +(Method ((Object Edit) self commands) (* ; "dgb: 4-OCT-83 11:34") "Use Interlisp editor on source of object" (LET ((EDITSOURCE (_ self MakeEditSource))) (if EDITSOURCE then (EDITE EDITSOURCE commands (OR (GetObjectName self) - self) - 'INSTANCES - 'ChangeEditedInstance) + self) + 'INSTANCES + 'ChangeEditedInstance) else (PROMPTPRINT self "has no IVs, can't edit"))) self) -(Method ((Object FileOut) self file) (* ; "dgb: 30-OCT-83 11:25") +(Method ((Object FileOut) self file) (* ; "dgb: 30-OCT-83 11:25") "Print out file source on file so it can be reread" (PROG ((source (_ self MakeFileSource)) pos) (if PRETTYFLG then + (* ;; "Pretty-print it") - (* ;; "Pretty-print it") - - (* ;; "Always bold the third thing in the source. Assume first is a function to install instance e.g. DEFINST and second is a clasName The third is a critical identifier.") + (* ;; "Always bold the third thing in the source. Assume first is a function to install instance e.g. DEFINST and second is a clasName The third is a critical identifier.") - (printout file "(" .FONT DEFAULTFONT .P2 (CAR source) - %,) - (SETQ pos (POSITION file)) - (printout file .P2 (CADR source) - .FONT LAMBDAFONT %, .P2 (CADDR source) - .FONT DEFAULTFONT .TAB pos .PPVTL (CDDDR source) - ")" T) + (printout file "(" .FONT DEFAULTFONT .P2 (CAR source) + %,) + (SETQ pos (POSITION file)) + (printout file .P2 (CADR source) + .FONT LAMBDAFONT %, .P2 (CADDR source) + .FONT DEFAULTFONT .TAB pos .PPVTL (CDDDR source) + ")" T) else + (* ;; "Don't pretty-print it") - (* ;; "Don't pretty-print it") - - (printout file .P2 source T))) + (printout file .P2 source T))) self) (Method ((Object HasAttribute) self type name propname) @@ -2247,11 +2211,10 @@ Cannot add method to class. Type OK to create class and go on.") [OR (NULL propname) (WithIVPropDescr self name [LAMBDA (self name propDescr) (AND propDescr (for pList - on (fetch IVPropList - of propDescr) + on (fetch IVPropList of propDescr + ) by (CDDR pList) - thereis (EQ propname - (CAR pList] + thereis (EQ propname (CAR pList] (LAMBDA (self name) NIL] T)) @@ -2260,10 +2223,10 @@ Cannot add method to class. Type OK to create class and go on.") (index (FindIndex name (fetch cvNames of class] (AND index [OR (NULL propname) (for tail on (CDR (GetNth (fetch cvDescrs of class) - index)) by (CDDR tail) + index)) by (CDDR tail) do (COND - ((EQ propname (CAR tail)) - (RETURN T] + ((EQ propname (CAR tail)) + (RETURN T] T))) (_ (Class self) HasAttribute type name propname))) @@ -2282,27 +2245,25 @@ property, then an IV is automatically created..." [PROG (fixedName) Loop (* If the IV is now defined in the class, copy it down to the instance. - This can happen if the class was changed after the instance was created.) + This can happen if the class was changed after the instance was created.) (COND ((FMEMB varName (_ (Class self) ListAttribute! 'IVs)) (FillIVs self (Class self) - (for ivDescr in (IVSource self) when (NOT (EQLENGTH ivDescr 1)) - collect ivDescr) + (for ivDescr in (IVSource self) when (NOT (EQLENGTH ivDescr 1)) collect ivDescr) T) (GO Finish))) (* If there is a CV by that name, use it instead of the IV. - The method of use is determined by the %:allocation CVProp, one of - dynamicCached, dynamic, or class. In that case, the initial value is determined - by the CVProp %:initForm.) + The method of use is determined by the %:allocation CVProp, one of dynamicCached, + dynamic, or class. In that case, the initial value is determined by the CVProp + %:initForm.) [COND ((_ (Class self) - HasCV varName) (* Use the class variable, as - dictated by its %:allocation - property) + HasCV varName) (* Use the class variable, as dictated + by its %:allocation property) (RETURN (LET ((allocation (GetClassValue self varName '%:allocation)) (initForm (GetClassValue self varName '%:initForm)) initValue) @@ -2319,35 +2280,34 @@ property, then an IV is automatically created..." (APPLY* typeFlg self varName propName)) (SHOULDNT "Error in IVMissing"))) (dynamic (* Create the IV if a put, otherwise - get the class value) + get the class value) (SELECTQ typeFlg ((PutValue PutValueOnly) (CopyCVToIV self varName) (APPLY* typeFlg self varName newValue propName)) (GetValue (if (AND (NULL propName) - (ValueFound initForm)) + (ValueFound initForm)) then (EVAL initForm) - else (GetClassValue self varName propName) - )) + else (GetClassValue self varName propName))) (GetValueOnly (if (AND (NULL propName) - (ValueFound initForm)) + (ValueFound initForm)) then (EVAL initForm) else (GetClassValueOnly self varName - propName))) + propName))) (SHOULDNT "Error in IVMissing"))) (class (SELECTQ typeFlg (PutValue (PutClassValue self varName newValue propName)) (PutValueOnly (PutClassValueOnly self varName newValue propName)) (GetValue (if (AND (NULL propName) - (ValueFound initForm)) + (ValueFound initForm)) then (EVAL initForm) else (GetClassValue self varName propName))) (GetValueOnly (if (AND (NULL propName) - (ValueFound initForm)) + (ValueFound initForm)) then (EVAL initForm) else (GetClassValueOnly self varName - propName))) + propName))) (SHOULDNT "Error in IVMissing"))) (ERROR ":allocation property not one of (dynamic dynamicCached class)" allocation] @@ -2374,37 +2334,34 @@ property, then an IV is automatically created..." (SELECTQ typeFlg (GetValueOnly classValue) (GetValue (* NOTE%: This won't inherit for - NotSetValue inside an activeValue in - a class) + NotSetValue inside an activeValue in a + class) (COND - ((type? annotatedValue classValue) - (* Copy the annotated value down - into the instance and send it the - appropriate msg) + ((type? annotatedValue classValue) (* Copy the annotated value down into + the instance and send it the + appropriate msg) (_AV (\PutValueOnly self varName propName (_AV classValue CopyActiveValue classValue)) GetWrappedValue self varName propName 'IV)) (T classValue))) (PutValueOnly (\PutValueOnly self varName propName newValue)) (PutValue (COND - ((type? annotatedValue classValue) - (* Copy the annotated value down - into the instance and send it the - appropriate msg) + ((type? annotatedValue classValue) (* Copy the annotated value down into + the instance and send it the + appropriate msg) (_AV (\PutValueOnly self varName propName (_AV classValue CopyActiveValue classValue)) PutWrappedValue self varName newValue propName 'IV)) (T (\PutValueOnly self varName propName newValue)))) (SHOULDNT "Error in Put or GetValue")))) -(Method ((Object InstallEditSource) self editedDescription) - (* ; "dgb: 4-OCT-83 11:33") +(Method ((Object InstallEditSource) self editedDescription) (* ; "dgb: 4-OCT-83 11:33") "Blank instance and make it conform to new description" (BlankInstance (Class self) self) (FillInst editedDescription self)) -(Method ((Object InstallFileSource) self fileSource) (* ; "dgb: 13-OCT-83 22:06") +(Method ((Object InstallFileSource) self fileSource) (* ; "dgb: 13-OCT-83 22:06") "Fill the given instance based on expression fileSource read from file, and name it" (NameObject self (LISTP (CAR fileSource) NIL)) @@ -2412,7 +2369,7 @@ property, then an IV is automatically created..." self) self) -(Method ((Object ListAttribute) self type name) (* ; "smL 18-Jun-86 14:05") +(Method ((Object ListAttribute) self type name) (* ; "smL 18-Jun-86 14:05") "For type= IVs, list the iv names in instance. For IVProps lists IV properties for name found in instance. Otherwise lists properties inherited from class" (SELECTQ (U-CASE type) @@ -2423,32 +2380,31 @@ instance. Otherwise lists properties inherited from class" (LAMBDA (self name) NIL]) (IVS (APPEND (if (EQ (fetch ivNames of (Class self)) - (fetch iNames of self)) + (fetch iNames of self)) then (fetch iNames of self) - else (UNION (fetch ivNames of (Class self)) - (fetch iNames of self))) + else (UNION (fetch ivNames of (Class self)) + (fetch iNames of self))) (for vl in (fetch otherIVs of self) collect (CAR vl)))) (_ (Class self) ListAttribute type name))) -(Method ((Object ListAttribute!) self type name verboseFlg) - (* ; "smL 17-Apr-87 10:14") +(Method ((Object ListAttribute!) self type name verboseFlg) (* ; "smL 17-Apr-87 10:14") "Recursive form of ListAttribute for objects. Omits things inherited from Object unless verboseFlg is T." (SELECTQ (U-CASE type) (IVS (_ self ListAttribute type name)) ((IV IVPROPS NIL) - (UNION (_ self ListAttribute type name) + (UNION (_ self ListAttribute type name) (_ (Class self) ListAttribute! type name))) (_ (Class self) ListAttribute! type name verboseFlg))) -(Method ((Object MakeEditSource) self) (* ; "smL 9-Sep-86 09:53") +(Method ((Object MakeEditSource) self) (* ; "smL 9-Sep-86 09:53") "Get a lst showing all instance variables, values, and properties for Editing" (for ivDescr in (IVSource self) collect ivDescr)) -(Method ((Object MakeFileSource) self file) (* ; "smL 20-Dec-84 15:49") +(Method ((Object MakeFileSource) self file) (* ; "smL 20-Dec-84 15:49") "create a list structure source to be dumped on a file" [CONS 'DEFINST (CONS (ClassName self) (CONS (GetObjectNames self) @@ -2464,19 +2420,19 @@ hope)" (correctSelector (\ApplyMethod correctSelector messageArguments)) (T (_Super )]) -(Method ((Object MoveToFile) self file) (* ; "smL 9-Apr-87 15:22") +(Method ((Object MoveToFile) self file) (* ; "smL 9-Apr-87 15:22") "Move this object to a file" (LET [(file (OR file (SelectFile] (if file then (LET ((name (GetObjectName self)) - (uid (UID self))) - [if (AND name (WHEREIS uid 'INSTANCES)) - then (DELFROMFILES uid 'INSTANCES (WHEREIS uid 'INSTANCES] - (MOVETOFILE file (OR name uid) - 'INSTANCES)) + (uid (UID self))) + [if (AND name (WHEREIS uid 'INSTANCES)) + then (DELFROMFILES uid 'INSTANCES (WHEREIS uid 'INSTANCES] + (MOVETOFILE file (OR name uid) + 'INSTANCES)) else (FRESHLINE PROMPTWINDOW) - (printout PROMPTWINDOW "No target file supplied, so nothing moved!") - NIL))) + (printout PROMPTWINDOW "No target file supplied, so nothing moved!") + NIL))) (Method ((Object NewInstance) self name arg1 arg2 arg3 arg4 arg5) (* ; "smL 1-May-86 11:27") @@ -2488,26 +2444,25 @@ hope)" (AND name (_ self SaveInstance name arg1 arg2)) self) -(Method ((Object ObjectModified) self name reason) (* ; "smL 15-Aug-86 16:55") +(Method ((Object ObjectModified) self name reason) (* ; "smL 15-Aug-86 16:55") "sent when self modified in any way" (DECLARE (SPECVARS \Default-Object-Modified-Reason)) (if name then (MARKASCHANGED name 'INSTANCES reason)) self) -(Method ((Object OldInstance) self) (* ; "smL 5-Sep-86 14:26") +(Method ((Object OldInstance) self) (* ; "smL 5-Sep-86 14:26") "Allow fixup of object after reading in." self) -(Method ((Object OnFile) self file) - "See if an instance is on given file. Returns file if none given" +(Method ((Object OnFile) self file) "See if an instance is on given file. Returns file if none given" (LET [(myfile (WHEREIS (ClassName self) 'INSTANCES] (COND (file (MEMB file myfile)) (T myfile)))) -(Method ((Object Rename) self newName oldNames) (* ; "smL 4-Jan-85 16:28") +(Method ((Object Rename) self newName oldNames) (* ; "smL 4-Jan-85 16:28") "Remove old name(s), and give it new name" (* ;; "JRB - made it return self as docmented. Also ") @@ -2521,49 +2476,47 @@ hope)" (ERROR "Not a list of names" oldNames)) (T [if oldNames then (if (NOT (for N in oldNames always (SETQ badName N) - (EQ ($! N) - self))) - then (ERROR "Not a name for self" badName)) + (EQ ($! N) + self))) + then (ERROR "Not a name for self" badName)) else (SETQ oldNames (CDR (REVERSE (GetObjectNames self] [if oldNames - then [SETQ files (for oldName in oldNames - join (PROG1 (WHEREIS oldName 'INSTANCES) - (_ self UnSetName oldName)] + then [SETQ files (for oldName in oldNames join (PROG1 (WHEREIS oldName 'INSTANCES) + (_ self UnSetName oldName)] - (* ;; "And so the oldNames won't show up in (FILES?)...") + (* ;; "And so the oldNames won't show up in (FILES?)...") - (for oldName in oldNames do (UNMARKASCHANGED oldName 'INSTANCES] + (for oldName in oldNames do (UNMARKASCHANGED oldName 'INSTANCES] (_ self SetName newName) (for f in files do (ADDTOFILE newName 'INSTANCES f)) self)))) -(Method ((Object SaveInstance) self name arg1 arg2) (* ; "smL 15-Aug-86 16:23") +(Method ((Object SaveInstance) self name arg1 arg2) (* ; "smL 15-Aug-86 16:23") "Used to save the instance on a file. Justs marks it as changed as a default" (_ self ObjectModified name)) -(Method ((Object SaveInstance?) self file outInstances) (* ; "edited: 26-Oct-84 15:36") +(Method ((Object SaveInstance?) self file outInstances) (* ; "edited: 26-Oct-84 15:36") "Save this instance if referred to by another unless it is already on this list to be saved" [COND ((type? instance self) (NOT (FMEMB self outInstances))) (T (NOT (MEMBER self outInstances]) -(Method ((Object SetName) self name) (* ; "smL 2-Apr-86 14:55") +(Method ((Object SetName) self name) (* ; "smL 2-Apr-86 14:55") "Call on NameEntity" (AND (NameEntity self name) (_ self ObjectModified name)) self) -(Method ((Object UnSetName) self name) (* ; "smL 8-Apr-87 13:13") +(Method ((Object UnSetName) self name) (* ; "smL 8-Apr-87 13:13") "Unname entity" [LET ((names (DeleteObjectName self name))) (if names - then (for name inside names - collect (LET [(files (WHEREIS name 'INSTANCES] - (UNMARKASCHANGED name 'INSTANCES) - (if files - then (DELFROMFILES name 'INSTANCES files) - else T]) + then (for name inside names collect (LET [(files (WHEREIS name 'INSTANCES] + (UNMARKASCHANGED name 'INSTANCES) + (if files + then (DELFROMFILES name 'INSTANCES files) + else T]) (Method ((Tofu MessageNotUnderstood) self selector messageArguments superFlg) (* ; "smL 13-Aug-86 17:28") @@ -2581,7 +2534,7 @@ the default datatype printing mechanism." self selector '--) "not understood"))) -(Method ((Tofu MethodNotFound) self selector) (* ; "smL 5-Aug-86 17:22") +(Method ((Tofu MethodNotFound) self selector) (* ; "smL 5-Aug-86 17:22") "Standard form for calling MessageNotUnderstood" `[CL:LAMBDA (&REST ArgumentsForMessageNotUnderstood) (SendMessageNotUnderstood ArgumentsForMessageNotUnderstood ',selector]) @@ -2590,12 +2543,10 @@ the default datatype printing mechanism." (* ; "smL 16-Oct-85 17:12") "No super method found when starting search from classOfSendingMethod" [if (GETD selector) - then (* ; - "Use the function by the same name") - selector + then (* ; "Use the function by the same name") + selector else `(CL:LAMBDA (&REST ArgumentsForMessageNotUnderstood) - (SendMessageNotUnderstood ArgumentsForMessageNotUnderstood - ',selector T]) + (SendMessageNotUnderstood ArgumentsForMessageNotUnderstood ',selector T]) (\UnbatchMethodDefs) (DEFINEQ @@ -2738,23 +2689,24 @@ the default datatype printing mechanism." (* "FOLLOWING DEFINITIONS EXPORTED")(DECLARE%: EVAL@COMPILE (PUTPROPS \PutValueOnly MACRO [OPENLAMBDA (self varName propName newValue) - (COND - [propName (WithIVPropDescr! self varName - [LAMBDA (self varName propDescr) - (InstPutProp propDescr propName - newValue] - (LAMBDA (self varName) - (SHOULDNT] - (T (WithIVValue self varName - [LAMBDA (self varName oldValue loc) - (ChangeIVValue self varName loc newValue] - (LAMBDA (self varName) - (SHOULDNT]) + (COND + [propName (WithIVPropDescr! self varName [LAMBDA (self varName + propDescr) + (InstPutProp propDescr + propName + newValue] + (LAMBDA (self varName) + (SHOULDNT] + (T (WithIVValue self varName [LAMBDA (self varName oldValue loc) + (ChangeIVValue self varName loc + newValue] + (LAMBDA (self varName) + (SHOULDNT]) ) (* "END EXPORTED DEFINITIONS") - +DONTEVAL@LOAD (FILESLOAD (LOADCOMP) LOOPSDATATYPES LOOPSACTIVEVALUES LOOPSMETHODS) @@ -2770,14 +2722,14 @@ the default datatype printing mechanism." (PUTPROPS LOOPSKERNEL COPYRIGHT ("Venue & Xerox Corporation" 1983 1984 1985 1986 1987 1988 1990 1991 1993)) (DECLARE%: DONTCOPY - (FILEMAP (NIL (4561 30992 (AddCIV 4571 . 5662) (AddCV 5664 . 6514) (AddIV 6516 . 7019) (AllSubClasses -7021 . 7763) (ClassName 7765 . 8441) (CopyCVToIV 8443 . 9734) (CopyDeepDescr 9736 . 11092) ( -CopyInstance 11094 . 12138) (CopyLoopsStruc 12140 . 12445) (DeleteIV 12447 . 13643) (DumpInstanceFacts - 13645 . 16287) (EnsureFnLoaded 16289 . 16734) (FixSelectorSpelling 16736 . 17522) (\LoopsFixSpell -17524 . 18243) (\LoopsDwim 18245 . 19422) (\FixSelectorSpelling 19424 . 21214) (GetMethodObj 21216 . -22387) (GetMethodObj! 22389 . 22887) (IVSublis 22889 . 24616) (METHCOM 24618 . 26062) (MapIVs 26064 . -26701) (MapIVs! 26703 . 27361) (NewWithValues 27363 . 27686) (OldClass 27688 . 27854) ( -SendMessageNotUnderstood 27856 . 28412) (SubsTree 28414 . 28915) (TypeInMethods 28917 . 29756) (WhoHas - 29758 . 30990)) (129494 138002 (MakeMethodMenu 129504 . 131434) (MethodMenuWhenSelectedFn 131436 . -131982) (SelectFile 131984 . 138000))))) + (FILEMAP (NIL (4515 30946 (AddCIV 4525 . 5616) (AddCV 5618 . 6468) (AddIV 6470 . 6973) (AllSubClasses +6975 . 7717) (ClassName 7719 . 8395) (CopyCVToIV 8397 . 9688) (CopyDeepDescr 9690 . 11046) ( +CopyInstance 11048 . 12092) (CopyLoopsStruc 12094 . 12399) (DeleteIV 12401 . 13597) (DumpInstanceFacts + 13599 . 16241) (EnsureFnLoaded 16243 . 16688) (FixSelectorSpelling 16690 . 17476) (\LoopsFixSpell +17478 . 18197) (\LoopsDwim 18199 . 19376) (\FixSelectorSpelling 19378 . 21168) (GetMethodObj 21170 . +22341) (GetMethodObj! 22343 . 22841) (IVSublis 22843 . 24570) (METHCOM 24572 . 26016) (MapIVs 26018 . +26655) (MapIVs! 26657 . 27315) (NewWithValues 27317 . 27640) (OldClass 27642 . 27808) ( +SendMessageNotUnderstood 27810 . 28366) (SubsTree 28368 . 28869) (TypeInMethods 28871 . 29710) (WhoHas + 29712 . 30944)) (127043 135551 (MakeMethodMenu 127053 . 128983) (MethodMenuWhenSelectedFn 128985 . +129531) (SelectFile 129533 . 135549))))) STOP diff --git a/system/LOOPSKERNEL.DFASL b/system/LOOPSKERNEL.DFASL index 209b258..ae16704 100644 Binary files a/system/LOOPSKERNEL.DFASL and b/system/LOOPSKERNEL.DFASL differ diff --git a/system/LOOPSMETHODS b/system/LOOPSMETHODS index 453f3f2..2d6bed5 100644 --- a/system/LOOPSMETHODS +++ b/system/LOOPSMETHODS @@ -1,15 +1,14 @@ -(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10) -(FILECREATED " 6-Nov-91 16:29:23" {DSK}RELEASE>loops>2.0>src>LOOPSMETHODS.;3 65027 +(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) - changes to%: (FUNCTIONS SubclassResponsibility) - (OPTIMIZERS _ SEND) - (FNS Cached-FetchMethodOrHelp) +(FILECREATED "19-Aug-2022 14:47:13" {DSK}larry>loops>system>LOOPSMETHODS.;2 59350 - previous date%: "15-Aug-91 12:38:42" {DSK}RELEASE>loops>2.0>src>LOOPSMETHODS.;2) + :CHANGES-TO (VARS LOOPSMETHODSCOMS) + + :PREVIOUS-DATE " 6-Nov-91 16:29:23" {DSK}larry>loops>system>LOOPSMETHODS.;1) (* ; " -Copyright (c) 1984, 1985, 1986, 1987, 1988, 1990, 1991 by Venue & Xerox Corporation. All rights reserved. +Copyright (c) 1984-1988, 1990-1991 by Venue & Xerox Corporation. ") (PRETTYCOMPRINT LOOPSMETHODSCOMS) @@ -18,8 +17,9 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988, 1990, 1991 by Venue & Xerox Corporat [ (* ;; " WARNING: YOU MUST SET *Compile-Local-Message-Cache* TO NIL BEFORE COMPILING THIS FILE. Failing to do so, you'll get a Cached-FetchMethodOrHelp that calls itself recursively forever.") - (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP) - LOOPSSTRUC)) + (DECLARE%: EVAL@COMPILE DONTCOPY DONTEVAL@LOAD (P (SETQ *Compile-Local-Message-Cache* NIL))) + (DECLARE%: DONTEVAL@LOAD EVAL@COMPILE DONTCOPY (FILES (LOADCOMP) + LOOPSSTRUC)) (* ;;; "Translation of METHOD forms to LAMBDA forms") @@ -68,7 +68,11 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988, 1990, 1991 by Venue & Xerox Corporat " WARNING: YOU MUST SET *Compile-Local-Message-Cache* TO NIL BEFORE COMPILING THIS FILE. Failing to do so, you'll get a Cached-FetchMethodOrHelp that calls itself recursively forever." ) -(DECLARE%: EVAL@COMPILE DONTCOPY +(DECLARE%: EVAL@COMPILE DONTCOPY DONTEVAL@LOAD + +(SETQ *Compile-Local-Message-Cache* NIL) +) +(DECLARE%: DONTEVAL@LOAD EVAL@COMPILE DONTCOPY (FILESLOAD (LOADCOMP) LOOPSSTRUC) @@ -100,13 +104,13 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988, 1990, 1991 by Venue & Xerox Corporat `(_ ,self ,selector ,@(for x in args collect (KWOTE x)))) (DEFMACRO _New (class &OPTIONAL (selector NIL selector-supplied-p) - &REST args) + &REST args) (if selector-supplied-p then [LET ((self (GENSYM))) - `(LET ((,self (_ ,class New))) - (DECLARE (LOCALVARS ,self)) - (_ ,self ,selector ,@args) - ,self] + `(LET ((,self (_ ,class New))) + (DECLARE (LOCALVARS ,self)) + (_ ,self ,selector ,@args) + ,self] else `(_ ,class New))) (DEFMACRO _IV (self IVName &REST args) @@ -117,35 +121,35 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988, 1990, 1991 by Venue & Xerox Corporat (DECLARE%: EVAL@COMPILE (PUTPROPS _Proto MACRO ((obj . args) - (_ (_ obj Prototype) . args))) + (_ (_ obj Prototype) . args))) (PUTPROPS _Try MACRO [(obj action . args) - (PROG ((obj% obj)) - (RETURN (DOAPPLY* (OR (FetchMethod (Class obj% ) - 'action) - (RETURN 'NotSent)) - obj% . args]) + (PROG ((obj% obj)) + (RETURN (DOAPPLY* (OR (FetchMethod (Class obj% ) + 'action) + (RETURN 'NotSent)) + obj% . args]) (PUTPROPS _Process MACRO [X (LET [(obj (CAR X)) - (selector (CADR X)) - (args (CONS 'LIST (CDDR X] - `(ADD.PROCESS (LIST 'ApplyMethod (KWOTE ,obj) - (KWOTE ',selector) - (KWOTE ,args)) - 'NAME - ',selector]) + (selector (CADR X)) + (args (CONS 'LIST (CDDR X] + `(ADD.PROCESS (LIST 'ApplyMethod (KWOTE ,obj) + (KWOTE ',selector) + (KWOTE ,args)) + 'NAME + ',selector]) (PUTPROPS _Process! MACRO [X (LET [(obj (CAR X)) - (selector (CADR X)) - (args (CONS 'LIST (CDDR X] - `(ADD.PROCESS (LIST 'ApplyMethod (KWOTE ,obj) - (KWOTE ,selector) - (KWOTE ,args)) - 'NAME - ',selector]) + (selector (CADR X)) + (args (CONS 'LIST (CDDR X] + `(ADD.PROCESS (LIST 'ApplyMethod (KWOTE ,obj) + (KWOTE ,selector) + (KWOTE ,args)) + 'NAME + ',selector]) (PUTPROPS SENDSUPER MACRO ((obj action . args) - (_Super obj action . args))) + (_Super obj action . args))) ) (DEFINEQ @@ -172,99 +176,72 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988, 1990, 1991 by Venue & Xerox Corporat (PUTPROPS DOAPPLY* MACRO (arg (CONS 'CL:FUNCALL arg))) -(PUTPROPS DoMethod MACRO - [(obj action class . args) - (LET ((obj% obj) - (class% class)) - (if (Class? (OR class% (fetch (OBJECT CLASS) of obj% ))) - then (DOAPPLY* (OR (FetchMethod (OR class% (fetch (OBJECT CLASS) - of obj% )) - action) - (ERROR action "not found for DoMethod")) - obj% . args) - else (ERROR (OR class% (fetch (OBJECT CLASS) of obj% )) - "not a class"]) - -(PUTPROPS FetchMethod MACRO [OPENLAMBDA (classRec selector) - (* smL "17-Sep-85 17:45") - (* Returns the function for selector - or NIL) - (PROG ((pos (LLSH (LOGAND 1023 (LOGXOR (\LOLOC classRec) - (\LOLOC selector))) - 3)) - (class classRec) - meth index supers) - (DECLARE (LOCALVARS . T)) - [COND - ((AND (EQ class (\GETBASEPTR - *Global-Method-Cache* pos) - ) - (EQ selector (\GETBASEPTR (\ADDBASE - *Global-Method-Cache* - 2) - pos))) - (RETURN (\GETBASEPTR (\ADDBASE - *Global-Method-Cache* - 4) - pos] - (SETQ supers (fetch (class supers) of - classRec - )) - LP (COND - ((SETQ index (FindSelectorIndex class - selector)) - (SETQ meth (GetNthMethod class index)) - (\PUTBASEPTR *Global-Method-Cache* pos classRec) - (\PUTBASEPTR (\ADDBASE *Global-Method-Cache* 2) - pos selector) - (\PUTBASEPTR (\ADDBASE *Global-Method-Cache* 4) - pos meth) - (RETURN meth)) - ((SETQ class (pop supers)) - (GO LP)) - (T (RETURN NIL]) +(PUTPROPS DoMethod MACRO [(obj action class . args) + (LET ((obj% obj) + (class% class)) + (if (Class? (OR class% (fetch (OBJECT CLASS) of obj% ))) + then (DOAPPLY* (OR (FetchMethod (OR class% (fetch (OBJECT CLASS) + of obj% )) + action) + (ERROR action "not found for DoMethod")) + obj% . args) + else (ERROR (OR class% (fetch (OBJECT CLASS) of obj% )) + "not a class"]) + +(PUTPROPS FetchMethod MACRO [OPENLAMBDA (classRec selector) + (PROG ((pos (LLSH (LOGAND 1023 (LOGXOR (\LOLOC classRec) + (\LOLOC selector))) + 3)) + (class classRec) + meth index supers) + (DECLARE (LOCALVARS . T)) + [COND + ((AND (EQ class (\GETBASEPTR *Global-Method-Cache* pos)) + (EQ selector (\GETBASEPTR (\ADDBASE + *Global-Method-Cache* 2 + ) + pos))) + (RETURN (\GETBASEPTR (\ADDBASE *Global-Method-Cache* 4) + pos] + (SETQ supers (fetch (class supers) of classRec)) + LP (COND + ((SETQ index (FindSelectorIndex class selector)) + (SETQ meth (GetNthMethod class index)) + (\PUTBASEPTR *Global-Method-Cache* pos classRec) + (\PUTBASEPTR (\ADDBASE *Global-Method-Cache* 2) + pos selector) + (\PUTBASEPTR (\ADDBASE *Global-Method-Cache* 4) + pos meth) + (RETURN meth)) + ((SETQ class (pop supers)) + (GO LP)) + (T (RETURN NIL]) (PUTPROPS FindSelectorIndex MACRO [OPENLAMBDA (classrec selector) - (PROG NIL - - (* Prog is only so one can bomb out in case of NIL selectors of class) - - (RETURN (\FindEntryIndex - selector - (OR (fetch (class selectors) - of classrec) - (RETURN]) + (PROG NIL + (RETURN (\FindEntryIndex selector + (OR (fetch (class selectors) of classrec) + (RETURN]) (PUTPROPS GetNthMethod MACRO [OPENLAMBDA (classrec n) - (LET ((meths (fetch (class methods) of classrec)) - ) - (COND - ((LISTP meths) - (GetNth meths n)) - (T (\GetNthEntry meths n]) - -(PUTPROPS MapSupersForm? MACRO ((mappingForm classRec . progArgs) - (* dgb%: "12-JAN-82 14:55") - - (* Maps through a class and its supers in order. - Returns if form has return statement, or NIL when finished %. - form can use class as free variable) - - (PROG (supers (class classRec) . progArgs) - (COND - ((NULL class) - (RETURN NIL))) - (SETQ supers (Supers class)) - LP - mappingForm - (* this is where the substitution - goes) - ON (COND - ((SETQ class (pop supers)) - (* If there is a Super, iterate - around the Loop) - (GO LP))) (* Returns NotSetValue if not found) - (RETURN NotSetValue)))) + (LET ((meths (fetch (class methods) of classrec))) + (COND + ((LISTP meths) + (GetNth meths n)) + (T (\GetNthEntry meths n]) + +(PUTPROPS MapSupersForm? MACRO ((mappingForm classRec . progArgs) + (PROG (supers (class classRec) . progArgs) + (COND + ((NULL class) + (RETURN NIL))) + (SETQ supers (Supers class)) + LP + mappingForm + ON (COND + ((SETQ class (pop supers)) + (GO LP))) + (RETURN NotSetValue)))) ) @@ -275,184 +252,167 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988, 1990, 1991 by Venue & Xerox Corporat (RPAQ? *Compile-Local-Message-Cache* T) (DEFOPTIMIZER _ (object selector &REST args) - [if (AND *Compile-Local-Message-Cache* *BYTECOMPILER-IS-EXPANDING*) - then `(LET [(/\obj/\ ,object) - (*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT ( + [if (AND *Compile-Local-Message-Cache* *BYTECOMPILER-IS-EXPANDING*) + then `(LET [(/\obj/\ ,object) + (*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT ( \Make-Method-Cache-Entry - ] - (DECLARE (LOCALVARS /\obj/\ *LOOPS-INLINE-METHOD-CACHE*)) - (LOOPS-FUNCALL (COND - ((AND (Object? /\obj/\) - (EQ (\GETBASEPTR - *LOOPS-INLINE-METHOD-CACHE* - 0) - (fetch (OBJECT CLASS) - of /\obj/\))) + ] + (DECLARE (LOCALVARS /\obj/\ *LOOPS-INLINE-METHOD-CACHE*)) + (LOOPS-FUNCALL (COND + ((AND (Object? /\obj/\) + (EQ (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 0 + ) + (fetch (OBJECT CLASS) of /\obj/\))) (* ; "A cache hit") - (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2) - ) - (T (* ; "A cache miss") - (Cached-FetchMethodOrHelp - /\obj/\ - ',selector *LOOPS-INLINE-METHOD-CACHE*)) - ) - /\obj/\ - ,@args)) - - (* ;; "`((OPENLAMBDA (/\obj/\ *LOOPS-INLINE-METHOD-CACHE*) (DECLARE (LOCALVARS . T)) (CL:FUNCALL (if (AND (Object? /\obj/\) (EQ (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 0) (fetch (OBJECT CLASS) of /\obj/\))) then ; A cache hit (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2) else ; A cache miss (Cached-FetchMethodOrHelp /\obj/\ ',selector *LOOPS-INLINE-METHOD-CACHE*)) /\obj/\ ,@args)) ,object (LOADTIMECONSTANT (\Make-Method-Cache-Entry)))") - - elseif *BYTECOMPILER-IS-EXPANDING* - then `(LET ((/\obj/\ ,object)) - (DECLARE (LOCALVARS /\obj/\)) - (LOOPS-FUNCALL (FetchMethodOrHelp /\obj/\ - ',selector) - /\obj/\ - ,@args)) - else - (LET* - [(obj (if (LITATOM object) - then object - else (GENSYM))) - [bindings (if (EQ obj object) - then NIL - else `((,obj ,object] - (localVars (for binding in bindings collect (CAR binding] - (if *Compile-Local-Message-Cache* - then - `(LET (,@bindings) - - (* ;; - ",@(if localVars then `((DECLARE (LOCALVARS ,@localVars))) else NIL)") - - (DECLARE (LOCALVARS . T)) - (LOOPS-FUNCALL (LET [(*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT - ( + (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2)) + (T (* ; "A cache miss") + (Cached-FetchMethodOrHelp /\obj/\ + ',selector *LOOPS-INLINE-METHOD-CACHE*))) + /\obj/\ + ,@args)) + + (* ;; "`((OPENLAMBDA (/\obj/\ *LOOPS-INLINE-METHOD-CACHE*) (DECLARE (LOCALVARS . T)) (CL:FUNCALL (if (AND (Object? /\obj/\) (EQ (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 0) (fetch (OBJECT CLASS) of /\obj/\))) then ; A cache hit (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2) else ; A cache miss (Cached-FetchMethodOrHelp /\obj/\ ',selector *LOOPS-INLINE-METHOD-CACHE*)) /\obj/\ ,@args)) ,object (LOADTIMECONSTANT (\Make-Method-Cache-Entry)))") + + elseif *BYTECOMPILER-IS-EXPANDING* + then `(LET ((/\obj/\ ,object)) + (DECLARE (LOCALVARS /\obj/\)) + (LOOPS-FUNCALL (FetchMethodOrHelp /\obj/\ ',selector) + /\obj/\ + ,@args)) + else + (LET* + [(obj (if (LITATOM object) + then object + else (GENSYM))) + [bindings (if (EQ obj object) + then NIL + else `((,obj ,object] + (localVars (for binding in bindings collect (CAR binding] + (if *Compile-Local-Message-Cache* + then + `(LET (,@bindings) + + (* ;; + ",@(if localVars then `((DECLARE (LOCALVARS ,@localVars))) else NIL)") + + (DECLARE (LOCALVARS . T)) + (LOOPS-FUNCALL (LET [(*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT + ( \Make-Method-Cache-Entry - ] + ] (* ;; "This bogus SPECVARS stuff is here to prevent the compiler from thinking that the in-line cache is a quoted constant. Note that (almost) no user code gets called within this binding, so it is pretty safe. (The potential exception is when the user has redefined the FetchMethodOrHelp method).") - (* ;; + (* ;;  "(DECLARE (SPECVARS *LOOPS-INLINE-METHOD-CACHE*))") - (if [AND (Object? ,obj) - (EQ (\GETBASEPTR - *LOOPS-INLINE-METHOD-CACHE* - 0) - (fetch (OBJECT CLASS) - of ,obj] - then - (* ; "A cache hit") - (\GETBASEPTR - *LOOPS-INLINE-METHOD-CACHE* 2) - else - (* ; "A cache miss") - (Cached-FetchMethodOrHelp - ,obj - ',selector *LOOPS-INLINE-METHOD-CACHE*) - )) - ,obj - ,@args)) - elseif bindings - then `(LET (,@bindings) - (DECLARE (LOCALVARS ,@localVars)) - (LOOPS-FUNCALL (FetchMethodOrHelp ,obj - ',selector) - ,obj - ,@args)) - else `(LOOPS-FUNCALL (FetchMethodOrHelp ,obj ',selector) - ,obj - ,@args]) + (if [AND (Object? ,obj) + (EQ (\GETBASEPTR + *LOOPS-INLINE-METHOD-CACHE* 0) + (fetch (OBJECT CLASS) + of ,obj] + then (* ; "A cache hit") + (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2) + else (* ; "A cache miss") + (Cached-FetchMethodOrHelp ,obj + ',selector *LOOPS-INLINE-METHOD-CACHE* + ))) + ,obj + ,@args)) + elseif bindings + then `(LET (,@bindings) + (DECLARE (LOCALVARS ,@localVars)) + (LOOPS-FUNCALL (FetchMethodOrHelp ,obj ',selector) + ,obj + ,@args)) + else `(LOOPS-FUNCALL (FetchMethodOrHelp ,obj ',selector) + ,obj + ,@args]) (DEFOPTIMIZER SEND (object selector &REST args) - [if (AND *Compile-Local-Message-Cache* *BYTECOMPILER-IS-EXPANDING*) - then `(LET [(/\obj/\ ,object) - (*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT ( + [if (AND *Compile-Local-Message-Cache* *BYTECOMPILER-IS-EXPANDING*) + then `(LET [(/\obj/\ ,object) + (*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT ( \Make-Method-Cache-Entry - ] - (DECLARE (LOCALVARS /\obj/\ *LOOPS-INLINE-METHOD-CACHE* - )) - (LOOPS-FUNCALL (COND - ((AND (Object? /\obj/\) - (EQ (\GETBASEPTR - *LOOPS-INLINE-METHOD-CACHE* - 0) - (fetch (OBJECT CLASS) - of /\obj/\))) + ] + (DECLARE (LOCALVARS /\obj/\ *LOOPS-INLINE-METHOD-CACHE*)) + (LOOPS-FUNCALL (COND + ((AND (Object? /\obj/\) + (EQ (\GETBASEPTR + *LOOPS-INLINE-METHOD-CACHE* 0) + (fetch (OBJECT CLASS) of /\obj/\))) (* ; "A cache hit") - (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* - 2)) - (T - (* ; "A cache miss") - (Cached-FetchMethodOrHelp - /\obj/\ - ',selector - *LOOPS-INLINE-METHOD-CACHE*))) - /\obj/\ - ,@args)) - - (* ;; "`((OPENLAMBDA (/\obj/\ *LOOPS-INLINE-METHOD-CACHE*) (DECLARE (LOCALVARS . T)) (CL:FUNCALL (if (AND (Object? /\obj/\) (EQ (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 0) (fetch (OBJECT CLASS) of /\obj/\))) then ; A cache hit (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2) else ; A cache miss (Cached-FetchMethodOrHelp /\obj/\ ',selector *LOOPS-INLINE-METHOD-CACHE*)) /\obj/\ ,@args)) ,object (LOADTIMECONSTANT (\Make-Method-Cache-Entry)))") - - elseif *BYTECOMPILER-IS-EXPANDING* - then `(LET ((/\obj/\ ,object)) - (DECLARE (LOCALVARS /\obj/\)) - (LOOPS-FUNCALL (FetchMethodOrHelp /\obj/\ - ',selector) - /\obj/\ - ,@args)) - else - (LET* - [(obj (if (LITATOM object) - then object - else (GENSYM))) - [bindings (if (EQ obj object) - then NIL - else `((,obj ,object] - (localVars (for binding in bindings collect (CAR binding] - (if *Compile-Local-Message-Cache* - then - `(LET (,@bindings) - - (* ;; - ",@(if localVars then `((DECLARE (LOCALVARS ,@localVars))) else NIL)") - - (DECLARE (LOCALVARS . T)) - (LOOPS-FUNCALL - (LET [(*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT ( + (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2)) + (T (* ; "A cache miss") + (Cached-FetchMethodOrHelp /\obj/\ + ',selector *LOOPS-INLINE-METHOD-CACHE*) + )) + /\obj/\ + ,@args)) + + (* ;; "`((OPENLAMBDA (/\obj/\ *LOOPS-INLINE-METHOD-CACHE*) (DECLARE (LOCALVARS . T)) (CL:FUNCALL (if (AND (Object? /\obj/\) (EQ (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 0) (fetch (OBJECT CLASS) of /\obj/\))) then ; A cache hit (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2) else ; A cache miss (Cached-FetchMethodOrHelp /\obj/\ ',selector *LOOPS-INLINE-METHOD-CACHE*)) /\obj/\ ,@args)) ,object (LOADTIMECONSTANT (\Make-Method-Cache-Entry)))") + + elseif *BYTECOMPILER-IS-EXPANDING* + then `(LET ((/\obj/\ ,object)) + (DECLARE (LOCALVARS /\obj/\)) + (LOOPS-FUNCALL (FetchMethodOrHelp /\obj/\ ',selector) + /\obj/\ + ,@args)) + else + (LET* + [(obj (if (LITATOM object) + then object + else (GENSYM))) + [bindings (if (EQ obj object) + then NIL + else `((,obj ,object] + (localVars (for binding in bindings collect (CAR binding] + (if *Compile-Local-Message-Cache* + then + `(LET (,@bindings) + + (* ;; + ",@(if localVars then `((DECLARE (LOCALVARS ,@localVars))) else NIL)") + + (DECLARE (LOCALVARS . T)) + (LOOPS-FUNCALL (LET [(*LOOPS-INLINE-METHOD-CACHE* (LOADTIMECONSTANT + ( \Make-Method-Cache-Entry - ] + ] (* ;; "This bogus SPECVARS stuff is here to prevent the compiler from thinking that the in-line cache is a quoted constant. Note that (almost) no user code gets called within this binding, so it is pretty safe. (The potential exception is when the user has redefined the FetchMethodOrHelp method).") - (* ;; "(DECLARE (SPECVARS *LOOPS-INLINE-METHOD-CACHE*))") + (* ;; + "(DECLARE (SPECVARS *LOOPS-INLINE-METHOD-CACHE*))") - (if [AND (Object? ,obj) - (EQ (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 0 - ) - (fetch (OBJECT CLASS) - of ,obj] - then (* ; "A cache hit") - (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* 2) - else (* ; "A cache miss") - (Cached-FetchMethodOrHelp ,obj - ',selector *LOOPS-INLINE-METHOD-CACHE*))) + (if [AND (Object? ,obj) + (EQ (\GETBASEPTR + *LOOPS-INLINE-METHOD-CACHE* 0 + ) + (fetch (OBJECT CLASS) + of ,obj] + then (* ; "A cache hit") + (\GETBASEPTR *LOOPS-INLINE-METHOD-CACHE* + 2) + else (* ; "A cache miss") + (Cached-FetchMethodOrHelp + ,obj + ',selector *LOOPS-INLINE-METHOD-CACHE*))) + ,obj + ,@args)) + elseif bindings + then `(LET (,@bindings) + (DECLARE (LOCALVARS ,@localVars)) + (LOOPS-FUNCALL (FetchMethodOrHelp ,obj ',selector) + ,obj + ,@args)) + else `(LOOPS-FUNCALL (FetchMethodOrHelp ,obj ',selector) ,obj - ,@args)) - elseif bindings - then `(LET (,@bindings) - (DECLARE (LOCALVARS ,@localVars)) - (LOOPS-FUNCALL (FetchMethodOrHelp - ,obj - ',selector) - ,obj - ,@args)) - else `(LOOPS-FUNCALL (FetchMethodOrHelp ,obj ',selector) - ,obj - ,@args]) + ,@args]) (DEFMACRO SubclassResponsibility () (DECLARE (CL:SPECIAL *ArgsOfMethodBeingCompiled* *ClassNameOfMethodOwner* - *SelectorOfMethodBeingCompiled* *SelfOfMethodBeingCompiled*)) + *SelectorOfMethodBeingCompiled* *SelfOfMethodBeingCompiled*)) `(HELPCHECK (CONCAT "Method " ,*SelectorOfMethodBeingCompiled* " of class " ,*ClassNameOfMethodOwner* " needs to be defined in class ") (_ ,*SelfOfMethodBeingCompiled* ClassName))) @@ -1140,61 +1100,36 @@ to try again")) (DECLARE%: EVAL@COMPILE -(PUTPROPS MapSupersForm MACRO ((mappingForm classRec . progArgs) - (* dgb%: "12-JAN-82 14:55") - - (* Maps through a class and its supers in order. - Returns if form has return statement, or NIL when finished %. - form can use class as free variable) - - (PROG (supers (class classRec) . progArgs) - (COND - ((NULL class) - (RETURN NIL))) - (SETQ supers (Supers class)) - LP - mappingForm - (* this is where the substitution - goes) - ON (COND - ((SETQ class (pop supers)) - (* If there is a Super, iterate - around the Loop) - (GO LP))) (* Returns NIL if not found) - (RETURN NIL)))) - -(PUTPROPS MapSupersUnlessBadList MACRO ((badList mappingForm classRec . progArgs) - (* dgb%: "12-JAN-82 14:55") - - (* Maps through a class and its supers in order. - Returns if form has return statement, or NIL when finished %. - form can use class as free variable) - - (PROG (supers (class classRec) . progArgs) - (COND - ((NULL class) - (RETURN NIL))) - (SETQ supers (Supers class)) - LP (* Skip if super is on badList.) - (OR (FMEMB (ClassName class) - badList) - mappingForm) - (* this is where the substitution - goes) - ON (COND - ((SETQ class (pop supers)) - (GO LP))) - (* Returns NIL if not found) - (RETURN NIL)))) +(PUTPROPS MapSupersForm MACRO ((mappingForm classRec . progArgs) + (PROG (supers (class classRec) . progArgs) + (COND + ((NULL class) + (RETURN NIL))) + (SETQ supers (Supers class)) + LP + mappingForm + ON (COND + ((SETQ class (pop supers)) + (GO LP))) + (RETURN NIL)))) + +(PUTPROPS MapSupersUnlessBadList MACRO ((badList mappingForm classRec . progArgs) + (PROG (supers (class classRec) . progArgs) + (COND + ((NULL class) + (RETURN NIL))) + (SETQ supers (Supers class)) + LP (OR (FMEMB (ClassName class) + badList) + mappingForm) + ON (COND + ((SETQ class (pop supers)) + (GO LP))) + (RETURN NIL)))) (PUTPROPS NextSuperClass MACRO [NIL (COND - ((SETQ class (pop supers)) - - (* * This code assumes that LP is a defined PROG label and supers and class are - bound) - (* If there is a Super, iterate - around the Loop) - (GO LP]) + ((SETQ class (pop supers)) + (GO LP]) ) (DEFINEQ @@ -1272,16 +1207,18 @@ to try again")) ) (PUTPROPS LOOPSMETHODS COPYRIGHT ("Venue & Xerox Corporation" 1984 1985 1986 1987 1988 1990 1991)) (DECLARE%: DONTCOPY - (FILEMAP (NIL (6214 7140 (FetchMethodLocally 6224 . 6504) (_Apply 6506 . 7138)) (27276 57840 ( -AddMethod 27286 . 29050) (ApplyMethod 29052 . 30080) (ApplyMethodInTtyProcess 30082 . 30415) ( -DefMethObj 30417 . 32403) (DefineMethod 32405 . 35029) (DeleteMethod 35031 . 37849) (DoFringeMethods -37851 . 38846) (DoMethod 38848 . 39986) (FindSuperMethod 39988 . 40827) (IVFunction 40829 . 41108) ( -BootInstallMethod 41110 . 41500) (FullInstallMethod 41502 . 41729) (InstanceNotMethod 41731 . 42182) ( -LoopsHelp 42184 . 42727) (METH 42729 . 43925) (METHOBJ 43927 . 44427) (MessageAuthor 44429 . 44647) ( -MethName 44649 . 45067) (MoveMethod 45069 . 47344) (RenameMethod 47346 . 49454) (\ApplyMethod 49456 . -49917) (FindLocalMethod 49919 . 50224) (FindSelectorIndex 50226 . 50600) (FetchMethod 50602 . 52043) ( -FetchMethodOrHelp 52045 . 52407) (GetCallerClass 52409 . 53739) (GetNthMethod 53741 . 54033) ( -GetSuperMethod 54035 . 56375) (PutMethodNth 56377 . 56806) (DCM 56808 . 57838)) (57930 58457 ( -Cached-FetchMethodOrHelp 57940 . 58455)) (62040 64464 (GetMethodSource 62050 . 62396) ( -CheckMethodChanged 62398 . 63528) (CheckMethodForm 63530 . 64462))))) + (FILEMAP (NIL (3508 3584 (_ 3508 . 3584)) (3586 3663 (SEND 3586 . 3663)) (3665 3839 (_! 3665 . 3839)) +(3841 3957 (__ 3841 . 3957)) (3959 4348 (_New 3959 . 4348)) (4350 4515 (_IV 4350 . 4515)) (6114 7040 ( +FetchMethodLocally 6124 . 6404) (_Apply 6406 . 7038)) (22976 23396 (SubclassResponsibility 22976 . +23396)) (23397 53961 (AddMethod 23407 . 25171) (ApplyMethod 25173 . 26201) (ApplyMethodInTtyProcess +26203 . 26536) (DefMethObj 26538 . 28524) (DefineMethod 28526 . 31150) (DeleteMethod 31152 . 33970) ( +DoFringeMethods 33972 . 34967) (DoMethod 34969 . 36107) (FindSuperMethod 36109 . 36948) (IVFunction +36950 . 37229) (BootInstallMethod 37231 . 37621) (FullInstallMethod 37623 . 37850) (InstanceNotMethod +37852 . 38303) (LoopsHelp 38305 . 38848) (METH 38850 . 40046) (METHOBJ 40048 . 40548) (MessageAuthor +40550 . 40768) (MethName 40770 . 41188) (MoveMethod 41190 . 43465) (RenameMethod 43467 . 45575) ( +\ApplyMethod 45577 . 46038) (FindLocalMethod 46040 . 46345) (FindSelectorIndex 46347 . 46721) ( +FetchMethod 46723 . 48164) (FetchMethodOrHelp 48166 . 48528) (GetCallerClass 48530 . 49860) ( +GetNthMethod 49862 . 50154) (GetSuperMethod 50156 . 52496) (PutMethodNth 52498 . 52927) (DCM 52929 . +53959)) (54051 54578 (Cached-FetchMethodOrHelp 54061 . 54576)) (56363 58787 (GetMethodSource 56373 . +56719) (CheckMethodChanged 56721 . 57851) (CheckMethodForm 57853 . 58785))))) STOP diff --git a/system/LOOPSMETHODS.DFASL b/system/LOOPSMETHODS.DFASL index aa2e292..c68f3e0 100644 Binary files a/system/LOOPSMETHODS.DFASL and b/system/LOOPSMETHODS.DFASL differ diff --git a/system/LOOPSPRINT b/system/LOOPSPRINT index 1dfb3a9..7ccbe3b 100644 --- a/system/LOOPSPRINT +++ b/system/LOOPSPRINT @@ -1,26 +1,14 @@ -(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10) -(FILECREATED "28-Jun-93 22:43:05" {DSK}RELEASE>loops>2.0>src>LOOPSPRINT.;4 18868 - - changes to%: (ALISTS (PRETTYPRINTMACROS @) - (PRETTYPRINTMACROS _@) - (PRETTYPRINTMACROS _) - (PRETTYPRINTMACROS SEND) - (PRETTYPRINTMACROS _IV) - (PRETTYPRINTMACROS _Proto) - (PRETTYPRINTMACROS _New) - (PRETTYPRINTMACROS _Super) - (PRETTYPRINTMACROS _!) - (PRETTYPRINTMACROS _Process) - (PRETTYPRINTMACROS _Process!) - (PRETTYPRINTMACROS \LOOPS-PRINT-EVAL-MARKER)) - (FNS PrintLoopsEvalAtLoad) - (VARS LOOPSPRINTCOMS) - - previous date%: "14-Jun-93 23:50:45" {DSK}RELEASE>loops>2.0>src>LOOPSPRINT.;3) +(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) + +(FILECREATED "19-Aug-2022 14:47:13" {DSK}larry>loops>system>LOOPSPRINT.;2 18068 + + :CHANGES-TO (VARS LOOPSPRINTCOMS) + + :PREVIOUS-DATE "28-Jun-93 22:43:05" {DSK}larry>loops>system>LOOPSPRINT.;1) (* ; " -Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xerox Corporation. All rights reserved. +Copyright (c) 1983-1988, 1990-1991, 1993 by Venue & Xerox Corporation. ") (PRETTYCOMPRINT LOOPSPRINTCOMS) @@ -45,6 +33,7 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe (FNS PrintClass PrintInstance) (DECLARE%: EVAL@COMPILE DONTCOPY (EXPORT (FUNCTIONS TTYStream?)) + DONTEVAL@LOAD (FILES (LOADCOMP) LOOPSDATATYPES)) (P (DEFPRINT 'class 'PrintClass) @@ -267,7 +256,7 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe (* "END EXPORTED DEFINITIONS") - +DONTEVAL@LOAD (FILESLOAD (LOADCOMP) LOOPSDATATYPES) @@ -300,12 +289,12 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990, 1991, 1993 by Venue & Xe `(RESETLST [if (WINDOWP ,stream) then [RESETSAVE NIL (LIST (FUNCTION WINDOWPROP) - ,stream - 'PROCESS - (WINDOWPROP ,stream 'PROCESS] - (RESETSAVE (TTYDISPLAYSTREAM ,stream)) - (if (NOT (TTY.PROCESSP)) - then (RESETSAVE (TTY.PROCESS (THIS.PROCESS] + ,stream + 'PROCESS + (WINDOWPROP ,stream 'PROCESS] + (RESETSAVE (TTYDISPLAYSTREAM ,stream)) + (if (NOT (TTY.PROCESSP)) + then (RESETSAVE (TTY.PROCESS (THIS.PROCESS] ,@forms)]) (DECLARE%: DOEVAL@COMPILE DONTCOPY @@ -449,17 +438,16 @@ Type OK to ignore and go on.")))))))) (ADDTOVAR PRETTYPRINTYPEMACROS (instance . PPObj)) (ADDTOVAR PRETTYPRINTMACROS (@ . PrettyPrintLoopsForm) - (_@ . PrettyPrintLoopsForm) - (_ . PrettyPrintLoopsForm) - (SEND . PrettyPrintLoopsForm) - (_IV . PrettyPrintLoopsForm) - (_Proto . PrettyPrintLoopsForm) - (_New . PrettyPrintLoopsForm) - (_Super . PrettyPrintLoopsForm) - (_! . PrettyPrintLoopsForm) - (_Process . PrettyPrintLoopsForm) - (_Process! . PrettyPrintLoopsForm) - #,NIL) + (_@ . PrettyPrintLoopsForm) + (_ . PrettyPrintLoopsForm) + (SEND . PrettyPrintLoopsForm) + (_IV . PrettyPrintLoopsForm) + (_Proto . PrettyPrintLoopsForm) + (_New . PrettyPrintLoopsForm) + (_Super . PrettyPrintLoopsForm) + (_! . PrettyPrintLoopsForm) + (_Process . PrettyPrintLoopsForm) + (_Process! . PrettyPrintLoopsForm)) @@ -497,7 +485,7 @@ Type OK to ignore and go on.")))))))) ) (ADDTOVAR HPRINTMACROS (class . HPRINTCLASS) - (instance . HPRINTINSTANCE)) + (instance . HPRINTINSTANCE)) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA $&) @@ -509,11 +497,12 @@ Type OK to ignore and go on.")))))))) (PUTPROPS LOOPSPRINT COPYRIGHT ("Venue & Xerox Corporation" 1983 1984 1985 1986 1987 1988 1990 1991 1993)) (DECLARE%: DONTCOPY - (FILEMAP (NIL (4094 7234 (HashMacro 4104 . 5310) (PPDefault 5312 . 5556) (SETALLSYNTAX 5558 . 6098) ( -$& 6100 . 6677) ($ 6679 . 6844) ($C 6846 . 7232)) (7427 10319 (PrintClass 7437 . 8157) (PrintInstance -8159 . 10317)) (11885 16596 (EntityAddress 11895 . 12012) (PrettyPrintLoopsForm 12014 . 12321) ( -PrettyPrintClass 12323 . 12874) (PrintDefInstances 12876 . 13513) (PrettyPrintInstance 13515 . 13978) -(PrttyClasses 13980 . 14332) (PrttyInstances 14334 . 15191) (PrintLoopsEvalAtLoad 15193 . 15428) (PPC -15430 . 15718) (PPObj 15720 . 16594)) (17617 18492 (HPRINTCLASS 17627 . 17907) (HPRINTINSTANCE 17909 - . 18215) (HREADCLASS 18217 . 18351) (HREADINSTANCE 18353 . 18490))))) + (FILEMAP (NIL (3377 6517 (HashMacro 3387 . 4593) (PPDefault 4595 . 4839) (SETALLSYNTAX 4841 . 5381) ( +$& 5383 . 5960) ($ 5962 . 6127) ($C 6129 . 6515)) (6710 9602 (PrintClass 6720 . 7440) (PrintInstance +7442 . 9600)) (9674 9765 (TTYStream? 9674 . 9765)) (10458 11063 (WITH.PP.OUTPUT 10458 . 11063)) (11167 + 15878 (EntityAddress 11177 . 11294) (PrettyPrintLoopsForm 11296 . 11603) (PrettyPrintClass 11605 . +12156) (PrintDefInstances 12158 . 12795) (PrettyPrintInstance 12797 . 13260) (PrttyClasses 13262 . +13614) (PrttyInstances 13616 . 14473) (PrintLoopsEvalAtLoad 14475 . 14710) (PPC 14712 . 15000) (PPObj +15002 . 15876)) (16821 17696 (HPRINTCLASS 16831 . 17111) (HPRINTINSTANCE 17113 . 17419) (HREADCLASS +17421 . 17555) (HREADINSTANCE 17557 . 17694))))) STOP diff --git a/system/LOOPSPRINT.DFASL b/system/LOOPSPRINT.DFASL index f401450..4b5f04c 100644 Binary files a/system/LOOPSPRINT.DFASL and b/system/LOOPSPRINT.DFASL differ diff --git a/system/LOOPSSITE.DFASL b/system/LOOPSSITE.DFASL index 6a223ad..edb502f 100644 Binary files a/system/LOOPSSITE.DFASL and b/system/LOOPSSITE.DFASL differ diff --git a/system/LOOPSSPEEDUP b/system/LOOPSSPEEDUP index 7e6b293..840a839 100644 --- a/system/LOOPSSPEEDUP +++ b/system/LOOPSSPEEDUP @@ -1,10 +1,10 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED "11-Mar-2022 19:19:08" {DSK}briggs>Projects>loops>src>LOOPSSPEEDUP.;2 13756 +(FILECREATED "19-Aug-2022 14:47:13" {DSK}larry>loops>system>LOOPSSPEEDUP.;2 13729 - :CHANGES-TO (MACROS \GETDTD) + :CHANGES-TO (VARS LOOPSSPEEDUPCOMS) - :PREVIOUS-DATE " 6-Nov-91 16:43:37" {DSK}briggs>Projects>loops>src>LOOPSSPEEDUP.;1) + :PREVIOUS-DATE "11-Mar-2022 19:19:08" {DSK}larry>loops>system>LOOPSSPEEDUP.;1) (* ; " @@ -19,8 +19,8 @@ Copyright (c) 1986-1987, 1990-1991, 2022 by Venue & Xerox Corporation. (* ;;; "Need the following low-level stuff to make a datatype non-garbage-collectable. This saves us the effort of maintaining reference counts") (FNS Make-Not-Reference-Counted) - (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP) - LLGC LLDATATYPE) + (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (SOURCE) + SYSEDIT) (EXPORT (MACROS \GETDTD))) @@ -88,8 +88,8 @@ Copyright (c) 1986-1987, 1990-1991, 2022 by Venue & Xerox Corporation. ) (DECLARE%: EVAL@COMPILE DONTCOPY -(FILESLOAD (LOADCOMP) - LLGC LLDATATYPE) +(FILESLOAD (SOURCE) + SYSEDIT) (* "FOLLOWING DEFINITIONS EXPORTED")(DECLARE%: EVAL@COMPILE @@ -342,7 +342,7 @@ Copyright (c) 1986-1987, 1990-1991, 2022 by Venue & Xerox Corporation. (ADDTOVAR GLOBALVARS *Global-Method-Cache*) (PUTPROPS LOOPSSPEEDUP COPYRIGHT ("Venue & Xerox Corporation" 1986 1987 1990 1991 2022)) (DECLARE%: DONTCOPY - (FILEMAP (NIL (2216 3423 (Make-Not-Reference-Counted 2226 . 3421)) (9871 11360 (FlushIVIndexCache 9881 - . 10625) (\Make-IV-Cache-Entry 10627 . 11358)) (11804 13225 (FlushMethodCache 11814 . 12466) ( -\Make-Method-Cache-Entry 12468 . 13223))))) + (FILEMAP (NIL (2199 3406 (Make-Not-Reference-Counted 2209 . 3404)) (9844 11333 (FlushIVIndexCache 9854 + . 10598) (\Make-IV-Cache-Entry 10600 . 11331)) (11777 13198 (FlushMethodCache 11787 . 12439) ( +\Make-Method-Cache-Entry 12441 . 13196))))) STOP diff --git a/system/LOOPSSPEEDUP.DFASL b/system/LOOPSSPEEDUP.DFASL index c4460ba..9f83522 100644 Binary files a/system/LOOPSSPEEDUP.DFASL and b/system/LOOPSSPEEDUP.DFASL differ diff --git a/system/LOOPSSTRUC b/system/LOOPSSTRUC index 43987fc..045bbd5 100644 --- a/system/LOOPSSTRUC +++ b/system/LOOPSSTRUC @@ -1,10 +1,10 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED " 6-Jul-2022 15:03:42" {DSK}larry>loops>src>LOOPSSTRUC.;2 68244 +(FILECREATED "19-Aug-2022 14:47:13" {DSK}larry>loops>system>LOOPSSTRUC.;2 67241 - :CHANGES-TO (MACROS Class) + :CHANGES-TO (VARS LOOPSSTRUCCOMS) - :PREVIOUS-DATE "15-Jun-93 13:59:37" {DSK}larry>loops>src>LOOPSSTRUC.;1) + :PREVIOUS-DATE " 6-Jul-2022 15:03:42" {DSK}larry>loops>system>LOOPSSTRUC.;1) (* ; " @@ -50,6 +50,9 @@ Copyright (c) 1983-1988, 1990-1991, 1993 by Venue & Xerox Corporation. (FUNCTIONS MakeIVPropDescr WithIVPropDescr WithIVPropDescr!) (MACROS InstGetProp InstPutProp InstRemProp) (MACROS ExtractRealValue)) + DONTEVAL@LOAD + (FILES (LOADCOMP) + LOOPSDATATYPES) DONTEVAL@COMPILE DOCOPY (INITRECORDS IVPropDescr)) (* ;; "Access macros for classes and the like") @@ -313,6 +316,10 @@ Copyright (c) 1983-1988, 1990-1991, 1993 by Venue & Xerox Corporation. (* "END EXPORTED DEFINITIONS") +DONTEVAL@LOAD + +(FILESLOAD (LOADCOMP) + LOOPSDATATYPES) DONTEVAL@COMPILE DOCOPY ) @@ -346,13 +353,8 @@ DONTEVAL@COMPILE DOCOPY (PUTPROPS ClassVariables MACRO ((self) (APPEND (fetch (class cvNames) of self)))) -(PUTPROPS FetchCIVDescr MACRO [(self varName) (* dgb%: "25-JAN-82 15:48") - - (* * Find the description list for the named variable in a class, returning NIL - if none is there.) - - (PROG NIL (* Short circuit GetNth with embedded - RETURN if no index found) +(PUTPROPS FetchCIVDescr MACRO [(self varName) + (PROG NIL (RETURN (GetNth (fetch VARDESCRS of self) (OR (FindIndex varName (fetch VARNAMES of self)) @@ -365,18 +367,12 @@ DONTEVAL@COMPILE DOCOPY index]) (PUTPROPS FetchIVDescr MACRO [OPENLAMBDA (self varName) - - (* * Find the IVDescr for the named variable) - (LET (descr (varIndex (FindVarIndex varName self))) (DECLARE (LOCALVARS varIndex descr)) (COND (varIndex (OR (GetVarNth self varIndex) (create IVDescr))) [(SETQ descr (ASSOC varName (fetch otherIVs of self))) - - (* * non standard instance variables are stored on an ALIST in otherIVs) - (OR (CDR descr) (CDR (NCONC1 descr (create IVDescr] ((FIXP varName) @@ -422,10 +418,6 @@ DONTEVAL@COMPILE DOCOPY (NEQ NoValueFound arg))) (PUTPROPS ObjGetProp MACRO [OPENLAMBDA (descr propName) - - (* Called by all fetch fns. Gets value in description list. - Does not check for activeValues.) - (COND ((NULL descr) NotSetValue) @@ -437,10 +429,6 @@ DONTEVAL@COMPILE DOCOPY (RETURN (CADR tail] finally (RETURN NotSetValue]) (PUTPROPS ObjPutProp MACRO (OPENLAMBDA (descr propName value) - - (* * Called to put a new value on a decr list by all the Store fns. - Adds property if no value there already.) - (COND ((NULL propName) (replace IVValue of descr with value)) @@ -452,10 +440,6 @@ DONTEVAL@COMPILE DOCOPY value)))) (PUTPROPS ObjRemProp MACRO [OPENLAMBDA (descr propName) - - (* * descr in an IVPropDescr with fields IVName and IVPropList Removes a property - from that list. RETURNS NIL if not found, propname otherwise) - (LET ((propList (fetch IVPropList of descr))) (if (NULL propList) then NIL @@ -470,12 +454,6 @@ DONTEVAL@COMPILE DOCOPY (RETURN propName]) (PUTPROPS ObjSetValue MACRO [(self varName newValue descr aValue propName type) - - (* Called by anyone who wants to set a value of a variable or property of any - kind. Does the checking for active values. - The argument type is NIL for InstanceVariables, and otherwise is one of CV, - CLASS, METHOD) - (COND ((type? annotatedValue aValue) (_ (fetch annotatedValue of aValue) @@ -1456,17 +1434,17 @@ DONTEVAL@COMPILE DOCOPY (PUTPROPS LOOPSSTRUC COPYRIGHT ("Venue & Xerox Corporation" 1983 1984 1985 1986 1987 1988 1990 1991 1993)) (DECLARE%: DONTCOPY - (FILEMAP (NIL (4843 6411 (Once-Only 4843 . 6411)) (6413 9607 (WithIVValue 6413 . 9607)) (9609 9985 ( -ChangeIVValue 9609 . 9985)) (10261 10453 (MakeIVPropDescr 10261 . 10453)) (10455 10729 ( -WithIVPropDescr 10455 . 10729)) (10731 11103 (WithIVPropDescr! 10731 . 11103)) (23788 24530 ( -GetInitialValue 23788 . 24530)) (24847 33885 (Parse@ 24857 . 26803) (Parse@* 26805 . 27345) ( -ParseAccess 27347 . 30012) (ParseBang 30014 . 31664) (ParseExpr 31666 . 32796) (ParsePut@ 32798 . -33883)) (34185 49103 (CreateEntity 34195 . 34678) (DeleteObjectName 34680 . 36448) ( -FastClassInitialize 36450 . 37878) (GetIVHere 37880 . 38702) (GetValueOnly 38704 . 40665) (GetClassRec - 40667 . 41258) (GetLispClass 41260 . 41785) (GetObjectName 41787 . 42548) (GetObjectRec 42550 . 43125 -) (MakeMixinClass 43127 . 44474) (NameEntity 44476 . 45540) (NewEntity 45542 . 46357) (PutObjectName -46359 . 47671) (PutValueOnly 47673 . 48834) ($! 48836 . 49101)) (51762 67179 (BlankInstance 51772 . -53112) (BootNameObject 53114 . 53535) (FullNameObject 53537 . 53808) (FillInst 53810 . 54615) (FillIVs - 54617 . 55226) (IVSource 55228 . 58278) (ModifyInstance 58280 . 59767) (NewClass 59769 . 61265) ( -NewObject 61267 . 61807) (UpdateClassIVs 61809 . 63741) (UpdateIVDescrs 63743 . 67177))))) + (FILEMAP (NIL (4958 6526 (Once-Only 4958 . 6526)) (6528 9722 (WithIVValue 6528 . 9722)) (9724 10100 ( +ChangeIVValue 9724 . 10100)) (10376 10568 (MakeIVPropDescr 10376 . 10568)) (10570 10844 ( +WithIVPropDescr 10570 . 10844)) (10846 11218 (WithIVPropDescr! 10846 . 11218)) (22785 23527 ( +GetInitialValue 22785 . 23527)) (23844 32882 (Parse@ 23854 . 25800) (Parse@* 25802 . 26342) ( +ParseAccess 26344 . 29009) (ParseBang 29011 . 30661) (ParseExpr 30663 . 31793) (ParsePut@ 31795 . +32880)) (33182 48100 (CreateEntity 33192 . 33675) (DeleteObjectName 33677 . 35445) ( +FastClassInitialize 35447 . 36875) (GetIVHere 36877 . 37699) (GetValueOnly 37701 . 39662) (GetClassRec + 39664 . 40255) (GetLispClass 40257 . 40782) (GetObjectName 40784 . 41545) (GetObjectRec 41547 . 42122 +) (MakeMixinClass 42124 . 43471) (NameEntity 43473 . 44537) (NewEntity 44539 . 45354) (PutObjectName +45356 . 46668) (PutValueOnly 46670 . 47831) ($! 47833 . 48098)) (50759 66176 (BlankInstance 50769 . +52109) (BootNameObject 52111 . 52532) (FullNameObject 52534 . 52805) (FillInst 52807 . 53612) (FillIVs + 53614 . 54223) (IVSource 54225 . 57275) (ModifyInstance 57277 . 58764) (NewClass 58766 . 60262) ( +NewObject 60264 . 60804) (UpdateClassIVs 60806 . 62738) (UpdateIVDescrs 62740 . 66174))))) STOP diff --git a/system/LOOPSSTRUC.DFASL b/system/LOOPSSTRUC.DFASL index b1b00e5..f745666 100644 Binary files a/system/LOOPSSTRUC.DFASL and b/system/LOOPSSTRUC.DFASL differ diff --git a/system/LOOPSUID b/system/LOOPSUID index 533b56e..f5974e6 100644 --- a/system/LOOPSUID +++ b/system/LOOPSUID @@ -1,10 +1,10 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED " 2-Jun-2022 13:44:04" {DSK}tmp>loops>sources>LOOPSUID.;2 17549 +(FILECREATED "19-Aug-2022 14:47:13" {DSK}larry>loops>system>LOOPSUID.;2 17366 - :CHANGES-TO (FNS InitializeUIDs) + :CHANGES-TO (VARS LOOPSUIDCOMS) - :PREVIOUS-DATE "17-Mar-2022 16:22:46" {DSK}tmp>loops>sources>LOOPSUID.;1) + :PREVIOUS-DATE " 2-Jun-2022 13:44:04" {DSK}larry>loops>system>LOOPSUID.;1) (* ; " @@ -41,8 +41,6 @@ Copyright (c) 1984-1988, 1990, 2022 by Venue & Xerox Corporation. (* ;;; "Unpacking UIDs for human consumption") (FNS Unpack-UID ConvertFromRadix64) - (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (SYSLOAD) - MATCH)) (* ;;; "Access UID/instance relation") @@ -327,11 +325,6 @@ DONTEVAL@COMPILE DOCOPY c) 48))) finally (RETURN number]) ) -(DECLARE%: EVAL@COMPILE DONTCOPY - -(FILESLOAD (SYSLOAD) - MATCH) -) @@ -427,9 +420,9 @@ DONTEVAL@COMPILE DOCOPY (ADDTOVAR AROUNDEXITFNS \Loops.AroundExit) (PUTPROPS LOOPSUID COPYRIGHT ("Venue & Xerox Corporation" 1984 1985 1986 1987 1988 1990 2022)) (DECLARE%: DONTCOPY - (FILEMAP (NIL (2510 4036 (HasUID? 2520 . 2843) (Make-UID 2845 . 3394) (UID 3396 . 3799) (UIDP 3801 . -4034)) (4471 9445 (InitializeUIDs 4481 . 8685) (RADIX64NUM 8687 . 9443)) (9501 14483 (Unpack-UID 9511 - . 13912) (ConvertFromRadix64 13914 . 14481)) (14603 16692 (GetObjFromUID 14613 . 14894) (PutObjectUID - 14896 . 15308) (DeleteObjectUID 15310 . 15697) (MapObjectUID 15699 . 15915) (UIDHashBits 15917 . -16292) (UIDEqual 16294 . 16690)) (16969 17383 (\Loops.AroundExit 16979 . 17381))))) + (FILEMAP (NIL (2399 3925 (HasUID? 2409 . 2732) (Make-UID 2734 . 3283) (UID 3285 . 3688) (UIDP 3690 . +3923)) (4360 9334 (InitializeUIDs 4370 . 8574) (RADIX64NUM 8576 . 9332)) (9390 14372 (Unpack-UID 9400 + . 13801) (ConvertFromRadix64 13803 . 14370)) (14420 16509 (GetObjFromUID 14430 . 14711) (PutObjectUID + 14713 . 15125) (DeleteObjectUID 15127 . 15514) (MapObjectUID 15516 . 15732) (UIDHashBits 15734 . +16109) (UIDEqual 16111 . 16507)) (16786 17200 (\Loops.AroundExit 16796 . 17198))))) STOP diff --git a/system/LOOPSUID.DFASL b/system/LOOPSUID.DFASL index 94551e9..e86b79c 100644 Binary files a/system/LOOPSUID.DFASL and b/system/LOOPSUID.DFASL differ diff --git a/system/LOOPSUSERINTERFACE.DFASL b/system/LOOPSUSERINTERFACE.DFASL index 874e469..ab77ea7 100644 Binary files a/system/LOOPSUSERINTERFACE.DFASL and b/system/LOOPSUSERINTERFACE.DFASL differ diff --git a/system/LOOPSUTILITY.DFASL b/system/LOOPSUTILITY.DFASL index 37fc355..259c368 100644 Binary files a/system/LOOPSUTILITY.DFASL and b/system/LOOPSUTILITY.DFASL differ diff --git a/system/LOOPSWINDOW.DFASL b/system/LOOPSWINDOW.DFASL index 5bb61b8..ca773ba 100644 Binary files a/system/LOOPSWINDOW.DFASL and b/system/LOOPSWINDOW.DFASL differ