[Vm-dev] VM Maker: VMMaker-tfel.359.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Mar 30 14:06:01 UTC 2015
Tim Felgentreff uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-tfel.359.mcz
==================== Summary ====================
Name: VMMaker-tfel.359
Author: tfel
Time: 11 March 2015, 1:52:30.984 pm
UUID: ddaf459e-9bc7-a445-99ae-1959ecd29f9b
Ancestors: VMMaker-tfel.358
optimize BitBltSimulator to avoid reinitialization on each call to simulatedCopyBits. Makes it roughly 500x faster on RSqueakVM
=============== Diff against VMMaker-tfel.358 ===============
Item was changed:
BitBltSimulation subclass: #BitBltSimulator
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'VMMaker-InterpreterSimulation'!
+ BitBltSimulator class
+ instanceVariableNames: 'opTable maskTable warpBitShiftTable ditherMatrix4x4 ditherThresholds16 ditherValues16 dither8Lookup isInitialised'!
!BitBltSimulator commentStamp: 'tpr 5/5/2003 12:22' prior: 0!
Provide bitblt support for the vm simulator!
+ BitBltSimulator class
+ instanceVariableNames: 'opTable maskTable warpBitShiftTable ditherMatrix4x4 ditherThresholds16 ditherValues16 dither8Lookup isInitialised'!
Item was added:
+ ----- Method: BitBltSimulator class>>dither8Lookup (in category 'accessing') -----
+ dither8Lookup
+
+ ^ dither8Lookup!
Item was added:
+ ----- Method: BitBltSimulator class>>ditherMatrix4x4 (in category 'accessing') -----
+ ditherMatrix4x4
+
+ ^ ditherMatrix4x4!
Item was added:
+ ----- Method: BitBltSimulator class>>ditherThresholds16 (in category 'accessing') -----
+ ditherThresholds16
+
+ ^ ditherThresholds16!
Item was added:
+ ----- Method: BitBltSimulator class>>ditherValues16 (in category 'accessing') -----
+ ditherValues16
+
+ ^ ditherValues16!
Item was added:
+ ----- Method: BitBltSimulator class>>initialize (in category 'class initialization') -----
+ initialize
+ "self initialize"
+ super initialize.
+ isInitialised := false.
+ !
Item was added:
+ ----- Method: BitBltSimulator class>>isInitialised (in category 'accessing') -----
+ isInitialised
+
+ ^ isInitialised!
Item was added:
+ ----- Method: BitBltSimulator class>>maskTable (in category 'accessing') -----
+ maskTable
+
+ ^ maskTable!
Item was added:
+ ----- Method: BitBltSimulator class>>setInitialised (in category 'accessing') -----
+ setInitialised
+
+ isInitialised := true.!
Item was added:
+ ----- Method: BitBltSimulator class>>warpBitShiftTable (in category 'accessing') -----
+ warpBitShiftTable
+
+ ^ warpBitShiftTable!
Item was changed:
----- Method: BitBltSimulator>>halftoneAt: (in category 'simulation') -----
halftoneAt: idx
+ ^ (halftoneBase + (idx \\ halftoneHeight * 4)) long32At: 0!
- ^ halftoneForm at: (idx \\ halftoneHeight * 4) + 1!
Item was added:
+ ----- Method: BitBltSimulator>>initialiseModule (in category 'initialize-release') -----
+ initialiseModule
+
+ self class isInitialised ifFalse: [| ivars |
+ ivars := #(opTable maskTable warpBitShiftTable ditherMatrix4x4 ditherThresholds16 ditherValues16 dither8Lookup).
+ super initialiseModule.
+ ivars do: [:symbol | self class instVarNamed: symbol put: (self instVarNamed: symbol)].
+ self class setInitialised].
+ opTable := self class opTable.
+ maskTable := self class maskTable.
+ warpBitShiftTable := self class warpBitShiftTable.
+ ditherMatrix4x4 := self class ditherMatrix4x4.
+ ditherThresholds16 := self class ditherThresholds16.
+ ditherValues16 := self class ditherValues16.
+ dither8Lookup := self class dither8Lookup.
+ !
Item was changed:
----- Method: BitBltSimulator>>initializeDitherTables (in category 'simulation') -----
initializeDitherTables
ditherMatrix4x4 := CArrayAccessor on:
#( 0 8 2 10
12 4 14 6
3 11 1 9
15 7 13 5).
ditherThresholds16 := CArrayAccessor on:#(0 2 4 6 8 10 12 14 16).
ditherValues16 := CArrayAccessor on:
#(0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30).
+ dither8Lookup := CArrayAccessor on: (Array new: 4096).!
- dither8Lookup := CArrayAccessor on: (Array new: 4096).
- self initDither8Lookup.!
More information about the Vm-dev
mailing list