There are other problems too, like supporting object instanceof float[] (or 
even instanceof Object), not that you likely do a lot of things like that. 
I had a patch once upon a time that would let you optionally use typed 
arrays _or_ js lists as primitive arrays (except longs of course), but it 
added small runtime costs in odd places, so was turned down (outside of the 
code review, separate discussion).

The patch is old and stale, but its possible you could do something with 
it, at least for a personal gwt branch. 
https://gwt-review.googlesource.com/#/c/8321/

There is another option too, depending on how this data looks in your array 
- consider java.nio.FloatBuffer. GWT can get support for it from PlayN 
(backed by js typedarrays, as you would expect), I have experience with it 
and have found you can get pretty amazing performance using it). This is 
still cross platform, won't mess with instanceof, only downside is that 
you'll have to do some not-so-cross platform stuff to interact with the 
typedarray side if you need (serializing, writing to canvas, etc). If you 
need more info, let me know, I have a few projects that use it. PlayN is 
still moving forward, just released their 2.0-rc4, and I've found that the 
buffer impls all behave as expected still.

On Monday, February 6, 2017 at 6:09:33 AM UTC-6, Jens wrote:
>
>
> The reason I'm asking is because Super-source solution can not change all 
>> "new int[...]" invocations in my program. 
>> As far as I understand, the SS solution can change some ArrayFactory and 
>> each time I need to use it I have to write ArrayFactory.createFloatArray. 
>> "new float[]" will not be altered with souper-source.   
>>
>> Am I right ?
>>
>
> yes you would need a factory with super source so you can change the way 
> the array is created.
>
> -- J. 
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to