Ok, this patch supercedes the previous two patches that were just fragments. Here's what does work (but of course needs testing):
1) Creation of rectangular arrays of arbitrary rank and type.
2) Assign and retrieve from arrays
3) Assign and retrieve from a DefaultMember accessed by multiple indices. e.g:
_objects = array(object, (2,2))
Items (x as int, y as int) as object:
col = Col()
col[0,0] = 1
Working, but needs more testing/errorchecking/love:
1) retrieval of complex slices of arrays in N dimensions (e.g.: c = a[0:3,2:4,5:6])
Things that don't work yet:
1) array indices of negative numbers (e.g a[1,3,-1])
2) Assignment to members with several indices. See arrays-29.boo for the test case, and what fails. Need to figure out why this is happening.
3) Assignment to complex rectangular array slices (e.g a[0:1,2:3] = b[2:3,5:6])
Questions I have for further work:
1) The following code prints "tr":
a = "strings"
Why does this print items 1-2, not 1-3? (maybe this is some convention from python i don't know (i'm not really a python coder)). My current rectangular array slicing considers "0:1" to mean "elements 0 through 1 inclusive" for each dimension. Should this change?
2) The problem with array-29.boo test seems to be a result of the lines in ProcessMethodBodies.cs:
// leave it to LeaveBinaryExpression to resolve
Removing the call to Bind() makes things just bomb though. See the booc -vvv output of compiling arrays-29.boo for where this Bind() seems to screw things up or something. Pretty lost on this problem though.
Ok, there it is so far. Comments? Bugs? Flames? Recipes for apple pie?