'From Squeak3.6 of ''6 October 2003'' [latest update: #5526] on 12 November 2003 at 11:18:33 am'! "Change Set: SystDictDeprecatedFix-nk Date: 12 November 2003 Author: Ned Konz This fixes several problems with the recent deprecation of various methods in SystemDictionary: * in several places, methods that had been primitives got changed so they would always call primitiveError. * why bother renaming methods as deprecated, if you move them? Instead, just call the moved method per suggestion. * having done that, there were some deprecated (and moved) methods that were no longer called. We can remove these. * some of the recently deprecated methods sent the recently deprecated #deprecated:explanation: message, which would cause a double Deprecation warning. "! !SystemDictionary methodsFor: 'image, changes name' stamp: 'nk 11/12/2003 10:28'! imageName "Answer the full path name for the current image." "Smalltalk imageName" ^ self deprecated: 'Use SmalltalkImage current imageName' block: [SmalltalkImage current imageName]! ! !SystemDictionary methodsFor: 'image, changes name' stamp: 'nk 11/12/2003 10:29'! imageName: newName "Set the the full path name for the current image. All further snapshots will use this." ^ self deprecated: 'Use SmalltalkImage current imageName' block: [ SmalltalkImage current imageName ]! ! !SystemDictionary methodsFor: 'image, changes name' stamp: 'nk 11/12/2003 10:35'! vmPath "Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented." "Smalltalk vmPath" ^ self deprecated: 'Use SmalltalkImage current vmPath' block: [SmalltalkImage current vmPath]! ! !SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:19'! getSystemAttribute: attributeID "Optional. Answer the string for the system attribute with the given integer ID. Answer nil if the given attribute is not defined on this platform. On platforms that support invoking programs from command lines (e.g., Unix), this mechanism can be used to pass command line arguments to programs written in Squeak. By convention, the first command line argument that is not a VM configuration option is considered a 'document' to be filed in. Such a document can add methods and classes, can contain a serialized object, can include code to be executed, or any combination of these. Currently defined attributes include: -1000...-1 - command line arguments that specify VM options 0 - the full path name for currently executing VM (or, on some platforms, just the path name of the VM's directory) 1 - full path name of this image 2 - a Squeak document to open, if any 3...1000 - command line arguments for Squeak programs 1001 - this platform's operating system 1002 - operating system version 1003 - this platform's processor type 1004 - vm version" ^self deprecated: 'Use SmalltalkImage current getSystemAttribute: attributeID ' block: [SmalltalkImage current getSystemAttribute: attributeID ] ! ! !SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:27'! getVMParameters "Smalltalk getVMParameters" "Answer an Array containing the current values of the VM's internal parameter/metric registers. Each value is stored in the array at the index corresponding to its VM register. (See #vmParameterAt: and #vmParameterAt:put:.)" ^self deprecated: 'Use SmalltalkImage current getVMParameters' block: [SmalltalkImage current getVMParameters] . ! ! !SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:21'! listBuiltinModule: index "Return the name of the n-th builtin module. This list is not sorted!!" ^self deprecated: 'Use SmalltalkImage current listBuiltinModule:' block: [SmalltalkImage current listBuiltinModule: index]! ! !SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:22'! listLoadedModule: index "Return the name of the n-th loaded module. This list is not sorted!!" ^self deprecated: 'Use SmalltalkImage current listLoadedModule:' block: [ SmalltalkImage current listLoadedModule: index ]! ! !SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:33'! unloadModule: aString "Primitive. Unload the given module. This primitive is intended for development only since some platform do not implement unloading of DLL's accordingly. Also, the mechanism for unloading may not be supported on all platforms." ^self deprecated: 'Use SmalltalkImage current unloadModule:' block: [ SmalltalkImage current unloadModule: aString]! ! !SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:34'! vmParameterAt: parameterIndex "parameterIndex is a positive integer corresponding to one of the VM's internal parameter/metric registers. Answer with the current value of that register. Fail if parameterIndex has no corresponding register. VM parameters are numbered as follows: 1 end of old-space (0-based, read-only) 2 end of young-space (read-only) 3 end of memory (read-only) 4 allocationCount (read-only) 5 allocations between GCs (read-write) 6 survivor count tenuring threshold (read-write) 7 full GCs since startup (read-only) 8 total milliseconds in full GCs since startup (read-only) 9 incremental GCs since startup (read-only) 10 total milliseconds in incremental GCs since startup (read-only) 11 tenures of surving objects since startup (read-only) 12-20 specific to the translating VM 21 root table size (read-only) 22 root table overflows since startup (read-only) 23 bytes of extra memory to reserve for VM buffers, plugins, etc. 24 memory headroom when growing object memory (rw) 25 memory threshold above which shrinking object memory (rw)" ^ self deprecated: 'Use SmalltalkImage current vmParameterAt:' block: [SmalltalkImage current vmParameterAt: parameterIndex] ! ! !SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:35'! vmParameterAt: parameterIndex put: newValue "parameterIndex is a positive integer corresponding to one of the VM's internal parameter/metric registers. Store newValue (a positive integer) into that register and answer with the previous value that was stored there. Fail if newValue is out of range, if parameterIndex has no corresponding register, or if the corresponding register is read-only." ^ self deprecated: 'Use SmalltalkImage current vmParameterAt: parameterIndex put: newValue' block: [SmalltalkImage current vmParameterAt: parameterIndex put: newValue] ! ! !SystemDictionary methodsFor: 'profiling' stamp: 'nk 11/12/2003 10:26'! clearProfile "Clear the profile database." ^self deprecated: [ SmalltalkImage current clearProfile] block:'Use SmalltalkImage current clearProfile' ! ! !SystemDictionary methodsFor: 'profiling' stamp: 'nk 11/12/2003 10:27'! dumpProfile "Dump the profile database to a file." ^self deprecated: 'Use SmalltalkImage current dumpProfile' block: [SmalltalkImage current dumpProfile] ! ! !SystemDictionary methodsFor: 'profiling' stamp: 'nk 11/12/2003 10:31'! startProfiling "Start profiling the virtual machine." ^self deprecated: 'Use SmalltalkImage current startProfiling' block: [SmalltalkImage current startProfiling]! ! !SystemDictionary methodsFor: 'profiling' stamp: 'nk 11/12/2003 10:31'! stopProfiling "Stop profiling the virtual machine." ^self deprecated: 'Use SmalltalkImage current stopProfiling' block: [SmalltalkImage current stopProfiling]! ! !SystemDictionary methodsFor: 'snapshot and quit' stamp: 'nk 11/12/2003 10:32'! unbindExternalPrimitives "Primitive. Force all external primitives to be looked up again afterwards. Since external primitives that have not found are bound for fast failure this method will force the lookup of all primitives again so that after adding some plugin the primitives may be found." ^ self deprecated: 'Use SmalltalkImage unbindExternalPrimitives' block: [SmalltalkImage unbindExternalPrimitives]. "Do nothing if the primitive fails for compatibility with older VMs"! ! SystemDictionary removeSelector: #clearProfileDeprecatedPrimitive! SystemDictionary removeSelector: #deprecatedDisablePowerManager:! SystemDictionary removeSelector: #dumpProfileDeprecatedPrimitive! SystemDictionary removeSelector: #fullScreenModeDeprecated:! SystemDictionary removeSelector: #getSystemAttributeDeprecatedPrimitive:! SystemDictionary removeSelector: #getVMParametersDeprecatedPrimitive! SystemDictionary removeSelector: #imageNameDeprecatedPrimitive! SystemDictionary removeSelector: #imageNameDeprecatedPrimitive:! SystemDictionary removeSelector: #listBuiltinModuleDeprecatedPrimitive:! SystemDictionary removeSelector: #listLoadedModuleDeprecatedPrimitive:! SystemDictionary removeSelector: #startProfilingDeprecatedPrimitive! SystemDictionary removeSelector: #stopProfilingDeprecatedPrimitive! SystemDictionary removeSelector: #unbindExternalPrimitivesDeprecatedPrimitive! SystemDictionary removeSelector: #unloadModuleDeprecatedPrimitive:! SystemDictionary removeSelector: #vmParameterAtDeprecatedPrimitive:! SystemDictionary removeSelector: #vmParameterAtDeprecatedPrimitive:put:! SystemDictionary removeSelector: #vmPathDeprecatedPrimitive! Dictionary removeSelector: #inspectFormsWithLabelDeprecated:!