Closed eholk closed 11 years ago
Like I said yesterday (or the day before), it is not the user-provided region annotations that can screw this up. If we ever redefine how gensym
works, or redefine insert-let-regions
, then it is possible our region inferencer will break unnecessarily. User-provided annotations will never mess with fallback regions.
I had a program fail to compile today precisely because compare-fallback
made invalid assumptions about the format of region variables. I got around it by naming my region variable r_1
instead of r1
. compare-fallback
assumes the suffix numbers on regions are created in a certain order, so if the user can write their own numbers, compare-fallback
can't assume they were created in the right order anymore.
Oh, then this isn't working how I intended already. Should user defined regions be fallback regions?
I don't see why not. To me their just regions that the user has a little more control over.
On Fri, Nov 2, 2012 at 3:31 PM, Claire Alvis notifications@github.comwrote:
Oh, then this isn't working how I intended already. Should user defined regions be fallback regions?
— Reply to this email directly or view it on GitHubhttps://github.com/eholk/harlan/issues/59#issuecomment-10027443.
My idea was that they were regions the compiler created in case it wasn't possible to put them on a "better" region, i.e. a user defined region.
Are fallback regions the ones inserted by insert-let-regions
? If so, I
think this is what happens, but the inferencer still ends up trying to
compare Harlan-generated regions with user-generated regions because it
doesn't have a way of distinguishing the two.
On Sat, Nov 3, 2012 at 5:58 PM, Claire Alvis notifications@github.comwrote:
My idea was that they were regions the compiler created in case it wasn't possible to put them on a "better" region, i.e. a user defined region.
— Reply to this email directly or view it on GitHubhttps://github.com/eholk/harlan/issues/59#issuecomment-10044739.
Yes, that is the intention. Perhaps there needs to be a way to distinguish between fallback regions and user-defined regions within a let-region
, or something.
Closing, since we've replaced the region inferencer.
Especially now with user-provided region annotations, it will be easy to violate the assumptions that compare-fallback relies on. We need a less fragile way to do this.