Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog.seperateMarking-eem.3301.mcz
==================== Summary ====================
Name: VMMaker.oscog.seperateMarking-eem.3301 Author: eem Time: 12 January 2023, 12:45:06.067847 pm UUID: 42a7426f-a347-409b-9e2c-911d651d009c Ancestors: VMMaker.oscog.seperateMarking-eem.3300
Given that better forwarding machinery was written over time, neaten StackInterpreter>>pushLiteralVariable: to use it. This is prompted by VMMaker.oscog.seperateMarking-eem.3300.
=============== Diff against VMMaker.oscog.seperateMarking-eem.3298 ===============
Item was changed: ----- Method: StackInterpreter>>pushLiteralVariable: (in category 'stack bytecodes') ----- pushLiteralVariable: literalIndex + | litVar | + "In Spur: + push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals)." + litVar := self followLiteral: literalIndex ofMethod: method. + self internalPush: (objectMemory fetchPointer: ValueIndex ofObject: litVar)! - objectMemory hasSpurMemoryManagerAPI - ifTrue: - [| litVar | - "push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. - The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in - all methods in the stack zone, and the entire method on return, and global variables are relatively - rare; in my work image 8.7% of literals are globals)." - litVar := self literal: literalIndex. - (objectMemory isForwarded: litVar) ifTrue: - [litVar := self unfollow: litVar atIndex: literalIndex]. - self internalPush: - (objectMemory fetchPointer: ValueIndex ofObject: litVar)] - ifFalse: - [self internalPush: - (objectMemory fetchPointer: ValueIndex ofObject: (self literal: literalIndex))]!
Item was removed: - ----- Method: TMethod>>checkForRequiredInlinability (in category 'testing') ----- - checkForRequiredInlinability - "This is used in methods answering inlinability. - Always answer false. But if the receiver is marked as something that must be inlined (inline == #always) raise an error." - (inline == #always and: [complete]) ifTrue: - [self error: 'cannot inline method ', selector, ' marked as <inline: #always>']. - ^false!
Item was added: + ----- Method: TMethod>>checkForRequiredInlinabilityIn: (in category 'testing') ----- + checkForRequiredInlinabilityIn: aMethod + "This is used in methods answering inlinability. + Always answer false. But if the receiver is marked as something that must be inlined (inline == #always) raise an error." + (inline == #always and: [complete]) ifTrue: + [self error: 'cannot inline method ', selector, ' marked as <inline: #always> into: ', aMethod asString]. + ^false!
Item was changed: ----- Method: TMethod>>inlineableFunctionCall:in: (in category 'inlining') ----- inlineableFunctionCall: aNode in: aCodeGen "Answer if the given send node is a call to a 'functional' method--a method whose body is a single return statement of some expression and whose actual parameters can all be directly substituted."
aCodeGen maybeBreakForTestToInline: aNode in: self. aNode isSend ifFalse: [^false]. ((aCodeGen shouldGenerateAsInterpreterProxySend: aNode) or: [aCodeGen isStructSend: aNode]) ifTrue: [^false]. ^(aCodeGen methodNamed: aNode selector) ifNil: [aNode asTransformedConstantPerform ifNil: [self isInlineableConditional: aNode in: aCodeGen] ifNotNil: [:n| self inlineableFunctionCall: n in: aCodeGen]] ifNotNil: [:m| (m ~~ self and: [((m isFunctionalIn: aCodeGen) or: [m mustBeInlined and: [m isComplete]]) and: [m mayBeInlined and: [(aCodeGen mayInline: m selector) and: [aNode args allSatisfy: [:a| self isSubstitutableNode: a intoMethod: m in: aCodeGen]]]]]) + or: [m checkForRequiredInlinabilityIn: self]]! - or: [m checkForRequiredInlinability]]!
Item was changed: ----- Method: TMethod>>inlineableSend:in: (in category 'inlining') ----- inlineableSend: aNode in: aCodeGen "Answer if the given send node is a call to a method that can be inlined."
| m | aCodeGen maybeBreakForTestToInline: aNode in: self. aNode isSend ifFalse: [^false]. m := aCodeGen methodNamed: aNode selector. "nil if builtin or external function" ^m ~= nil and: [m ~~ self and: [m unmodifiedSelector ~= self unmodifiedSelector and: [m mayBeInlined and: [(m isComplete and: [aCodeGen mayInline: m selector]) + or: [m checkForRequiredInlinabilityIn: self]]]]]! - or: [m checkForRequiredInlinability]]]]]!
vm-dev@lists.squeakfoundation.org