Call stxCompiledCodeObjectOBJVectorModified() when an object vector section is modified
This is necessary to tell the VM that data changed so it can update its
internal housekeeping data. References to from object vector sections have
to be updated when a GC moves object around.
--- a/CompiledCodeObjectSection.st Thu Apr 21 09:58:19 2016 +0100
+++ b/CompiledCodeObjectSection.st Sun Jun 12 12:12:51 2016 +0100
@@ -160,16 +160,20 @@
goto error;
}
_format = __intVal(__INST(format));
-
- switch ( __intVal( __INST(format) ) ) {
+ switch ( _format ) {
case SectionFormatOBJVector:
{
if ( (_index < 0) || ( _index >= (_size / sizeof(OBJ)) ) ) {
failureReason = @symbol(BadArg1OutOfBounds);
goto error;
}
+ if ( ! __isExternalAddress(__INST(object)) ) {
+ failureReason = @symbol(BadObject);
+ goto error;
+ }
OBJ *vector = (OBJ*)(__externalAddressVal(self));
vector[_index] = value;
+ stxCompiledCodeObjectOBJVectorModified(__externalAddressVal(__INST(object)));
RETURN ( value );
}
break;