VM Maker: ImageFormat-dtl.43.mcz

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

VM Maker: ImageFormat-dtl.43.mcz

commits-2
 
David T. Lewis uploaded a new version of ImageFormat to project VM Maker:
http://source.squeak.org/VMMaker/ImageFormat-dtl.43.mcz

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

Name: ImageFormat-dtl.43
Author: dtl
Time: 26 July 2020, 7:58:32.916 pm
UUID: 3675b184-d74a-495a-8461-28784e447c8b
Ancestors: ImageFormat-dtl.42

Restore deprecated method prematurely removed in the last commit, still refrenced prior to VMMaker-dtl.417. Fix two minor formatting issues.

=============== Diff against ImageFormat-dtl.42 ===============

Item was changed:
  ----- Method: ImageFileHeader>>readImageVersionFrom:startingAt: (in category 'reading') -----
  readImageVersionFrom: aStream startingAt: imageOffset
  "Look for image format in the next 4 or 8 bytes and set imageFormat. Answer true
  if the header is written in little endian format."
 
  (aStream nextNumber: 4) caseOf:
  {
  [ 16r00001966 "6502" ] -> [ imageFormat := ImageFormat fromInteger: 6502. ^false ] .
  [ 16r66190000 "6502" ] -> [ imageFormat := ImageFormat fromInteger: 6502. ^true ] .
  [ 16r00001968 "6504" ] -> [ imageFormat := ImageFormat fromInteger: 6504. ^false ] .
  [ 16r68190000 "6504" ] -> [ imageFormat := ImageFormat fromInteger: 6504. ^true ] .
  [ 16r00001969 "6505" ] -> [ imageFormat := ImageFormat fromInteger: 6505. ^false ] .
  [ 16r69190000 "6505" ] -> [ imageFormat := ImageFormat fromInteger: 6505. ^true ] .
  [ 16r00001979 "6521" ] -> [ imageFormat := ImageFormat fromInteger: 6521. ^false ] .
  [ 16r79190000 "6521" ] -> [ imageFormat := ImageFormat fromInteger: 6521. ^true ] .
  [ 16rA0090100 "68000" ] -> [ imageFormat := ImageFormat fromInteger: 68000. aStream next: 4. ^true ] .
  [ 16rA2090100 "68002" ] -> [ imageFormat := ImageFormat fromInteger: 68002. aStream next: 4. ^true ] .
  [ 16rA3090100 "68003" ] -> [ imageFormat := ImageFormat fromInteger: 68003. aStream next: 4. ^true ] .
  [ 16rB3090100 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. aStream next: 4. ^true ] .
  [ 16r000109B3 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. aStream next: 4. ^false ] .
  [ 16rB5090100 "68021" ] -> [ imageFormat := ImageFormat fromInteger: 68021. aStream next: 4. ^true ] .
  [ 16r000109B5 "68021" ] -> [ imageFormat := ImageFormat fromInteger: 68021. aStream next: 4. ^false ] .
  [ 16r00000000 ] -> [
  "Standard interpreter VM puts the format number in the first 64 bits for a 64 bit image, so
  the leading 4 bytes are zero in this case. Cog/Spur VMs put the format number in the first
  32 bits for both 32 and 64 bit images."
  (aStream nextNumber: 4) caseOf: {
  [ 16r000109A0 "68000" ] -> [ imageFormat := ImageFormat fromInteger: 68000. ^false ] .
  [ 16r000109A2 "68002" ] -> [ imageFormat := ImageFormat fromInteger: 68002. ^false ] .
  [ 16r000109A3 "68003" ] -> [ imageFormat := ImageFormat fromInteger: 68003. ^false ] .
+ [ 16r000109B3 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. ^false ]
- [ 16r000109B3 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. ^false ] .
  } otherwise: [self error: self asString , ' unrecognized format number']
  ]
  } otherwise: [self error: self asString , ' unrecognized format number']
 
  "ImageFormat versionNumberByteArrays do: [:e |
  Transcript cr; show: e printString , ': ', (ImageFormat fromBytes: e) description]
 
  #[0 0 25 102]: a 32-bit image with no closure support and no native platform float word order requirement (6502)
  #[102 25 0 0]: a 32-bit image with no closure support and no native platform float word order requirement (6502)
  #[0 0 25 104]: a 32-bit image with closure support and no native platform float word order requirement (6504)
  #[104 25 0 0]: a 32-bit image with closure support and no native platform float word order requirement (6504)
  #[0 0 0 0 0 1 9 160]: a 64-bit image with no closure support and no native platform float word order requirement (68000)
  #[160 9 1 0 0 0 0 0]: a 64-bit image with no closure support and no native platform float word order requirement (68000)
  #[0 0 0 0 0 1 9 162]: a 64-bit image with closure support and no native platform float word order requirement (68002)
  #[162 9 1 0 0 0 0 0]: a 64-bit image with closure support and no native platform float word order requirement (68002)
  #[0 0 25 105]: a 32-bit image with closure support and float words stored in native platform order (6505)
  #[105 25 0 0]: a 32-bit image with closure support and float words stored in native platform order (6505)
  #[0 0 0 0 0 1 9 163]: a 64-bit image with closure support and float words stored in native platform order (68003)
  #[163 9 1 0 0 0 0 0]: a 64-bit image with closure support and float words stored in native platform order (68003)
  #[0 0 25 121]: a 32-bit image with closure support and float words stored in native platform order using Spur object format (6521)
  #[121 25 0 0]: a 32-bit image with closure support and float words stored in native platform order using Spur object format (6521)
  #[0 0 0 0 0 1 9 179]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (obsolete) (68019)
  #[179 9 1 0 0 0 0 0]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (obsolete) (68019)
  #[0 0 0 0 0 1 9 181]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (68021)
  #[181 9 1 0 0 0 0 0]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (68021)
  "
  !

Item was changed:
  ----- Method: ImageFormat class>>knownVersionNumbers (in category 'image formats') -----
  knownVersionNumbers
  "Version numbers currently in use or likely to be used (e.g. 64-bit Cog formats)"
 
  "ImageFormat knownVersionNumbers collect: [:e | (ImageFormat fromInteger: e) description]"
 
  ^ ( self baseVersionNumbers, "the original format number variants"
  {
  6505 . "Cog and StackVM"
  68003 . "Cog and StackVM running 64-bit image"
  6521 . "Spur 32 bit object memory"
  7033 . "Spur 32 bit with Sista bytecodes"
  68019 . "Spur 64 bit object memory (early)"
  68021 . "Spur 64 bit object memory"
+ 68533 "Spur 64 bit with Sista bytecodes"
- 68533 . "Spur 64 bit with Sista bytecodes"
  " ... add others here as bits are allocated to represent requirements of other image formats"
  } ) sort.
  !

Item was added:
+ ----- Method: ImageFormat class>>storeCkstatusOnFile: (in category 'ckformat') -----
+ storeCkstatusOnFile: fileName
+ "Deprecated 07-Dec-2012, use storeCkFormatOnFile:"
+ ^self storeCkFormatOnFile: fileName
+ !