doFile("optransform.io") Message opShuffleC := Message getSlot("opShuffle") debug := method( call message arguments foreach(i, arg, if (i != 0, write(" ")) if(arg cachedResult, write(call evalArgAt(i)) , write(arg code, ": ", call evalArgAt(i)) ) ) writeln ) m := Compiler messageForString2(File clone setPath("test.io") contents) #m := Compiler messageForString2("A := 1 + 2 * 3 - 18; b := 3; foo(bar, baz, x + 12 ^ 2)") #m := Compiler messageForString2("a := 1 + 2 * 3 - 18") #m := Compiler messageForString2("1 + 2 * 3 - 18") #m := Compiler messageForString2("1 + 2 + 3") #m := Compiler messageForString2("1 + 2") #writeln(m) #writeln n := m clone opShuffleC #writeln(n) #writeln x := m clone opShuffleIo #writeln(x) #writeln #writeln if(n asString != x asString, writeln("AAAAAAAAAAAAAAAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrrrrrrrrghhh") ) m := Compiler messageForString2("x := (1 + 2) - 3") writeln(m clone opShuffleC asString == m clone opShuffleIo asString) files := "optransform.io" split writeln("Operator Safe") files foreach(file, unmodifiedMsgs := Compiler messageForString2(File clone setPath(file) contents) unmodifiedStr := unmodifiedMsgs asString shuffledCMsgs := Compiler messageForString2(File clone setPath(file) contents) shuffledCMsgs opShuffleC shuffledCStr := shuffledCMsgs asString shuffledIoMsgs := Compiler messageForString2(File clone setPath(file) contents) shuffledIoMsgs opShuffleIo shuffledIoStr := shuffledIoMsgs asString writeln(" ", file alignLeft(22), shuffledCStr == unmodifiedStr, " ", shuffledIoStr == unmodifiedStr, " ", shuffledIoStr == shuffledCStr) )