[Vm-dev] VM Maker: VMMaker.oscog-eem.981.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Dec 12 18:44:20 UTC 2014
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.981.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.981
Author: eem
Time: 12 December 2014, 10:40:37.174 am
UUID: ecd418ea-aea9-4e0c-8c48-e9a17117abc3
Ancestors: VMMaker.oscog-eem.980
Eliminating warnings in B2DPlugin and the
VMProfileLinuxSupportPlugin.
=============== Diff against VMMaker.oscog-eem.980 ===============
Item was changed:
----- Method: BalloonEnginePlugin>>stepToNextBezierForward:at: (in category 'beziers-simple') -----
stepToNextBezierForward: updateData at: yValue
"Incrementally step to the next scan line in the given bezier update data.
Note: This method has been written so that inlining works, e.g.,
not declaring updateData as 'int*' but casting it on every use."
+ <var: #updateData type:'int *'>
| minY lastX lastY fwDx fwDy |
<inline: true>
+ lastX := updateData at: GBUpdateX.
+ lastY := updateData at: GBUpdateY.
+ fwDx := updateData at: GBUpdateDX.
+ fwDy := updateData at: GBUpdateDY.
- lastX := (self cCoerce: updateData to: 'int*') at: GBUpdateX.
- lastY := (self cCoerce: updateData to: 'int*') at: GBUpdateY.
- fwDx := (self cCoerce: updateData to: 'int*') at: GBUpdateDX.
- fwDy := (self cCoerce: updateData to: 'int*') at: GBUpdateDY.
minY := yValue * 256.
"Step as long as we haven't yet reached minY and also
as long as fwDy is greater than zero thus stepping down.
Note: The test for fwDy should not be necessary in theory
but is a good insurance in practice."
[minY > lastY and:[fwDy >= 0]] whileTrue:[
lastX := lastX + ((fwDx + 16r8000) signedBitShift: -16).
lastY := lastY + ((fwDy + 16r8000) signedBitShift: -16).
+ fwDx := fwDx + (updateData at: GBUpdateDDX).
+ fwDy := fwDy + (updateData at: GBUpdateDDY).
- fwDx := fwDx + ((self cCoerce: updateData to: 'int*') at: GBUpdateDDX).
- fwDy := fwDy + ((self cCoerce: updateData to: 'int*') at: GBUpdateDDY).
].
+ updateData at: GBUpdateX put: lastX.
+ updateData at: GBUpdateY put: lastY.
+ updateData at: GBUpdateDX put: fwDx.
+ updateData at: GBUpdateDY put: fwDy.
- (self cCoerce: updateData to: 'int*') at: GBUpdateX put: lastX.
- (self cCoerce: updateData to: 'int*') at: GBUpdateY put: lastY.
- (self cCoerce: updateData to: 'int*') at: GBUpdateDX put: fwDx.
- (self cCoerce: updateData to: 'int*') at: GBUpdateDY put: fwDy.
^lastX signedBitShift: -8
!
Item was changed:
----- Method: VMProfileLinuxSupportPlugin>>count:num:modules: (in category 'iteration callbacks') -----
count: info num: size modules: ignored
+ <returnTypeC: #int>
<var: #info type: #'struct dl_phdr_info *'>
<var: #size type: #'size_t'>
<var: #ignored type: #'void *'>
numModules := numModules + 1.
^0!
Item was changed:
----- Method: VMProfileLinuxSupportPlugin>>reap:module:names: (in category 'iteration callbacks') -----
reap: info module: size names: ignored
+ <returnTypeC: #int>
| elfModuleName len moduleNameObj GetAttributeString |
<var: #info type: #'struct dl_phdr_info *'>
<var: 'elfModuleName' type: #'const char *'>
<var: #GetAttributeString declareC: 'extern char *GetAttributeString(sqInt)'>
<var: #size type: #'size_t'>
<var: #ignored type: #'void *'>
self touch: GetAttributeString.
elfModuleName := self cCode: 'numModules ? info->dlpi_name : GetAttributeString(0)'.
(elfModuleName isNil
or: [(len := self strlen: elfModuleName) = 0]) ifTrue:
[^0]. "skip the fake linux-gate.so.1"
moduleNameObj := interpreterProxy
instantiateClass: interpreterProxy classString
indexableSize: len.
moduleNameObj = 0 ifTrue:
[primErr := PrimErrNoMemory.
^1]. "stop iteration"
self st: (interpreterProxy arrayValueOf: moduleNameObj)
rn: elfModuleName
cpy: len. "(char *)strncpy()"
interpreterProxy
storePointer: numModules
ofObject: interpreterProxy topRemappableOop
withValue: moduleNameObj.
numModules := numModules + 1.
^0!
Item was changed:
----- Method: VMProfileLinuxSupportPlugin>>reap:module:symlinks: (in category 'iteration callbacks') -----
reap: info module: size symlinks: ignored
"like reap:module:names:, but follows symlinks"
+ <returnTypeC: #int>
| elfModuleName len moduleNameObj GetAttributeString symLinkBuf |
<var: #info type: #'struct dl_phdr_info *'>
<var: 'elfModuleName' type: #'const char *'>
<var: #GetAttributeString declareC: 'extern char *GetAttributeString(sqInt)'>
<var: #symLinkBuf declareC: 'char symLinkBuf[PATH_MAX]'>
<var: #size type: #'size_t'>
<var: #ignored type: #'void *'>
self touch: GetAttributeString.
elfModuleName := self cCode: 'numModules ? info->dlpi_name : GetAttributeString(0)'.
(elfModuleName isNil
or: [(len := self strlen: elfModuleName) = 0]) ifTrue:
[^0]. "skip the fake linux-gate.so.1"
moduleNameObj := interpreterProxy
instantiateClass: interpreterProxy classString
indexableSize: len.
moduleNameObj = 0 ifTrue:
[primErr := PrimErrNoMemory.
^1]. "stop iteration"
self st: (interpreterProxy arrayValueOf: moduleNameObj)
rn: elfModuleName
cpy: len. "(char *)strncpy()"
interpreterProxy
storePointer: numModules
ofObject: interpreterProxy topRemappableOop
withValue: moduleNameObj.
"now dereference the symlink, if it exists"
self str: symLinkBuf cpy: elfModuleName.
(len := self read: elfModuleName li: symLinkBuf nk: #'PATH_MAX') > 0
ifTrue:
[moduleNameObj := interpreterProxy
instantiateClass: interpreterProxy classString
indexableSize: len.
moduleNameObj = 0 ifTrue:
[primErr := PrimErrNoMemory.
^1]. "stop iteration"
self st: (interpreterProxy arrayValueOf: moduleNameObj)
rn: symLinkBuf
cpy: len. "(char *)strncpy()"
interpreterProxy
storePointer: numModules + 1
ofObject: interpreterProxy topRemappableOop
withValue: moduleNameObj]
ifFalse:
[interpreterProxy
storePointer: numModules + 1
ofObject: interpreterProxy topRemappableOop
withValue: interpreterProxy nilObject].
numModules := numModules + 2.
^0!
More information about the Vm-dev
mailing list