[Vm-dev] VM Maker: VMMaker.oscog-nice.2761.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Jun 23 18:25:45 UTC 2020


Le mar. 23 juin 2020 à 19:32, Eliot Miranda <eliot.miranda at gmail.com> a
écrit :

>
> Hi Nicolas,
>
>    on reviewing this code first I really like transformInAssignmentTo: ;
> it's a much nicer design than my hack.  Now, a specific issue...
>
> I see
> TReturnNode>>transformInAssignmentTo: aTVariableNode
> "a return shall not be assigned:
> x := condition ifTrue: [^nil] ifFalse: [2]
> shall be transformed into:
> condition ifTrue: [^nil] ifFalse: [x := 2]"
> ^self
>
> The issue here is that if x is a global variable then a necessary
> side-effect will be lost.  Hence I think we need to refactor
> transformInAssignmentTo: to transformInAssignmentTo:codeGen: so that we can
> query whether the variable is in fact global in the current scope.
>
> Hi Eliot,
I do not really understand the concern here...
I fail to see the relation with the lifetime of the variable
Do you have an example?
Or does it interfere with some inlining tricks?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200623/dee3309b/attachment.html>


More information about the Vm-dev mailing list