We actually have code that scans the native code for usage of methods and
tries to "deopimize" them. Both Steve and myself have no clue why this code
isn't working...
The workaround I use for callbacks is something like this:
boolean flag;
if(flag) {
MyClass.myCallback();
}
It's important that flag is not private otherwise javac will optimize this
away. It can be package protected as javac can't know what you'll add later
on. This fools the optimized but doesn't cost you. Notice that the if
statement needs to be in a path that you will reach at some point in the
code so it doesn't get removed on its own.
Making this feature optional is impractical as it will balloon build sizes
and slow it down.
Making it only for release builds is a recipe for disaster, we want as much
consistency in builds as possible.
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/08495731-7b23-4543-b4ea-c86f451e8529%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.