Fix problem in transferPointer() that would have become a bug once orphans are implemented. See 4d4f831a3d

This commit is contained in:
David Renshaw 2016-01-12 22:25:35 -05:00
parent 0fecc0e9b4
commit b27c5d685d

View file

@ -342,11 +342,11 @@ final class WireHelpers {
} else {
WirePointer.setKindAndTarget(dstSegment.buffer, dstOffset,
WirePointer.kind(src), srcTargetOffset);
// We can just copy the upper 32 bits.
dstSegment.buffer.putInt(dstOffset * Constants.BYTES_PER_WORD + 4,
srcSegment.buffer.getInt(srcOffset * Constants.BYTES_PER_WORD + 4));
}
// We can just copy the upper 32 bits.
dstSegment.buffer.putInt(dstOffset * Constants.BYTES_PER_WORD + 4,
srcSegment.buffer.getInt(srcOffset * Constants.BYTES_PER_WORD + 4));
} else {
//# Need to create a far pointer. Try to allocate it in the same segment as the source,
//# so that it doesn't need to be a double-far.