32 |
32 |
33 ObjectMemory comment:' |
33 ObjectMemory comment:' |
34 COPYRIGHT (c) 1992 by Claus Gittinger |
34 COPYRIGHT (c) 1992 by Claus Gittinger |
35 All Rights Reserved |
35 All Rights Reserved |
36 |
36 |
37 $Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.55 1995-09-14 23:22:26 claus Exp $ |
37 $Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.56 1995-09-17 17:56:54 claus Exp $ |
38 '! |
38 '! |
39 |
39 |
40 !ObjectMemory class methodsFor:'documentation'! |
40 !ObjectMemory class methodsFor:'documentation'! |
41 |
41 |
42 copyright |
42 copyright |
2842 |
2842 |
2843 |modules| |
2843 |modules| |
2844 |
2844 |
2845 modules := IdentityDictionary new. |
2845 modules := IdentityDictionary new. |
2846 self allBinaryModulesDo:[:entry | |
2846 self allBinaryModulesDo:[:entry | |
2847 |id name type libName subModuleName module dynamic infoRec pathName| |
2847 |id name type libName subModuleName module dynamic infoRec pathName |
|
2848 typeName nameString| |
2848 |
2849 |
2849 id := entry at:1. |
2850 id := entry at:1. |
2850 subModuleName := (entry at:2) asSymbol. |
2851 subModuleName := (entry at:2) asSymbol. |
2851 libName := (entry at:4). |
2852 libName := (entry at:4). |
2852 |
2853 |
2853 id > 0 ifTrue:[ |
2854 id > 0 ifTrue:[ |
2854 pathName := ObjectFileLoader pathNameFromID:id. |
2855 pathName := ObjectFileLoader pathNameFromID:id. |
2855 dynamic := true. |
2856 dynamic := true. |
2856 name := 'dynamic module ' , (pathName asFilename baseName). |
2857 typeName := 'dynamic '. |
|
2858 name := pathName asFilename baseName |
2857 ] ifFalse:[ |
2859 ] ifFalse:[ |
2858 dynamic := false. |
2860 dynamic := false. |
|
2861 typeName := 'builIn '. |
2859 pathName := nil. |
2862 pathName := nil. |
2860 libName isNil ifTrue:[ |
2863 libName isNil ifTrue:[ |
2861 name := 'builtIn module ' , subModuleName |
2864 name := subModuleName |
2862 ] ifFalse:[ |
2865 ] ifFalse:[ |
2863 name := 'builtIn classLib ' , libName |
2866 name := libName |
2864 ]. |
2867 ]. |
2865 ]. |
2868 ]. |
|
2869 nameString := typeName. |
|
2870 libName isNil ifTrue:[ |
|
2871 nameString := nameString, 'module ' |
|
2872 ] ifFalse:[ |
|
2873 nameString := nameString, 'classLib ' |
|
2874 ]. |
|
2875 nameString := nameString , name. |
|
2876 |
2866 libName isNil ifTrue:[ |
2877 libName isNil ifTrue:[ |
2867 type := #classObject |
2878 type := #classObject |
2868 ] ifFalse:[ |
2879 ] ifFalse:[ |
2869 type := #classLibrary |
2880 type := #classLibrary |
2870 ]. |
2881 ]. |
2874 ] ifFalse:[ |
2885 ] ifFalse:[ |
2875 infoRec := IdentityDictionary new. |
2886 infoRec := IdentityDictionary new. |
2876 infoRec at:#id put:id. |
2887 infoRec at:#id put:id. |
2877 infoRec at:#classNames put:(Set with:subModuleName). |
2888 infoRec at:#classNames put:(Set with:subModuleName). |
2878 infoRec at:#pathName put:pathName. |
2889 infoRec at:#pathName put:pathName. |
2879 infoRec at:#name put:name. |
2890 infoRec at:#name put:nameString. |
2880 infoRec at:#libraryName put:libName. |
2891 infoRec at:#libraryName put:libName. |
2881 infoRec at:#dynamic put:dynamic. |
2892 infoRec at:#dynamic put:dynamic. |
2882 infoRec at:#type put:type. |
2893 infoRec at:#type put:type. |
2883 modules at:id put:infoRec. |
2894 modules at:id put:infoRec. |
2884 ]. |
2895 ]. |
2887 |
2898 |
2888 " |
2899 " |
2889 ObjectMemory binaryModuleInfo |
2900 ObjectMemory binaryModuleInfo |
2890 " |
2901 " |
2891 |
2902 |
2892 "Modified: 30.8.1995 / 17:29:34 / claus" |
2903 "Modified: 17.9.1995 / 16:33:02 / claus" |
2893 ! |
2904 ! |
2894 |
2905 |
2895 fullBinaryModuleInfo |
2906 fullBinaryModuleInfo |
2896 "return a full collection of moduleInfo entries. |
2907 "return a full collection of moduleInfo entries. |
2897 This returns a dictionary (keys are component names) |
2908 This returns a dictionary (keys are component names) |