The Trunk: System-dtl.315.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-dtl.315.mcz

commits-2
A new version of System was added to project The Trunk:
http://source.squeak.org/trunk/System-dtl.315.mcz

==================== Summary ====================

Name: System-dtl.315
Author: dtl
Time: 11 April 2010, 12:41:56.123 pm
UUID: d5302a3d-9845-4b90-8277-b95e3ddae7ea
Ancestors: System-ar.314

Add support for optional version identification primitives. Add #vm and #image methods in SystemImage to compliment the existing #os method, and recategorize various methods into method categories for vm, image, and os.

Example usage:

Smalltalk vm interpreterSourceVersion ==> '4.0.3'
Smalltalk vm platformSourceVersion ==> '2188'
Smalltalk vm versionLabel ==> '4.0.3-2188'

Smalltalk image imageFormatVersion ==> 6504
Smalltalk image wordSize ==> 4
Smalltalk image version ==> 'Squeak3.11alpha'

Smalltalk os platformName ==> 'unix'
Smalltalk os osVersion ==> 'linux'
Smalltalk os platformSubtype ==> 'x86_64'
Smalltalk os windowSystemName ==> 'X11'

=============== Diff against System-ar.314 ===============

Item was added:
+ ----- Method: SmalltalkImage>>versionLabel (in category 'vm') -----
+ versionLabel
+ "Answer a string corresponding to the version of virtual machine. This
+ represents the version level of the Smalltalk source code (interpreter
+ and various plugins) that is translated to C by a CCodeGenerator,  in
+ addition to the external platform source code, typically written in C and
+ managed separately for each platform.
+
+ This invokes an optional primitive that may not be available on all virtual
+ machines. See also vmVersion, which answers a string identifying the image
+ from which virtual machine sources were generated."
+
+ "Smalltalk vm versionLabel"
+
+ <primitive: 'primitiveVMVersion'>
+ self notify: 'This virtual machine does not support the optional primitive #primitiveVMVersion' translated.
+ ^''!

Item was added:
+ ----- Method: SmalltalkImage>>vm (in category 'vm') -----
+ vm
+ "Answer the object to query about virtual machine."
+
+ ^self!

Item was added:
+ ----- Method: SmalltalkImage>>image (in category 'image') -----
+ image
+ "Answer the object to query about the current object memory and execution environment."
+
+ ^self!

Item was changed:
+ ----- Method: SmalltalkImage>>version (in category 'image') -----
- ----- Method: SmalltalkImage>>version (in category 'sources, changes log') -----
  version
  "Answer the version of this release."
 
  ^SystemVersion current version!

Item was changed:
+ ----- Method: SmalltalkImage>>wordSize (in category 'image') -----
- ----- Method: SmalltalkImage>>wordSize (in category 'sources, changes log') -----
  wordSize
  "Answer the size in bytes of an object pointer or word in the object memory.
  The value does not change for a given image, but may be modified by a SystemTracer
  when converting the image to another format. The value is cached in WordSize to
  avoid the performance overhead of repeatedly consulting the VM."
 
  "Smalltalk wordSize"
 
  ^ WordSize ifNil: [WordSize := [SmalltalkImage current vmParameterAt: 40] on: Error do: [4]]!

Item was added:
+ ----- Method: SmalltalkImage>>platformSourceVersion (in category 'vm') -----
+ platformSourceVersion
+ "Answer a string corresponding to the version of the external platform source
+ code, typically written in C and managed separately for each platform. This
+ invokes an optional primitive that may not be available on all virtual machines."
+
+ "Smalltalk vm platformSourceVersion"
+
+ <primitive: 'primitivePlatformSourceVersion'>
+ self notify: 'This virtual machine does not support the optional primitive #primitivePlatformSourceVersion' translated.
+ ^''!

Item was added:
+ ----- Method: SmalltalkImage>>interpreterSourceVersion (in category 'vm') -----
+ interpreterSourceVersion
+ "Answer a string corresponding to the version of the interpreter source.
+ This represents the version level of the Smalltalk source code (interpreter
+ and various plugins) that is translated to C by a CCodeGenerator, as distinct
+ from the external platform source code, typically written in C and managed
+ separately for each platform. An optional primitive is invoked that may not
+ be available on all virtual machines."
+
+ "Smalltalk vm interpreterSourceVersion"
+
+ <primitive: 'primitiveInterpreterSourceVersion'>
+ self notify: 'This virtual machine does not support the optional primitive #primitiveInterpreterSourceVersion' translated.
+ ^''!

Item was added:
+ ----- Method: SmalltalkImage>>imageFormatVersion (in category 'image') -----
+ imageFormatVersion
+ "Answer an integer identifying the type of image. The image version number may
+ identify the format of the image (e.g. 32 or 64-bit word size) or specific requirements
+ of the image (e.g. block closure support required). This invokes an optional primitive
+ that may not be available on all virtual machines."
+
+ "Smalltalk image imageFormatVersion"
+
+ <primitive: 'primitiveImageFormatVersion'>
+ self notify: 'This virtual machine does not support the optional primitive #primitiveImageFormatVersion' translated.
+ ^''!