[Pkg] The Trunk: Kernel-fbs.780.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jul 5 20:58:46 UTC 2013


Frank Shearar uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.780.mcz

==================== Summary ====================

Name: Kernel-fbs.780
Author: fbs
Time: 5 July 2013, 9:57:39.778 pm
UUID: 081159f7-f3d1-a844-b62d-a5e4c784a296
Ancestors: Kernel-fbs.779

Make Compression augment Kernel, and thus break the cyclic Kernel <-> Compression dependency.

=============== Diff against Kernel-fbs.779 ===============

Item was removed:
- ----- Method: CompiledMethodTrailer>>decodeEmbeddedSourceZip (in category 'decoding') -----
- decodeEmbeddedSourceZip
- 
- 	"data is string with method's source code, compressed using zip compression"
- 	self decodeZip.!

Item was removed:
- ----- Method: CompiledMethodTrailer>>decodeTempsNamesZip (in category 'decoding') -----
- decodeTempsNamesZip
- 
- 	"data is string with method's temporary names, compressed using zip compression"
- 	self decodeZip.!

Item was removed:
- ----- Method: CompiledMethodTrailer>>decodeZip (in category 'private') -----
- decodeZip
- 
- 	"data := <trailer> unzip utf8ToSqueak"
- 	| len bytes |
- 	len := self decodeLengthField.
- 	bytes := ByteArray new: len.
- 	1 to: len do: [ :i |
- 		bytes at: i put: (method at: method size - size + i) ].
- 	
- 	data := (ZipReadStream on: bytes) contents asString convertFromEncoding: 'utf8'!

Item was removed:
- ----- Method: CompiledMethodTrailer>>encodeEmbeddedSourceZip (in category 'encoding') -----
- encodeEmbeddedSourceZip
- 
- 	"data is string with method's source code, encode it using Zip compression method"
- 	self encodeUsingZip
- !

Item was removed:
- ----- Method: CompiledMethodTrailer>>encodeTempsNamesZip (in category 'decoding') -----
- encodeTempsNamesZip
- 
- 	"data is string with method's temporary names, encode it using zip compression"
- 	self encodeUsingZip
- 	
- 	"data is string with method's source code, encoded using qCompress method"
- 
- 
- !

Item was removed:
- ----- Method: CompiledMethodTrailer>>encodeUsingZip (in category 'private') -----
- encodeUsingZip
- 
- 	"data is string, encode it using gzip compression"
- 	| utf8str stream length encodedLength |
- 
- 	self assert: (data isString).
- 	utf8str := data convertToEncoding: 'utf8'.
- 	
- 	stream := ((ZipWriteStream on: (ByteArray new: utf8str size))
- 		nextPutAll: utf8str asByteArray;
- 		close;
- 		encodedStream).
- 		
- 	length := stream position.
- 	encodedLength := self encodeLengthField: length.
- 
- 	stream nextPutAll: encodedLength.
- 	"trailing byte"
- 	stream nextPut: (self kindAsByte + encodedLength size - 1).
- 	
- 	encodedData := stream contents
- 	!



More information about the Packages mailing list