[Vm-dev] preferred version to get 1st indexable field

Martin Kuball martinkuball at web.de
Sat Aug 19 19:19:29 UTC 2006

Am Saturday, 19. August 2006 19:56 schrieb Bert Freudenberg:
> Am 19.08.2006 um 19:25 schrieb Martin Kuball:
> > What is the preferred version to get the pointer to the first
> > indexable field of an indexable object:
> > 	dstStrPointer := interpreterProxy firstIndexableField: string.
> > or
> > 	dstStrPointer := interpreterProxy arrayValueOf: string.
> Depends. #arrayValueOf: works only for non-pointer objects, but is
> faster. #firstIndexableField: handles everything, including mixed
> fixed/indexable field object formats.

So for objects of class String or ByteArray I could use the first one and 
for objects of class Array I would use the second one?


More information about the Vm-dev mailing list