Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1139.mcz
==================== Summary ====================
Name: Kernel-eem.1139
Author: eem
Time: 10 January 2018, 5:37:26.591853 pm
UUID: 54bd97b7-0152-4647-b109-78c294afc74e
Ancestors: Kernel-eem.1138
Add CompiledBlock>>pragmaAt:. Make the accessors that defer to the home mehtod use homeMehtod instaed of chaining through outerCode. The stack depth is one less as a result.
=============== Diff against Kernel-eem.1138 ===============
Item was changed:
----- Method: CompiledBlock>>encoderClass (in category 'accessing') -----
encoderClass
"Answer the encoder class that encoded the bytecodes in this method.
The sign flag bit is used by the VM to select a bytecode set. This formulation
may seem odd but this has to be fast, so no property probe unless needed."
^self header >= 0
ifTrue:
[PrimaryBytecodeSetEncoderClass]
ifFalse:
[PrimaryBytecodeSetEncoderClass == SecondaryBytecodeSetEncoderClass
ifTrue: "Support for testing prior to installing another set"
+ [(self homeMethod propertyValueAt: #encoderClass) ifNil: [SecondaryBytecodeSetEncoderClass]]
- [(self outerCode propertyValueAt: #encoderClass) ifNil: [SecondaryBytecodeSetEncoderClass]]
ifFalse:
[SecondaryBytecodeSetEncoderClass]]!
Item was changed:
----- Method: CompiledBlock>>holdsTempNames (in category 'source code management') -----
holdsTempNames
+ ^self homeMethod holdsTempNames!
- ^self outerCode holdsTempNames!
Item was changed:
----- Method: CompiledBlock>>methodClass (in category 'accessing') -----
methodClass
"Answer the class that I am installed in."
+ ^self homeMethod methodClass!
- | outerCodeOrMethodClassAssoc |
- outerCodeOrMethodClassAssoc := self outerCode.
- outerCodeOrMethodClassAssoc isVariableBinding ifTrue:
- [self assert: outerCodeOrMethodClassAssoc value isBehavior.
- ^outerCodeOrMethodClassAssoc value].
- ^outerCodeOrMethodClassAssoc methodClass!
Item was changed:
----- Method: CompiledBlock>>methodForDecompile (in category 'decompiling') -----
methodForDecompile
+ ^self homeMethod methodForDecompile!
- ^self outerCode methodForDecompile!
Item was changed:
----- Method: CompiledBlock>>methodNode (in category 'accessing') -----
methodNode
+ ^ self homeMethod methodNode!
- ^ self outerCode methodNode!
Item was added:
+ ----- Method: CompiledBlock>>pragmaAt: (in category 'accessing-pragmas & properties') -----
+ pragmaAt: aKey
+ "Answer the pragma with selector aKey, or nil if none."
+ ^self homeMethod pragmaAt: aKey!
Item was changed:
----- Method: CompiledBlock>>selector (in category 'accessing') -----
selector
+ ^ self homeMethod selector!
- ^ self outerCode selector!
tim Rowledge uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-tpr.177.mcz
==================== Summary ====================
Name: Files-tpr.177
Author: tpr
Time: 8 January 2018, 2:42:23.914232 pm
UUID: c7c9aa30-635c-40a5-abff-1001a16e85ea
Ancestors: Files-tpr.176
Remove a spurious use of #checkName:fixErrors: that wilfully mangled filenames - it wasn't even the right thing to do since the #newFileNamed: carefully uses it within each path segment.
The writeSourceCode... method is still insane even after this. It looks like it is something left over from the partial i18n era.
See also crazy things like #multiCs.
See also the apparent complete nonsense of the supposed html flag; I can't find any places where actual html is generated and the only effect seems to be the file extension used ?
=============== Diff against Files-tpr.176 ===============
Item was changed:
----- Method: FileDirectory>>writeSourceCodeFrom:baseName:isSt:useHtml: (in category 'utilities') -----
writeSourceCodeFrom: aStream baseName: baseName isSt: stOrCsFlag useHtml: useHtml
"Write the source code from aStream into a file."
| extension converter f fileName |
aStream contents isAsciiString ifTrue: [
stOrCsFlag ifTrue: [
extension := (FileDirectory dot, FileStream st).
] ifFalse: [
extension := (FileDirectory dot, FileStream cs).
].
converter := MacRomanTextConverter new.
] ifFalse: [
stOrCsFlag ifTrue: [
extension := (FileDirectory dot, FileStream st "multiSt").
] ifFalse: [
extension := (FileDirectory dot, FileStream cs "multiCs").
].
converter := UTF8TextConverter new.
].
fileName := useHtml ifTrue: [baseName, '.html'] ifFalse: [baseName, extension].
- fileName := self checkName: fileName fixErrors: true.
f := self newFileNamed: fileName.
f ifNil: [^ self error: 'Cannot open file'].
(converter isMemberOf: UTF8TextConverter)
ifTrue: [f binary.
UTF8TextConverter writeBOMOn: f].
f text.
f converter: converter.
f nextPutAll: aStream contents.
f close.
!