Hi 2015-12-19 4:18 GMT+01:00 Eliot Miranda <[email protected]>:
> and used in some copying code to access indexable fields. Chris Muller > found this in some of his Magma code and so we added a pair of new > primitives, primitiveSlotAt and primitiveSlotAtPut that access any slot > within the sequence of named followed by indexable inst vars, avoiding the > primitive failure. So in Squeak Spur instVarAt: now reads: > > instVarAt: index > "Primitive. Answer a fixed variable in an object. The numbering of the > variables > corresponds to the named instance variables, followed by the indexed > instance > variables. Fail if the index is not an Integer or is not the index of a > fixed variable. > Essential. See Object documentation whatIsAPrimitive." > > <primitive: 173 error: ec> > self primitiveFailed > Same code used in Pharo too. I try same test on latest squeak images: Cog: '10,100 per second. 98.8 microseconds per run.' Spur: '7,610 per second. 131 microseconds per run.'
