class TreeBuffer
extends TastyBuffer

Constructors

TreeBuffer ( )

Members

[+] private final val ItemsOverOffsets : 2
[+] private var delta : Array [ Int ]
[+] private val initialOffsetSize : Int
[+] private var isRelative : Array [ Boolean ]
[+] private var numOffsets : Int
[+] private var offsets : Array [ Int ]
[+] private val treeAddrs : IdentityHashMap [ Tree, Any ]
[+] def addrOfTree ( tree: Tree ) : Option [ Addr ]
[+] private def adjustDeltas ( ) : Int

Adjust deltas to also take account references that will shrink (and thereby generate additional zeroes that can be skipped) due to previously computed a...

Adjust deltas to also take account references that will shrink (and thereby generate additional zeroes that can be skipped) due to previously computed adjustments.

[+] private def adjustOffsets ( ) : Unit

Adjust all offsets according to previously computed deltas

Adjust all offsets according to previously computed deltas

[+] def adjustTreeAddrs ( ) : Unit
[+] def adjusted ( x: Addr ) : Addr

The address to which x is translated under compression

The address to which x is translated under compression

[+] private def adjustedOffset ( i: Int ) : Addr

The absolute or relative adjusted address at index i of offsets array

The absolute or relative adjusted address at index i of offsets array

[+] def compactify ( ) : Unit

Final assembly, involving the following steps: - compute deltas - adjust deltas until additional savings are < 1% of total - adjust offsets according to...

Final assembly, involving the following steps: - compute deltas - adjust deltas until additional savings are < 1% of total - adjust offsets according to the adjusted deltas - shrink buffer, skipping zeroes.

[+] private def compress ( ) : Int

Compress pickle buffer, shifting bytes to close all skipped zeroes.

Compress pickle buffer, shifting bytes to close all skipped zeroes.

[+] private def computeDeltas ( ) : Unit

Compute all shift-deltas

Compute all shift-deltas

[+] def deltaAt ( at: Addr ) : Int

The amount by which the bytes at the given address are shifted under compression

The amount by which the bytes at the given address are shifted under compression

[+] private def delta_= ( x$1: Array [ Int ] ) : Unit
[+] def fillRef ( at: Addr , target: Addr , relative: Boolean ) : Unit

Fill previously reserved field with a reference

Fill previously reserved field with a reference

[+] private def isRelative_= ( x$1: Array [ Boolean ] ) : Unit
[+] private def keepOffset ( relative: Boolean ) : Unit
[+] private def numOffsets_= ( x$1: Int ) : Unit
[+] private def offset ( i: Int ) : Addr
[+] private def offsets_= ( x$1: Array [ Int ] ) : Unit
[+] def registerTreeAddr ( tree: Tree ) : Addr
[+] def reserveRef ( relative: Boolean ) : Addr

Reserve space for a reference, to be adjusted later

Reserve space for a reference, to be adjusted later

[+] def writeRef ( target: Addr ) : Unit

Write reference right adjusted into freshly reserved field.

Write reference right adjusted into freshly reserved field.