- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Please help with this BUG!
Fri, 2009-04-10, 09:45
http://www.datanucleus.org/servlet/jira/browse/NUCENHANCER-34
- I wonder if it is somehow Scala-related.
Could we produce a better bytecode so that DataNucleus won't garble it?
P.S. DataNucleus is now the Google App Engine way of providing access to their
BigTable. It is critical to running any Scala app inside the GAE.
ArtemGr writes:
> http://www.datanucleus.org/servlet/jira/browse/NUCENHANCER-34
> - I wonder if it is somehow Scala-related.
For the following class:
@PersistenceCapable
class Persistent {var value: String = null}
Scala produce the following code:
aload_0
aconst_null
pop
aconst_null
putfield #15; //Field value:Ljava/lang/String;
aload_0
invokespecial #19; //Method java/lang/Object."":()V
return
which DataNucleus (JDO implementation used in GAE) enchances into:
aload_0
aconst_null
pop
aconst_null
invokestatic #22; //Method
jdoSetvalue:(Lfastcms/scalaAPI/Persistent;Ljava/lang/String;)V
aload_0
invokespecial #24; //Method java/lang/Object."":()V
return
but while "putfield" before the java.lang.Object() constructor is okay,
"invokestatic" isn't.
Any suggestions?