[squeak-dev] The Trunk: Compiler-eem.483.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Nov 29 21:48:55 UTC 2022
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.483.mcz
==================== Summary ====================
Name: Compiler-eem.483
Author: eem
Time: 29 November 2022, 1:46:01.772575 pm
UUID: 08cfac57-1240-4bff-bfc9-4af67efb8a5f
Ancestors: Compiler-eem.482
Oops! The SistaV1 encoder has been including unnecessarily in the literal frame literals that are encoded in bytecodes (integers and characters in the -32k/32k, 0/64k range). Fix this and recompile.
=============== Diff against Compiler-eem.482 ===============
Item was changed:
----- Method: LiteralNode>>sizeCodeForValue: (in category 'code generation') -----
sizeCodeForValue: encoder
- self reserve: encoder.
^(encoder isSpecialLiteralForPush: key)
ifTrue: [encoder sizePushSpecialLiteral: key]
+ ifFalse:
+ [self reserve: encoder.
+ encoder sizePushLiteral: index]!
- ifFalse: [encoder sizePushLiteral: index]!
Item was changed:
(PackageInfo named: 'Compiler') postscript: '"below, add code to be run after the loading of this package"
+ "recompile any and all SistaV1 compiled methods that refer to special literals. These literals were mistakenly included in the literal frame. saves about 200k bytes in a normal 64-bit Squeak image"
+ | e nm |
+ e := EncoderForSistaV1 new.
+ nm := 0.
+ ''Recompiling''
+ displayProgressFrom: 1
+ to: CompiledMethod instanceCount
+ during:
+ [:bar|
+ self systemNavigation allSelect:
+ [:m| | r |
+ bar value: (nm := nm + 1).
+ m encoderClass == EncoderForSistaV1 ifTrue:
+ [
+ r := false.
+ m codeLiteralsDo:
+ [:cl|
+ cl literalsDo: [:l| (e isSpecialLiteralForPush: l) ifTrue: [r := true]]].
+ r ifTrue:
+ [nm := nm + 1.
+ m methodClass recompile: m selector]].
+ false]]'!
- "Recompile senders of caseOf:"
- self systemNavigation allSelectorsAndMethodsDo: [ :behavior :selector :method |
- (method hasLiteral: #caseOf:)
- ifTrue: [behavior recompile: selector]].
-
- "Treat non-breaking space (16ra0) as delimiter in parser/scanner (Compiler-ct.473)."
- Scanner initialize.'!
More information about the Squeak-dev
mailing list
|