Eliot Miranda uploaded a new version of Cog to project VM Maker: http://source.squeak.org/VMMaker/Cog-eem.213.mcz ==================== Summary ==================== Name: Cog-eem.213 Author: eem Time: 14 November 2014, 12:48:53.089 pm UUID: f6547b0d-188b-4b30-8a43-d2c7e78fc45c Ancestors: Cog-eem.212 Eliminate an assignment to a block arg. Update the processor simulator plugins to reflect VMMaker.oscog-eem.933. Include the rwrite script that produced VMMaker.oscog-eem.933. =============== Diff against Cog-eem.212 =============== Item was changed: ----- Method: BochsIA32Plugin>>sizeField: (in category 'alien support') ----- sizeField: rcvr "Answer the first field of rcvr which is assumed to be an Alien of at least 8 bytes" <inline: true> + ^self longAt: rcvr + interpreterProxy baseHeaderSize! - ^self longAt: rcvr + BaseHeaderSize! Item was changed: ----- Method: BochsIA32Plugin>>startOfData: (in category 'alien support') ----- startOfData: rcvr "<Alien oop> ^<Integer>" "Answer the start of rcvr's data. For direct aliens this is the address of the second field. For indirect and pointer aliens it is what the second field points to." <inline: true> ^(self sizeField: rcvr) > 0 + ifTrue: [rcvr + interpreterProxy baseHeaderSize + interpreterProxy bytesPerOop] + ifFalse: [self longAt: rcvr + interpreterProxy baseHeaderSize + interpreterProxy bytesPerOop]! - ifTrue: [rcvr + BaseHeaderSize + BytesPerOop] - ifFalse: [self longAt: rcvr + BaseHeaderSize + BytesPerOop]! Item was added: + ----- Method: CogScripts class>>changeMethodsForBasicConstantSendsIn: (in category 'separate vm scripts') ----- + changeMethodsForBasicConstantSendsIn: aClass + "CogScripts changedMethodsForBasicConstantSendsIn: StackInterpreter" + | receiver rules model env | + rules := RBParseTreeRewriter new. + receiver := ((aClass includesBehavior: ObjectMemory) + or: [aClass includesBehavior: SpurMemoryManager]) + ifTrue: ['self'] + ifFalse: + [#('objectMemory' 'manager' 'interpreterProxy') detect: [:ivn| (aClass instVarIndexFor: ivn ifAbsent: nil) notNil]]. + rules + replace: 'BaseHeaderSize' with: receiver, ' baseHeaderSize'; + replace: 'BytesPerOop' with: receiver, ' bytesPerOop'; + replace: 'BytesPerWord' with: receiver, ' wordSize'; + replace: 'ShiftForWord' with: receiver, ' shiftForWord'. + model := RBNamespace new. + env := RBBrowserEnvironment new forClasses: { aClass }. + env classesAndSelectorsDo: + [ :class :selector | | tree | + tree := class parseTreeFor: selector. + (rules executeTree: tree) ifTrue: + [model compile: rules tree newSource in: class classified: (class whichCategoryIncludesSelector: selector)]]. + + model changes changes do: + [:mr| + aClass + compile: mr source + classified: (aClass whichCategoryIncludesSelector: mr selector) + withStamp: (Utilities changeStamp copyReplaceAll: Utilities authorInitials with: Utilities authorInitials, ' (const to msg rewrite)') + notifying: nil]! Item was changed: ----- Method: GdbARMPlugin>>sizeField: (in category 'alien support') ----- sizeField: rcvr "Answer the first field of rcvr which is assumed to be an Alien of at least 8 bytes" <inline: true> + ^self longAt: rcvr + interpreterProxy baseHeaderSize! - ^self longAt: rcvr + BaseHeaderSize! Item was changed: ----- Method: GdbARMPlugin>>startOfData: (in category 'alien support') ----- startOfData: rcvr "<Alien oop> ^<Integer>" "Answer the start of rcvr's data. For direct aliens this is the address of the second field. For indirect and pointer aliens it is what the second field points to." <inline: true> ^(self sizeField: rcvr) > 0 + ifTrue: [rcvr + interpreterProxy baseHeaderSize + interpreterProxy bytesPerOop] + ifFalse: [self longAt: rcvr + interpreterProxy baseHeaderSize + interpreterProxy bytesPerOop]! - ifTrue: [rcvr + BaseHeaderSize + BytesPerOop] - ifFalse: [self longAt: rcvr + BaseHeaderSize + BytesPerOop]! Item was changed: ----- Method: SpurBootstrap>>prototypeClassNameMetaSelectorMethodDo: (in category 'method prototypes') ----- prototypeClassNameMetaSelectorMethodDo: quaternaryBlock "Evaluate aBlock with class name, class is meta, method and selector. For now find methods in class-side category #'method prototypes'. Scheme could be extended to have different protocols for different Squeak/Pharo versions." self allMethodPrototypes do: + [:methodArg| | method className isMeta | + className := self classNameForPrototypeMethod: (method := methodArg). - [:method| | className isMeta | - className := self classNameForPrototypeMethod: method. (isMeta := className endsWith: 'class') ifTrue: [className := (className allButLast: 5) asSymbol]. (method pragmaAt: #indirect) ifNotNil: [method := (isMeta ifTrue: [(Smalltalk classNamed: className) class] ifFalse: [Smalltalk classNamed: className]) >> method selector]. quaternaryBlock value: className value: isMeta value: (self selectorForPrototypeMethod: method) value: method]! |
Free forum by Nabble | Edit this page |