[squeak-dev] Loading ImageFormat package (was: cannot read file format 6521)

stes stes at telenet.be
Fri Apr 3 09:35:48 UTC 2020


OK, thanks for explaining,  I'm learning a lot now, because I am unfamiliar
with such concepts like "Monticello" or "SqueakMap" and so on.

I can confirm that loading the class via "SqueakMap" also works on my 64bit
SPUR vm with Squeak5.3-19431 on Solaris.

What I did was 

  1. Select "SqueakMap Catalog" from the Apps menu
  2. Locate "Squeak distribution -> Squeak" in panel bottom left
  3. Select ImageFormat from the panel top left
  4. it shows when expanding (head) 5.3 5.2 (5.1) (4.6-5.0) (4.4)
  5. I select "Install" for "head"

I get a Transcript (after clicking "Yes" for the panel "This may be
incompatible with your image, do you want to proceed ?") :see transcript
below

After loading the class via SqueakMap in my image, I can browse the class,
and it works.
ImageFormat baseVersionNumbers #(6502 6504 68000 68002 68004)


========== ImageFormat-dtl.19 ==========

fix comment

========== ImageFormat-dtl.39 ==========

Tidy up some explanatory comments in unit test.

>>> ImageFormat-dtl.38 <<<
More unit tests and consistency checks for image format numbers.

>>> ImageFormat-dtl.37 <<<
Identify extended bytecodes for Sista in the image format number. Bit 10
identifies an image that contains extended bytecodes. Thus a 32 bit Spur
image is 6521, with Sista it is 7033, and a 64 bit Spur image is 68021, with
Sista it is 68533.

It is expected that additional bytecode sets can be identified by an
additional field in the image header, probably 32 bits containing two 16 bit
fields,  if both zero then Sista.

Per discussion with Eliot and Bert in a Squeak oversight board meeting
2019-05-15.

>>> ImageFormat-dtl.36 <<<
Let 68004 be a base version number, supporting the 68021 64-bit Spur format.
Base number plus Spur bit plus platform float order bit yields 68021.

68004 + 2r10001 ==> 68021

Restore a unit test that covers 68021format.
Reorganize method categories to clarify bit assignment methods.

Notes: 68004 has not been used in practice but is considered valid. These
changes do not affect the generated ckformat.c program.

>>> ImageFormat-kks.35 <<<
Removed tests for 68004, 68021 formats since 68004 is no longer a base
version number.

>>> ImageFormat-kks.34 <<<
Added support for images whose header begins 512 bytes into the file.
Expanded comments to explain magic file use.

>>> ImageFormat-dtl.33 <<<
Refactor instance creation to allow image header instances to be created
from a stream or array of header field values in addition to the traditional
read from file stream on the image file. Add hooks for hypothetical
primitives to answer header filelds directly from the VM.

>>> ImageFormat-dtl.31 <<<
Fix ckformat for 64 bit Spur, which saves format number in first 4 bytes of
the header, versus 8 bytes for 64 bit V3. Prior version worked by accident
for little endian host using strncmp() check, but failed when correct
memcmp() was used without limiting check to 4 bytes for spur and 8 for V3.

>>> ImageFormat-dtl.30 <<<
Fix declaration of main() in ckformat.c

>>> ImageFormat-dtl.29 <<<
Fix by K K Subbu: Use memcmp instead of strncmp in ckformat to compare byte
arrays.

>>> ImageFormat-dtl.28 <<<
Fix typo, the hypothetical 68003 is a known version number, 68004 is not.

>>> ImageFormat-dtl.27 <<<
Sort the format numbers for more convenient display

>>> ImageFormat-dtl.26 <<<
Bit 17 of the image format number may be used as a test for 64-bit-ness for
both Spur and V3. Add testBit17AsTestFor64BitImages to document this.

The changes in ImageFormat-dtl.20 for format numbers 68019 and 68021 were
missing test support, add it here.

>>> ImageFormat-dtl.25 <<<
Support ImageFileHeader for reading format number from 64 bit Spur.

Fixes this:
  (ImageFormat fromFile: Smalltalk imageName) description
     ==> 'a 64-bit image with closure support and float words stored in
native platform order using Spur object format (68021)'

To do: Need new header reader for the 64 bit Spur files, which differ from 
64 bit V3.

>>> ImageFormat-dtl.24 <<<
Additional magic file updates from Subbu
http://lists.squeakfoundation.org/pipermail/vm-dev/2017-May/025076.html

>>> ImageFormat-dtl.23 <<<
Refactoring and cleaner magic file output by Subbu.

>>> ImageFormat-dtl.22 <<<
K K Subbu updates for magic file generation (vm-dev list)

>>> ImageFormat-dtl.21 <<<
Add ImageFormat class>>unixMagiFileEntries to answer a string that can be
appended to /etc/magic on a Unix system to support the file(1) utility.
Based on magic decode by K K Subbu on vm-dev.

>>> ImageFormat-dtl.20 <<<
Spur:
Resolve the conflict between 32-bit and 64-bit tag assignments.  In 32-bits
we
have 1=even SmallIntegers, 2=Characters, 3=odd SmallIntegers, and in 64-bits
we
had 1=SmallIntegers, 2=Characters, 3=SmallFloats.  Hence we would want
SmallFloat64's identityHash to be 3, which conflicts with 32 bits' odd
SmallIntegers.  Change is for 64-bits to use 1=SmallIntegers, 2=Characters,
4=SmallFloats.  This also means single-bit tests in the Cogit, which
produces
better code, and no scratch registers to hold masked tags.

Hence roll the 64-bit Spur image format version number from 68019 to 68021.

==========  Update completed. ==========



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list