lindahua/Devectorize.jl — pull request #24 by blakejohnson (2014-01-08 21:13:14+00:00)
Title: WIP: Generate efficient codes for a larger class of references

The idea behind this pul request is to add support for expressions such as
```
@devec x[v] = y
```
where `v` is an integer or logical index into `x`, and `y` has a compatible length. This should be transformed into code like:
```
I = Base.to_index(v)
for i = 1:length(I)
x[I[i]] = y[i]
end
```

This PR does translate such expressions. Unfortunately, I have also broken simple things like:
```
i = 1
@devec x = y[i]
```
where we want `x` to be a scalar. In the current state of this PR, `x` becomes a 1-element vector.

I am pushing this now because I could use some feeback/advice on how to proceed.