Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1134.mcz
==================== Summary ====================
Name: Kernel-eem.1134
Author: eem
Time: 6 January 2018, 3:24:44.111079 pm
UUID: 85369d62-37bb-4b4c-a817-88a6d92097ec
Ancestors: Kernel-eem.1133
More FullBlockClosure support.
=============== Diff against Kernel-eem.1133 ===============
Item was added:
+ ----- Method: ClosureExtractor>>pushFullClosure:numCopied: (in category 'instruction decoding') -----
+ pushFullClosure: aCompiledBlock numCopied: numCopied
+ "Create a BlockClosure corresponding to the closure bytecode
+ and execute the action block with it. The created BlockClosure is only a pseudo value,
+ it is not populated with meaningful context and argument information."
+ | block |
+ block := FullBlockClosure
+ receiver: nil
+ outerContext: currentContext
+ method: aCompiledBlock
+ copiedValues: (Array new: numCopied).
+ currentContext := block asContextWithSender: currentContext.
+ action value: block!
Item was added:
+ ----- Method: CompiledBlock>>methodForDecompile (in category 'decompiling') -----
+ methodForDecompile
+ ^self outerCode methodForDecompile!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.369.mcz
==================== Summary ====================
Name: Compiler-eem.369
Author: eem
Time: 6 January 2018, 1:28:37.915349 pm
UUID: a342cbfd-89fd-435f-af5b-7ad501af8aeb
Ancestors: Compiler-eem.368
reindexingLiteralsDo: acually needs to reset the lliteral nodes, not merely reset them, doh!
Fix a bad slip in the code to size a full block. Juyst because it ends with a returnNilToCaller doesn;t mean we shouldn't generate the other nodes in the block, doh!
=============== Diff against Compiler-eem.368 ===============
Item was changed:
----- Method: BlockNode>>sizeCodeForEvaluatedFullClosureValue: (in category 'code generation') -----
sizeCodeForEvaluatedFullClosureValue: encoder
"The closure value primitives push the arguments and the copied values.
The compiler guarantees that any copied values come before all local temps.
So on full closure activation we need do nothing."
(statements last == NodeNil
and: [self returns not]) ifTrue:
+ [^(self sizeCodeExceptLast: encoder)
+ + encoder sizeReturnNilToCaller].
- [^encoder sizeReturnNilToCaller].
^(self sizeCodeForEvaluatedValue: encoder)
+ (self returns ifTrue: [0] ifFalse: [encoder sizeReturnTopToCaller])!
Item was changed:
----- Method: BytecodeEncoder>>reindexingLiteralsDo: (in category 'code generation') -----
reindexingLiteralsDo: aBlock
| savedNodes saveBlock |
savedNodes := IdentityDictionary new.
+ saveBlock := [:node| savedNodes at: node put: node shallowCopy. node resetForBlockGeneration].
- saveBlock := [:node| savedNodes at: node put: node shallowCopy].
litSet do: saveBlock.
litIndSet do: saveBlock.
selectorSet do: saveBlock.
^aBlock ensure:
[| restoreBlock |
restoreBlock := [:node| node resetFromCopy: (savedNodes at: node)].
litSet do: restoreBlock.
litIndSet do: restoreBlock.
selectorSet do: [:node| node resetFromCopy: (savedNodes at: node ifAbsent: [node])]]!
Item was added:
+ ----- Method: LiteralNode>>resetForBlockGeneration (in category 'code generation') -----
+ resetForBlockGeneration
+ "Reset the receiver to an unassigned state such that its index
+ in the encoder's literalStream is as yet to be determined."
+ code := LdLitType negated.
+ index := nil!
Item was added:
+ ----- Method: LiteralVariableNode>>resetForBlockGeneration (in category 'code generation') -----
+ resetForBlockGeneration
+ "Reset the receiver to an unassigned state such that its index
+ in the encoder's literalStream is as yet to be determined."
+ code := LdLitIndType negated.
+ index := nil!
Item was changed:
----- Method: SelectorNode>>resetForBlockGeneration (in category 'code generation') -----
resetForBlockGeneration
+ "Reset the receiver to an unassigned state such that its index
- "Recent the receiver to an unassigned state such that its index
in the encoder's literalStream is as yet to be determined."
+ code := SendType negated.
index := nil!
Item was added:
+ ----- Method: SpecialSelectorNode>>resetForBlockGeneration (in category 'code generation') -----
+ resetForBlockGeneration
+ "Reset the receiver to an unassigned state such that its index
+ in the encoder's literalStream is as yet to be determined."
+ index := nil!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.368.mcz
==================== Summary ====================
Name: Compiler-eem.368
Author: eem
Time: 6 January 2018, 1:00:10.304648 pm
UUID: 3055d203-f94c-47ba-8ea0-69c82d736955
Ancestors: Compiler-eem.367
Better separate SelectorNode and SpecialSelectorNode to avoid SopecialSelectorNode deferring to SelectorNode on super sends. Hence reduce use of the obsolete code variable, makimng SelectorNode>>reserve: more straight-forward and unused in SpecialSelectorNode.
=============== Diff against Compiler-eem.367 ===============
Item was changed:
----- Method: MessageNode>>sizeCodeForValue: (in category 'code generation') -----
sizeCodeForValue: encoder
| total |
+ special > 0 ifTrue:
+ [encoder noteOptimizedSelector: originalSelector.
+ ^self perform: (MacroSizers at: special) with: encoder with: true].
+ receiver == NodeSuper ifTrue:
+ [selector := selector forSuperSend "only necessary for special selectors"].
- special > 0
- ifTrue:
- [encoder noteOptimizedSelector: originalSelector.
- ^self perform: (MacroSizers at: special) with: encoder with: true].
- receiver == NodeSuper
- ifTrue: [selector := selector copy "only necess for splOops"].
total := selector sizeCode: encoder args: arguments size super: receiver == NodeSuper.
+ receiver ifNotNil:
+ [total := total + (receiver sizeCodeForValue: encoder)].
- receiver == nil
- ifFalse: [total := total + (receiver sizeCodeForValue: encoder)].
sizes := arguments collect:
[:arg | | argSize |
argSize := arg sizeCodeForValue: encoder.
total := total + argSize.
argSize].
^total!
Item was changed:
----- Method: SelectorNode>>emitCode:args:encoder:super: (in category 'code generation') -----
emitCode: stack args: nArgs encoder: encoder super: supered
+ code < Send ifTrue:
+ [self internalEncodingError].
stack pop: nArgs.
+ supered
- ^supered
ifTrue:
[(encoder supportsFullBlocks
and: [encoder generatingFullBlock])
ifTrue:
[encoder genPushLiteral: (encoder sharableLitIndex: encoder classEncoding).
encoder genSendDirectedSuper: index numArgs: nArgs]
ifFalse: [encoder genSendSuper: index numArgs: nArgs]]
ifFalse:
+ [encoder genSend: index numArgs: nArgs]!
- [encoder
- genSend: (code < Send ifTrue: [code negated] ifFalse: [index])
- numArgs: nArgs]!
Item was added:
+ ----- Method: SelectorNode>>forSuperSend (in category 'code generation') -----
+ forSuperSend
+ "Answer the receiver or a derivative, suitable for use in a super send.
+ This is overridden by SpecialSelectorNode to return a SelectorNode clone."
+ ^self!
Item was added:
+ ----- Method: SelectorNode>>internalEncodingError (in category 'private') -----
+ internalEncodingError
+ self error: 'with the split between SelectorNode and SpecialSelectorNode code should never be < Send for normal sends.'!
Item was added:
+ ----- Method: SelectorNode>>key:code:index: (in category 'initialize-release') -----
+ key: object code: byte index: idx
+
+ key := object.
+ code := byte.
+ index := idx!
Item was changed:
----- Method: SelectorNode>>reserve: (in category 'code generation') -----
reserve: encoder
"If this is a yet unused literal of type -code, reserve it."
+ index ifNil:
+ [index := encoder sharableLitIndex: key.
+ code := Send]!
- code < 0 ifTrue: [code := self code: (index := encoder sharableLitIndex: key) type: 0 - code]!
Item was added:
+ ----- Method: SelectorNode>>resetForBlockGeneration (in category 'code generation') -----
+ resetForBlockGeneration
+ "Recent the receiver to an unassigned state such that its index
+ in the encoder's literalStream is as yet to be determined."
+ index := nil!
Item was changed:
----- Method: SelectorNode>>sizeCode:args:super: (in category 'code generation') -----
sizeCode: encoder args: nArgs super: supered
self reserve: encoder.
+ code < Send ifTrue:
+ [self internalEncodingError].
+ supered ifFalse:
+ [^encoder sizeSend: index numArgs: nArgs].
+ (encoder supportsFullBlocks
+ and: [encoder generatingFullBlock]) ifTrue:
+ [^(encoder sizePushLiteral: (encoder sharableLitIndex: encoder classEncoding))
+ + (encoder sizeSendDirectedSuper: index numArgs: nArgs)].
+ ^encoder sizeSendSuper: index numArgs: nArgs!
- ^supered
- ifTrue:
- [code < Send "i.e. its a special selector" ifTrue:
- [code := self code: (index := encoder sharableLitIndex: key) type: 5].
- (encoder supportsFullBlocks
- and: [encoder generatingFullBlock])
- ifTrue: [(encoder sizePushLiteral: (encoder sharableLitIndex: encoder classEncoding))
- + (encoder sizeSendDirectedSuper: index numArgs: nArgs)]
- ifFalse: [encoder sizeSendSuper: index numArgs: nArgs]]
- ifFalse:
- [self flag: #yuck. "special selector sends cause this problem"
- encoder
- sizeSend: (code < Send ifTrue: [code negated] ifFalse: [index])
- numArgs: nArgs]!
Item was changed:
----- Method: SpecialSelectorNode>>emitCode:args:encoder:super: (in category 'code generation') -----
emitCode: stack args: nArgs encoder: encoder super: supered
"Generate a special selector send.
+ A super send of a special selector must be handled like a normal send.
+ This is handled in MessageNode>>sizeCodeForValue: by mapping any
+ SpecialSelectorNodes used in super sends into normal SelectorNodes."
+ supered ifTrue: [self invalidSuperSendError].
+ stack pop: nArgs.
+ encoder genSendSpecial: code numArgs: nArgs!
- A super send of a special selector must be handled like a normal send."
- supered
- ifTrue:
- [super emitCode: stack args: nArgs encoder: encoder super: supered]
- ifFalse:
- [stack pop: nArgs.
- encoder genSendSpecial: code numArgs: nArgs]!
Item was added:
+ ----- Method: SpecialSelectorNode>>forSuperSend (in category 'code generation') -----
+ forSuperSend
+ "Answer the receiver or a derivative, suitable for use in a super send."
+
+ "Excuse the code negation nonsense. It is a vestige of a very concise but now
+ obsolete back-end bytecode encoding scheme. We're working on removing it."
+ ^SelectorNode new
+ key: key
+ code: SendType negated
+ index: index!
Item was added:
+ ----- Method: SpecialSelectorNode>>invalidSuperSendError (in category 'private') -----
+ invalidSuperSendError
+ self error: 'special selectors can only be used for ordinary sends'!
Item was changed:
----- Method: SpecialSelectorNode>>sizeCode:args:super: (in category 'code generation') -----
sizeCode: encoder args: nArgs super: supered
"Size a special selector send.
+ A super send of a special selector must be handled like a normal send.
+ This is handled in MessageNode>>sizeCodeForValue: by mapping any
+ SpecialSelectorNodes used in super sends into normal SelectorNodes."
+ supered ifTrue: [self invalidSuperSendError].
+ ^encoder sizeSendSpecial: code numArgs: nArgs!
- A super send of a special selector must be handled like a normal send."
- ^supered
- ifTrue: [super sizeCode: encoder args: nArgs super: supered]
- ifFalse: [encoder sizeSendSpecial: code numArgs: nArgs]!
Eliot Miranda uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-eem.172.mcz
==================== Summary ====================
Name: ReleaseBuilder-eem.172
Author: eem
Time: 5 January 2018, 7:20:47.150059 pm
UUID: 4144895f-5617-4f80-9ab2-593eca77e2ac
Ancestors: ReleaseBuilder-mt.171
Allow the ReleaseBuilder to query if the SistaV1 bytecode set should be the default in a new release.
=============== Diff against ReleaseBuilder-mt.171 ===============
Item was changed:
----- Method: ReleaseBuilder class>>prepareSourceCode (in category 'preparing') -----
prepareSourceCode
"Update code. Remove foreign packages."
MCMcmUpdater defaultUpdateURL: self buildRepository description.
MCMcmUpdater updateMissingPackages: true.
MCMcmUpdater enableUpdatesForAllPackages.
TestCase new ensureInternetConnectionTo: self buildRepository description.
"Flush all caches. If a previous download failed this is often helpful"
MCFileBasedRepository flushAllCaches.
"Save the current default updater, clear the registry, and re-register the current updater"
MCMcmUpdater clearRegistry.
[MCMcmUpdater default doUpdate: false. "non-interactive"]
on: MCEmptyVersion do: [:warning | warning resume].
self
unloadForeignPackages;
checkForDirtyPackages;
loadWellKnownPackages;
+ checkForUndeclaredSymbols;
+ recompileAll!
- checkForUndeclaredSymbols.
-
- Compiler recompileAll.!
Item was added:
+ ----- Method: ReleaseBuilder class>>recompileAll (in category 'scripts - support') -----
+ recompileAll
+
+ (Smalltalk classNamed: #EncoderForSistaV1) ifNotNil:
+ [:sistaBytecodeSet|
+ CompiledCode preferredBytecodeSetEncoderClass ~~ sistaBytecodeSet ifTrue:
+ [(Project uiManager
+ confirm: 'Do you want to make it the default in this release?'
+ orCancel: [false]
+ title: 'The SistaV1 Bytecode Set Is Available') ifTrue:
+ [CompiledCode
+ installSecondaryBytecodeSet: sistaBytecodeSet;
+ preferredBytecodeSetEncoderClass: sistaBytecodeSet]]].
+
+ Compiler recompileAll!