Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2676.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2676 Author: eem Time: 24 January 2020, 12:30:52.164482 pm UUID: c506939b-d6f7-44a3-9ea3-97131756aa64 Ancestors: VMMaker.oscog-eem.2675 Merge with VMMaker.oscog-GuillermoPolito.2676 (but don't adopt because the missing timestamps cause lots of noise). Guille: Fix in slang case statement expansion labels. During expansion in case statements, trees are duplicated and expanded. However, labels inside those trees are duplicated using the same name, producing compilation problems due to label conflicts/redefinition. This fix uses #renameLabelsForInliningInto: when expanding case statements to rewrite labels generating unique labels. ================ Fix a comment typo and say bye bye to perform:with:with:with:with:with: which is now in Kernel, at least in Squeak trunk. =============== Diff against VMMaker.oscog-eem.2675 =============== Item was changed: ----- Method: CogARMCompiler>>shiftSetsConditionCodesFor: (in category 'testing') ----- shiftSetsConditionCodesFor: aConditionalJumpOpcode + "check what flags the opcode needs setting - ARM doesn't set V when simply MOVing" - "check what flags the opcdoe needs setting - ARM doesn't set V when simply MOVing" ^aConditionalJumpOpcode caseOf: { [JumpNegative] -> [true]. [JumpZero] -> [true]. [JumpLess] -> [true]. } otherwise: [self halt: 'unhandled opcode in setsConditionCodesFor:'. false]! Item was removed: - ----- Method: Object>>perform:with:with:with:with:with: (in category '*VMMaker-message handling') ----- - perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject - "Send the selector, aSymbol, to the receiver with the given arguments. - Fail if the number of arguments expected by the selector is not five. - Primitive. Optional. See Object documentation whatIsAPrimitive." - - <primitive: 83> - ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }! Item was changed: ----- Method: TCaseStmtNode>>customizeCase:forVar:from:to:in:method:expandedCases: (in category 'transformations') ----- customizeCase: caseParseTree forVar: varName from: firstIndex to: lastIndex in: codeGen method: aTMethod expandedCases: seen "Return a collection of copies of the given parse tree, each of which has the value of the case index substituted for the given variable." | newCases dict newCase | newCases := OrderedCollection new. firstIndex to: lastIndex do: [ :caseIndex | dict := Dictionary new. dict at: varName put: (TConstantNode new setValue: caseIndex). newCase := caseParseTree copy bindVariableUsesIn: dict andConstantFoldIf: true in: codeGen. self processSharedCodeBlocks: newCase forCase: caseIndex in: codeGen method: aTMethod expandedCases: seen. + aTMethod labels addAll: (newCase renameLabelsForInliningInto: aTMethod). newCases addLast: newCase]. ^newCases! Item was changed: ----- Method: TStmtListNode>>renameLabelsForInliningInto: (in category 'inlining support') ----- renameLabelsForInliningInto: aTMethod "TMethod already has a method for this; hijack it..." + | labels method | - | labels | labels := OrderedCollection new. self nodesDo: + [:node| (node isLabel and: [ node label notNil ]) + ifTrue: [labels add: node label]]. + method := TMethod new - [:node| node isLabel ifTrue: [labels add: node label]]. - TMethod new parseTree: self; labels: labels; + renameLabelsForInliningInto: aTMethod. + ^ method labels! - renameLabelsForInliningInto: aTMethod! |
Free forum by Nabble | Edit this page |