[ENH][VM] #isArray: instead of Array

Andreas Raab andreas.raab at gmx.de
Fri Dec 5 20:25:35 UTC 2003


Hi Guys,

Enclosed are some worthwhile small changes for the VM. What they do is to
changed hardcoded references to class Array with tests for whether an object
is "array like" meaning that it's an indexable, pointer-containing object,
with no fixed fields (in VM terms: it's format is 2).

Why is this useful? It means that we can finally think about providing
"alternative implementations" for class Array which can be helpful in
various circumstances (such as immutable literal arrays which I always
wanted to have). Before these changes such array-like objects couldn't be
used since the VM would have hardcoded refs to class Array instead of
testing the format. Now this is will actually work.

There are four parts to the changes:
(1) IsArrayVM.cs contains the changes in ObjectMemory+Interpreter
(2) IsArrayVMProxy.cs contains the declaration in InterpreterProxy
(3) IsArrayPlugins.cs contains some fixes in the plugin classes which used
(unneeded) hardcoded refs to class Array
(4) sqVirtualMachine.[h|c] contain the declaration on the VM level

Cheers,
  - Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: IsArrayVM.1.cs
Type: application/octet-stream
Size: 20249 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031205/a4abde64/IsArrayVM.1.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IsArrayVMProxy.2.cs
Type: application/octet-stream
Size: 387 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031205/a4abde64/IsArrayVMProxy.2.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IsArrayPlugins.2.cs
Type: application/octet-stream
Size: 13656 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031205/a4abde64/IsArrayPlugins.2.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqVirtualMachine.h
Type: application/octet-stream
Size: 6041 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031205/a4abde64/sqVirtualMachine.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqVirtualMachine.c
Type: application/octet-stream
Size: 10076 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031205/a4abde64/sqVirtualMachine-0001.obj


More information about the Squeak-dev mailing list