Skip to content

Commit

Permalink
transformLastToReturn does the same as addReturn
Browse files Browse the repository at this point in the history
fixes #2742
  • Loading branch information
MarcusDenker committed Mar 1, 2019
1 parent f902bfd commit 8d98b6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/OpalCompiler-Core/RBProgramNode.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RBProgramNode >> asDoit [
"The VM can only evaluate methods. wrap this ast in a doit MethodNode"
^RBMethodNode
selector: #DoIt
body: self asSequenceNode transformLastToReturn.
body: self asSequenceNode addReturn.
]

{ #category : #'*OpalCompiler-Core' }
Expand All @@ -16,7 +16,7 @@ RBProgramNode >> asDoitForContext: aContext [
methodNode := RBMethodNode
selector: #DoItIn:
arguments: { RBVariableNode named: 'ThisContext' }
body: self asSequenceNode transformLastToReturn.
body: self asSequenceNode addReturn.

methodNode methodClass: aContext receiver class.
methodNode rewriteTempsForContext: aContext.
Expand Down
9 changes: 0 additions & 9 deletions src/OpalCompiler-Core/RBSequenceNode.extension.st

This file was deleted.

0 comments on commit 8d98b6d

Please sign in to comment.