« Return to Thread: [scala-tools] Compiler books
Can anyone recommend a good book or online resource on compilers that would help understand the Scala compiler?
I want to create a plug-in that does vector math optimizations*, but I've never studied compilers and many things in the compiler seem really foreign to me.
* I think scalar replacement is what it's called -- given the type Vector2(x: Float, y: Float) { /* operations */ }, I want to replace
1) local variables:
val v = new Vector2(1f, 2f) --> val v$x = 1f; val v$y = 2f
2) any operations on Vectors with operations on Floats
3) any escaping vectors with new Vector2(v$x, v$y) -- most of the time they will not escape
Or should I just wait until JIT can do this better? :)
Erkki
« Return to Thread: [scala-tools] Compiler books
| Free embeddable forum powered by Nabble | Forum Help |