How does #primitiveChangeClassTo: for LargePositiveInteger work
ducasse at iam.unibe.ch
Fri Dec 31 14:40:09 UTC 2004
What I know about primitiveChangeClassTo: is that your new class should
have the same format as the previous one.
Else it is dangerous as mentioned by the comment of the primitive
> Storing a LargePositiveInteger in GOODS with WriteBarrier works,
> whereas when I try to step through the appropriate code in
> WriteBarrier, the primitive fails. Running the following code in a
> workspace gets the same error. Anyone knows why? Thanks.
> x := 123456789012.
> wb := WriteBarrier new.
> x primitiveChangeClassTo: (wb barrierClassForClass: x class) basicNew
More information about the Squeak-dev