Thanks for that pointer, Sandro. And for the update, Bennie. The description in the wiki is a bit off, but I don't think it's significant. A region is associated with the *target* of a pointer (that is: a location); the association with the object reference is a consequence. The distinction becomes important when you take the address of something that resides on the stack. That said, from the description of function in that page, it's pretty clear that this is a (minor) flaw in the description rather than a problem in the actual region type system.
The discussion of heap regions is interesting, mainly because it's not really a discussion of heap regions. :-) I think the idea of a task-local region is a good one, but I think that there are multiple such regions. I may be reacting to another minor wording issue; hard to tell. I'm not at all clear why all task-local references are reference counted. The decision that an object is task-local seems orthogonal to any decision about that object's lifetime. Hiding in the notion of task-local regions is an interesting un-articulated propositions: that objects on a task's stack might be passed by reference to sub-tasks, and that the region lifetime system might thereby be extended to task lifetimes. This actually might make sense in some programs (parent task sets up storage for sub-tasks while avoiding GC), and it's an idea I haven't seen batted around in the literature. It *does* deeply violate a bunch of assumptions of current compiler back-ends and current GC implementations (to wit: things on the stack are generally assumed to be task-local by many runtime subsystems). The discussion of "self" regions is also interesting. It's something I hadn't given enough thought to. It raises a requirement for region polymorphism that isn't explicitly articulated in the wiki page. The "safe memory pools" idea has been examined elsewhere in the form of "explicit regions", see "Memory Management With Explicit Regions<http://theory.stanford.edu/~aiken/publications/theses/gay.pdf>" by David Gay. The identified problems toward the bottom with subregions and region variance are (to my knowledge) not explored in the literature, but they are similar to the problems with variance of generic type parameters generally.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
