[Vm-dev] VM Maker: VMMaker.oscog-eem.2308.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jan 5 08:20:36 UTC 2018
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2308.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2308
Author: eem
Time: 5 January 2018, 12:19:53.562181 am
UUID: 6c41bece-0d81-4a69-a677-bf6e8f275674
Ancestors: VMMaker.oscog-eem.2307
Slang: Make TParseNode>>comment; do what it implies and accept a string argument, instead of insistign clients know the internal contract is a sequence of comment strings.
Tweak the recent inlining comment change; no need to comment if what's being inlined is a named constant.
=============== Diff against VMMaker.oscog-eem.2307 ===============
Item was changed:
----- Method: TMethod>>tryToInlineMethodExpressionsIn: (in category 'inlining') -----
tryToInlineMethodExpressionsIn: aCodeGen
"Expand any (complete) inline methods sent by this method as receivers or parameters.
Answer if anything was inlined."
| sendsToInline |
sendsToInline := Dictionary new: 100.
aCodeGen
pushScope: declarations
while: [parseTree
nodesDo:
[:node|
(self inlineableFunctionCall: node in: aCodeGen) ifTrue:
[(self inlineFunctionCall: node in: aCodeGen) ifNotNil:
[:replacement|
+ (replacement isConstant
+ and: [replacement isDefine not
+ and: [replacement value isNumber
+ and: [replacement comment isNil]]]) ifTrue:
- (replacement isConstant and: [replacement value isNumber and: [replacement comment isNil]]) ifTrue:
[replacement comment: node selector].
sendsToInline at: node put: replacement]]]
unless: "Don't inline the arguments to asserts to keep the asserts readable"
[:node|
node isSend
and: [node selector == #cCode:inSmalltalk:
or: [aCodeGen isAssertSelector: node selector]]]].
sendsToInline isEmpty ifTrue:
[^false].
self replaceNodesIn: sendsToInline.
^true!
Item was changed:
----- Method: TParseNode>>comment: (in category 'accessing') -----
comment: aComment
+ "Ugh,. comment is a sequence of strings."
+ comment := aComment isString ifTrue: [{aComment}] ifFalse: [aComment]!
-
- comment := aComment !
More information about the Vm-dev
mailing list