This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Compiler plugin problems

No replies
Erkki Lindpere
Joined: 2008-12-19,
User offline. Last seen 42 years 45 weeks ago.

My vector math optimizer is having a little trouble with closures. Below
is a transformation it does.
The last lines of the transformed method will cause GenICode to fail with:

Exception in thread "main" java.lang.AssertionError: assertion failed:
REFERENCE(scala.runtime.FloatRef) is not a numeric or boolean type
[operation: method *]

I understand that the Float variables are later transformed to FloatRef,
but somehow in this case it will be erroneously done. Could it be that I
have some symbol owners or tree positions set wrongly? I haven't yet
figured out how to do all that correctly.

Anyway, I think I should avoid scalarizing vectors that get accessed
from closures since creating two FloatRefs will actually cost more than
creating a Vector.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland