binary compatibility of GenASM and GenJVM output

33 views
Skip to first unread message

Miguel Garcia

unread,
Jun 8, 2012, 5:34:22 AM6/8/12
to scala-i...@googlegroups.com

I've just compiled scala-library.jar and scala-compiler.jar , once with -target:jvm-1.5 and another with -target:jvm-1.6 , comparing them with the Migration Manager version 0.1.3 downloaded from http://typesafe.com/technology/migration-manager (although it shows version 0.1.1 on its title bar).

MiMa reports no binary incompatibilities for the compiler, and for the standard library it reports only those resulting from not merging https://github.com/scala/scala/pull/678

Then I repeated the above, this time using -optimize, with the same results.

It would be great if more data points could be gathered, basically:

 (a) for other Scala frameworks and apps

 (b) Although comparing -target:jvm-1.6 vs -target:jvm-1.5 is reassuring,
     in fact a more apples-to-apples comparison is -target:jvm-1.5-asm vs -target:jvm-1.5 . That's pending.

Your favorite API diffing tool can also do because GenASM (activated via -target:jvm-1.6 as well as -target:jvm-1.5-asm) is supposed to emit classfiles that are binary compatible with GenJVM (the default, ie when no -target option is given).

When comparing the output of GenASM and GenJVM via
  javap -c -private -verbose
some non-behavioral differences are expected, e.g. different layout of the constant pool, and in the initialization of serialVersionUID (as part of field declaration by GenASM vs in static class constructor by GenJVM). But these shouldn't affect binary compatibility. Now that I mention serialVersionUID, I should also mention https://github.com/scala/scala/pull/654


Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/


Reply all
Reply to author
Forward
0 new messages