VM Maker: VMMaker.oscog-eem.2532.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.2532.mcz

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

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

Name: VMMaker.oscog-eem.2532
Author: eem
Time: 20 March 2019, 11:40:14.864463 am
UUID: 64858b69-2d39-4659-b448-3276ed91bb82
Ancestors: VMMaker.oscog-eem.2531

Allow <inline: #always> to override requirement for inlined function to be functional.  This allows Slang usersa who "know what they're doing" (an oxymoron if ever I saw one) to insist on inlining something non-functional.

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

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 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 isFunctionalIn: aCodeGen)
   and: [m mayBeInlined
   and: [(aCodeGen mayInline: m selector)
   and: [aNode args allSatisfy: [:a| self isSubstitutableNode: a intoMethod: m in: aCodeGen]]]]])
  or: [m checkForRequiredInlinability]]!

Item was added:
+ ----- Method: TMethod>>mustBeInlined (in category 'accessing') -----
+ mustBeInlined
+ ^inline == #always!