#714 Compiler produces incorrect code

Closed
opened 8 years ago by nero · 0 comments

Originally at 2013-11-02T18:51:24Z by Herbert Vojčík closed at 2013-11-09T16:45:59Z

| x |
x := 1.
Array with: x with: (x:=4) with: x

as well related

| x |
x := 1.
{ x. (x:=4). x }

both produce an Array (4 4 4) even if it should be an Array (1 4 4).

There are tests (testXxxOrdered methods) in Compiler-Tests, but they test the "extra tricky version" of this situation. All those method should get parallel version where (true ifTrue: [ x := ... ]) will be replaced by simple (x := ...) (I never imagined that if super tricky version works, the plain one won't :-/ ).

Originally at 2013-11-02T18:51:24Z by Herbert Vojčík closed at 2013-11-09T16:45:59Z ```smalltalk | x | x := 1. Array with: x with: (x:=4) with: x ``` as well related ```smalltalk | x | x := 1. { x. (x:=4). x } ``` both produce `an Array (4 4 4)` even if it should be `an Array (1 4 4)`. There are tests (`testXxxOrdered` methods) in Compiler-Tests, but they test the "extra tricky version" of this situation. All those method should get parallel version where `(true ifTrue: [ x := ... ])` will be replaced by simple `(x := ...)` (I never imagined that if super tricky version works, the plain one won't :-/ ).
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.