2009/12/20 Marcus Denker <marcus.denker@inria.fr>:
On Dec 20, 2009, at 8:44 PM, Bart Gauquie wrote:
Dear all,
I'm developing code which generates a method content, compiles it and adds it to an existing class. I compile the message using #compile: message: for instance:
In general, everything is limited to a fairly low quantity: number of temps, number of ivars, number of literals.
Especially that the literal frame is limted to some small number (255 or something) can be easily be a problem. (we ran into that already when using bytesurgeon on large existing methods when reifying all sends, for example).
To get around this, place all literals into one (usually array): #( a b c d e ..... ) For instance, the above: self addMMEFrom: 1054@512 to: 1037@504. self addMMEFrom: 651@559 to: 643@579. can be easily replaced by something like: #( (1054 512 1037 504) ..... put as many as you want here.... no limit!!! (651 559 643 579) ) do: [:each | self addMMEFrom: (each first @ each second) to: (each third @ each fourth) ]
    Marcus _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.