Skip to content

Commit

Permalink
change 04 to fix issue #103
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobuzzi committed Aug 13, 2018
1 parent dd48e0c commit 97b37f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sources/uml/UMLVirtualMachine.cls
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,11 @@ apply: anUMLImplementation to: anUMLObject with: arguments snapshot: anUMLExecut
"^self nilObject"]]
ifTrue: [^self processPrimitiveCallHaltIn: anUMLExecutionSnapshot node: each object: anUMLObject]. "debug interruption"]
].
anUMLExecutionSnapshot finalizeSnapshot. "move the snapshot from current to executed in the Stack"
aBoolean ifTrue: [^collectionResult].
collectionResult isEmpty ifTrue: [^anUMLObject"^self errorNotImplementedYet: symbolMessage in: anUMLObject"].
collectionResult isEmpty ifTrue: [^anUMLObject].

"see issue #51"
"#isCurtailed indicate a (^) return node --> answer the last result"
"primitive call answer the result of the primitive call --> answer the last result"
"see issue #51" "#isCurtailed indicate a (^) return node --> answer the last result" "primitive call answer the result of the primitive call --> answer the last result"
^(anUMLExecutionSnapshot isCurtailed or: [anUMLImplementation isPrimitiveCall or:[anUMLExecutionSnapshot hasInfiniteLoop]])
ifTrue: [collectionResult last]
ifFalse: [anUMLObject] "no return (^) node present and not a primitive call --> answer the receiver"!
Expand Down

0 comments on commit 97b37f4

Please sign in to comment.