VM Maker: VMMaker.oscog-eem.2306.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2306.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2306.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.2306
Author: eem
Time: 3 January 2018, 4:58:25.861217 pm
UUID: 0c680904-c828-4af4-ad2c-06fe3b7da899
Ancestors: VMMaker.oscog-eem.2305

Slang: Make sure that numeric constant methods inlined through the tryToInlineMethodExpressionsIn: path get commented with their selector.

=============== Diff against VMMaker.oscog-eem.2305 ===============

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 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!