eholk/harlan

Problem with region passing

Closed this issue · 2 comments

While working on the self-app.kfc test, I get this error from the C++ compiler:

Exception in g++-compile-stdin: self-app.cpp: In function ‘int dispatch_34(lambda$type_33, box$t, region*&, region*&)’:
self-app.cpp:72: error: too few arguments to function ‘int dispatch_34(lambda$type_33, box$t, region*&, region*&)’
self-app.cpp:80: error: at this point in file

dispatch_34 can apparently take arguments in different regions, but in the recursive call to dispatch_34, the regions end up having the same value. Because of this, only one region variable is passed in, instead of two. The problem seems to start in uglify-vectors, but the real fix will probably involve being a lot more careful about region polymorphism and how we match arguments to formal parameters.

This might be related to #49.

This test works now, but the actual fix for the bug is in 6bfd556