Re: ver 4.0 problem with SVN1222
- Posted by mattlewis (admin) Oct 29, 2008
- 1041 views
I found also a problem with rev 1222 using the colored buttons Demo which Judith contributed.
DemoColoredButtons.exw uses Win32lib.ew,ColoredButtons.ew and Irregular.ew. If I run:
d:\Euphoria\ColoredButtons>exw DemoColoredButtons.exw
exw.exe is running but nothing happens. Usage of the cpu increases and I have to kill exw.exe with the task manager.
If I translate and compile the demo it will run without problem. If I try:
d:\Euphoria\ColoredButtons>exw c:\euphoria\source40\eu.ex DemoColoredButtons.exw
the demo runs also. And if I add include win32lib.ew in ColoredButtons.ew then the demo will run too. But this was not necessary in the past and could be a little bit confusing.
r1223 should fix this issue now. Thanks again for the reports.
The emitted code for forward type checks wasn't correct, and it caused the execution to hang in the C-backend. The variables declared as seq were using a forward declared type since ColoredButtons.ew didn't include win32lib.ew.
The eu.ex backend has a NOP1 defined, so it cruised happily along. Translated code mostly ignores type checking (also, it deals differently with NOPs), so it wasn't hitting the forward type check code. Likewise, when you added the missing include statement, it never became a "forward" type check.
As an aside, the seq and int UDTs may lead to less optimized code than simply using sequence and integer, since euphoria can ignore certain checks if it knows that something is either a sequence or an integer at compile time.
Matt