[Vm-dev] VM Maker: VMMaker.oscog-eem.1879.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jun 2 01:07:00 UTC 2016
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1879.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1879
Author: eem
Time: 1 June 2016, 6:05:04.876264 pm
UUID: 46459a03-d9ee-4422-9c65-f863b50b7992
Ancestors: VMMaker.oscog-eem.1878
Follow-up to VMMaker.oscog-eem.1878:
Check for allocation failure in the LargeIntegersPlugin and fail primitives when space runs out.
=============== Diff against VMMaker.oscog-eem.1878 ===============
Item was changed:
----- Method: LargeIntegersPlugin>>largeInt:growTo: (in category 'oop util') -----
largeInt: aBytesObject growTo: newByteLen
"Attention: this method invalidates all oop's!! Only newBytes is valid at return."
"Does not normalize."
| newBytes oldDigitLen newDigitLen copyLen |
+ self remapOop: aBytesObject in:
+ [newBytes := interpreterProxy
+ instantiateClass: (interpreterProxy fetchClassOf: aBytesObject)
+ indexableSize: newByteLen].
+ newBytes ifNil: [^interpreterProxy primitiveFailFor: PrimErrNoMemory].
- self remapOop: aBytesObject in: [newBytes := interpreterProxy instantiateClass: (interpreterProxy fetchClassOf: aBytesObject)
- indexableSize: newByteLen].
newDigitLen := newByteLen + 3 // 4.
oldDigitLen := self digitSizeOfLargeInt: aBytesObject.
copyLen := oldDigitLen < newDigitLen
ifTrue: [oldDigitLen]
ifFalse: [newDigitLen].
self
cDigitCopyFrom: (self pointerToFirstDigitOfLargeInt: aBytesObject)
to: (self pointerToFirstDigitOfLargeInt: newBytes)
len: copyLen.
^newBytes!
More information about the Vm-dev
mailing list