24/09/15 08:44, David Matthews wrote:
On 22/09/2015 19:00, Phil Clayton wrote:
After integrating the new Finalizable module in a library, I am getting
an internal error from the compiler:
Exception- InternalError: AllocStore found but last allocation not
complete raised while compiling
Thanks for reporting this and cutting it down to a suitable example.
I've tracked down the problem and committed a fix.
Thanks - this works with the latest commit.
As a shameless plug for the newly updated debugger, I used that to set a
breakpoint on the exception and then it was easy to see what was going
on. The new debugger is a great deal faster than the old version so
it's perfectly feasible to build the whole compiler with debugging enabled.
I tried the debugger many years ago but it couldn't cope with large
examples. I seem to recall that compiling with PolyML.Compiler.debug
set to true sometimes failed. I'll give it another go sometime.
I just had a quick look at the tutorial. How do you exit from the debug
prompt? (Ctrl+C didn't work.)
One other point, when trying to cut examples down to the smallest case
that demonstrates a bug, it's worth playing with
PolyML.Compiler.maxInlineSize. It's often the case that a bug only
shows up when an example is large enough that it isn't inlined so
setting this to something small, e.g. 1, may allow more of the
surrounding code to be pruned away.
That's useful to know. I checked the latest commit with maxInlineSize
set to 1 and it still compiles.
I was hopeful that increasing maxInlineSize would provide a work-around
for 5.5.2. It does, by setting maxInlineSize to 175, but at the expense
of much longer compilation times - see the tables below. Also, the
executable size of the example is much larger with 5.5.3. Is that expected?
Phil
The columns below show
1. PolyML.Compiler.maxInlineSize
2. real|user|sys times
3. helloworld executable size
5.5.2
160 fails
170 fails
175 1m14.032s|1m22.092s|0m3.807s 290122
180 1m13.523s|1m21.813s|0m3.728s 290122
200 1m14.671s|1m23.267s|0m3.684s 290122
240 1m15.493s|1m22.855s|0m3.736s 290944
320 1m20.699s|1m30.642s|0m4.133s 283650
5.5.3 (5dc43ce8e8eaaae7...)
1 0m11.476s|0m13.651s|0m1.470s 912681
80 0m18.673s|0m22.754s|0m2.071s 882459
120 0m16.855s|0m19.518s|0m1.770s 893577
160 0m30.113s|0m39.925s|0m3.004s 923681
170 0m30.687s|0m40.661s|0m2.948s 923575
175 1m20.665s|1m41.830s|0m5.302s 923589
180 1m18.039s|1m34.776s|0m4.183s 923589
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml