Status: Accepted Owner: nicolas....@gmail.com Labels: Type-Enhancement Priority-Medium Performance Maintainability
New issue 111 by nicolas....@gmail.com: Use direction aware << and >> instead of bitShift: to avoid useless Runtime test http://code.google.com/p/cog/issues/detail?id=111
As reported in vm-dev mailing list "bitShift: and runtime sign discussion" http://comments.gmane.org/gmane.comp.lang.smalltalk.squeak.vm.devel/9261
in (expr bitShift: shift), some shift have well known direction for the programmer, but the CCodeGenerator is unable to guess if shift is not literal. This results in useless runtime tests. Worse, it can increase the number of C compiler warnings after inlining.
I attach some changes to VMMaker (based on .oscog-eem.241 branch).
For sound, there is a shift sign discussion already, so we can eventually use directed shift too (based on trunk -ul.32 branch).
Attachments: VMMaker_replace_bitShift_with_directedShift.cs 12.1 KB Sound_replace_bitShift_with_directedShift.cs 1.8 KB
Comment #1 on issue 111 by dtlewis...@gmail.com: Use direction aware << and
instead of bitShift: to avoid useless Runtime test
http://code.google.com/p/cog/issues/detail?id=111
The Sound_replace_bitShift_with_directedShift.cs change set is now added to Squeak trunk, package Sound. This makes the ADPCMCodecPlugin updates for any VM (Cog or interpreter) build from an updated Squeak trunk image. This change set should also be added to Pharo.
I added VMMaker_replace_bitShift_with_directedShift.cs to VMMaker trunk for the interpreter VM. This should also be added to the oscog branch of VMMaker for Cog.
Thanks Nicolas
Comment #2 on issue 111 by ryd...@gmail.com: Use direction aware << and >> instead of bitShift: to avoid useless Runtime test http://code.google.com/p/cog/issues/detail?id=111
Thanks, merged the sound-specifics into http://www.squeaksource.com/PharoSound.
Comment #3 on issue 111 by guillermopolito@gmail.com: Use direction aware << and >> instead of bitShift: to avoid useless Runtime test http://code.google.com/p/cog/issues/detail?id=111
Mirrored in https://pharo.fogbugz.com/default.asp?11377#82886
vm-dev@lists.squeakfoundation.org