diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-15 20:00:36 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-15 20:00:36 +0000 |
commit | 821229741d41ab5a0087ddf289ee01b92e9c0685 (patch) | |
tree | 1306ddc619017d903c2bceb35ba37ba27cc27dbf /tools/showPickled | |
parent | 369d3ca26f05ab848807c109e464f90f2e668c81 (diff) | |
download | scala-821229741d41ab5a0087ddf289ee01b92e9c0685.tar.gz scala-821229741d41ab5a0087ddf289ee01b92e9c0685.tar.bz2 scala-821229741d41ab5a0087ddf289ee01b92e9c0685.zip |
Some new tools for the tools directory.
amounts to a yak shaving expedition to enable this, which now works:
tools/diffPickled scala.Either
and since stability is presently broken you will see the following.
(When it's not broken you will see nothing.)
541,544c541,544
< 538,4090: EXTref 3: 539(Left) 2
< 539,4095: TYPEname 4: Left
< 540,4101: EXTref 3: 541(Right) 2
< 541,4106: TYPEname 5: Right
---
> 538,4090: EXTref 3: 539(Right) 2
> 539,4095: TYPEname 5: Right
> 540,4102: EXTref 3: 541(Left) 2
> 541,4107: TYPEname 4: Left
Diffstat (limited to 'tools/showPickled')
-rwxr-xr-x | tools/showPickled | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/showPickled b/tools/showPickled new file mode 100755 index 0000000000..67d86355ba --- /dev/null +++ b/tools/showPickled @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Shows the pickled scala data in a classfile. + +if [ $# == 0 ] ; then + echo "Usage: $0 [-cp classpath] class class [...]" + exit 1 +fi + +TOOLSDIR=`dirname $0` +CPOF="$TOOLSDIR/cpof" + +PACK="$TOOLSDIR/../build/pack/lib" +QUICK="$TOOLSDIR/../build/quick/classes" +STARR="$TOOLSDIR/../lib" +CP="" + +if [ -f "${PACK}/scala-library.jar" ] ; then + CP=`${TOOLSDIR}/packcp` +elif [ -d "${QUICK}/library" ] ; then + CP=`${TOOLSDIR}/quickcp` +else + CP=`${TOOLSDIR}/starrcp` +fi + +if [ "$1" == "-cp" ] ; then + shift + CP="${1}:${CP}" + shift +fi + +java -cp "$CP" scala.tools.nsc.util.ShowPickled $* |