Hi In Fuel (bleeding edge), a compiled method can be serialized as a global. Basically, we store the class name and selector, so loading it is straightforward... this can be fine if we suppose there were not any change in the system between save and load time. This can be a huge supposition, but maybe it's acceptable in some uses, for example to "log" exceptions.
Well, actually we can discuss if this is a good approach, but anyway I am interested on how to detect a BIG change, for example the one I show in the following code (which produces a vm crash): | byteArray aClass aClosure materializedClosure | aClass := Object subclass: #A. aClass compileSilently: 'methodWithClosure ^ [ 42 ] '. aClosure := aClass new perform: #methodWithClosure. byteArray := FLSerializer serializeToByteArray: aClosure. aClass compileSilently: 'methodWithClosure ^ 42'. materializedClosure := FLMaterializer materializeFromByteArray: byteArray. materializedClosure value. What can we do to detect this change? - generate a checksum with bytecodes - just compare the size - something else? Thanks, MartÃn
