[squeak-dev] The Inbox: Kernel-xw.1463.mcz

commits at source.squeak.org commits at source.squeak.org
Wed May 4 13:00:36 UTC 2022


A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-xw.1463.mcz

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

Name: Kernel-xw.1463
Author: xw
Time: 4 May 2022, 9:00:19.605843 pm
UUID: 03cc3269-c236-214d-a9e7-f7ee0c914b3d
Ancestors: Kernel-nice.1462

Add Unicode support and simplify implementation of CompiledMethod>>#getPreambleFrom:at:

=============== Diff against Kernel-nice.1462 ===============

Item was changed:
  ----- Method: CompiledMethod>>getPreambleFrom:at: (in category 'source code management') -----
  getPreambleFrom: aFileStream at: endPosition
+ 	| chunk |
+ 	aFileStream position: endPosition + 2.
+ 	[(chunk := aFileStream backChunk) beginsWith: ']lang['] whileTrue.
+ 	^ chunk!
- 	"This method is an ugly hack. This method assumes that source files have ASCII-compatible encoding and that preambles contain no non-ASCII characters."
- 
- 	| chunkSize chunk |
- 	chunkSize := 160 min: endPosition.
- 	[
- 		| index |
- 		chunk := aFileStream
- 			position: (endPosition - chunkSize + 1 max: 0);
- 			basicNext: chunkSize.
- 		(index := chunk lastIndexOf: $!! startingAt: chunk size) ~= 0 ifTrue: [
- 			^chunk copyFrom: index + 1 to: chunk size ].
- 		chunkSize := chunkSize * 2.
- 		chunkSize <= endPosition ] whileTrue.
- 	^chunk!



More information about the Squeak-dev mailing list