{"action":"created","issue":{"url":"https://api.github.com/repos/Orvid/Caprica/issues/10","repository_url":"https://api.github.com/repos/Orvid/Caprica","labels_url":"https://api.github.com/repos/Orvid/Caprica/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/Orvid/Caprica/issues/10/comments","events_url":"https://api.github.com/repos/Orvid/Caprica/issues/10/events","html_url":"https://github.com/Orvid/Caprica/issues/10","id":161560332,"number":10,"title":"Logical statements give unexpected results when compiling with -O optimization","user":{"login":"steve-40","id":20076609,"avatar_url":"https://avatars.githubusercontent.com/u/20076609?v=3","gravatar_id":"","url":"https://api.github.com/users/steve-40","html_url":"https://github.com/steve-40","followers_url":"https://api.github.com/users/steve-40/followers","following_url":"https://api.github.com/users/steve-40/following{/other_user}","gists_url":"https://api.github.com/users/steve-40/gists{/gist_id}","starred_url":"https://api.github.com/users/steve-40/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steve-40/subscriptions","organizations_url":"https://api.github.com/users/steve-40/orgs","repos_url":"https://api.github.com/users/steve-40/repos","events_url":"https://api.github.com/users/steve-40/events{/privacy}","received_events_url":"https://api.github.com/users/steve-40/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-21T23:08:10Z","updated_at":"2016-06-22T05:33:20Z","closed_at":null,"body":"Orvid, logical statement evaluation seems to be broken in Caprica v0.2.0 when using optimization.\r\n\r\nI put the following debug code in a script and compiled it with Caprica using the -O optimization option.\r\n\r\n\r\nDebug.Trace(\"!TRUE && TRUE = \" + (!TRUE && TRUE), 1)\r\nDebug.Trace(\"!TRUE && FALSE = \" + (!TRUE && FALSE), 1)\r\nDebug.Trace(\"!FALSE && TRUE = \" + (!FALSE && TRUE), 1)\r\nDebug.Trace(\"!FALSE && FALSE = \" + (!FALSE && FALSE), 1)\r\nDebug.Trace(\"!TRUE || TRUE = \" + (!TRUE || TRUE), 1)\r\nDebug.Trace(\"!TRUE || FALSE = \" + (!TRUE || FALSE), 1)\r\nDebug.Trace(\"!FALSE || TRUE = \" + (!FALSE || TRUE), 1)\r\nDebug.Trace(\"!FALSE || FALSE = \" + (!FALSE || FALSE), 1)\r\n\r\n\r\nRESULT:\r\n\r\n\r\n[06/21/2016 - 10:52:53PM] !TRUE && TRUE = True _(this should be FALSE)_\r\n[06/21/2016 - 10:52:53PM] !TRUE && FALSE = True _(this should be FALSE)_\r\n[06/21/2016 - 10:52:53PM] !FALSE && TRUE = True _(correct result)_\r\n[06/21/2016 - 10:52:53PM] !FALSE && FALSE = False _(correct result)_\r\n[06/21/2016 - 10:52:53PM] !TRUE || TRUE = True _(correct result)_\r\n[06/21/2016 - 10:52:53PM] !TRUE || FALSE = False _(correct result)_\r\n[06/21/2016 - 10:52:53PM] !FALSE || TRUE = False _(this should be TRUE)_\r\n[06/21/2016 - 10:52:53PM] !FALSE || FALSE = False _(this should be TRUE)_\r\n\r\n\r\nAs you can see, some of the results are incorrect compared with what I would expect from the CK compiler.\r\n\r\nEdit: HOWEVER, it does work correctly if the -O option is not used, so it is an issue with the optimization. Cheers "},"comment":{"url":"https://api.github.com/repos/Orvid/Caprica/issues/comments/227647815","html_url":"https://github.com/Orvid/Caprica/issues/10#issuecomment-227647815","issue_url":"https://api.github.com/repos/Orvid/Caprica/issues/10","id":227647815,"user":{"login":"steve-40","id":20076609,"avatar_url":"https://avatars.githubusercontent.com/u/20076609?v=3","gravatar_id":"","url":"https://api.github.com/users/steve-40","html_url":"https://github.com/steve-40","followers_url":"https://api.github.com/users/steve-40/followers","following_url":"https://api.github.com/users/steve-40/following{/other_user}","gists_url":"https://api.github.com/users/steve-40/gists{/gist_id}","starred_url":"https://api.github.com/users/steve-40/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steve-40/subscriptions","organizations_url":"https://api.github.com/users/steve-40/orgs","repos_url":"https://api.github.com/users/steve-40/repos","events_url":"https://api.github.com/users/steve-40/events{/privacy}","received_events_url":"https://api.github.com/users/steve-40/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T05:33:19Z","updated_at":"2016-06-22T05:33:19Z","body":"OK. I was mainly using that feature because it generates pex files that Champollion cannot decompile ;P\r\nIs there any other way that I could compile my scripts in a way that they won't decompile? Sometimes I want to keep certain scripts private for various reasons.\r\n\r\nBtw, I've just started using the new language extensions and am enjoying those additions as well as the very fast compiler speed. Cheers."}}
{"actor":{"display_login":"steve-40"}}