JavaDecompiler.st
changeset 701 4d62047c1358
parent 620 c19348d8e671
child 713 75e92ac63bf1
equal deleted inserted replaced
700:9b8a1133d748 701:4d62047c1358
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
       
    13 
       
    14 "{ Package: 'stx:libjava' }"
    13 
    15 
    14 Object subclass:#JavaDecompiler
    16 Object subclass:#JavaDecompiler
    15 	instanceVariableNames:'code pc javaMethod outStream classToCompileFor isStaticMethod
    17 	instanceVariableNames:'code pc javaMethod outStream classToCompileFor isStaticMethod
    16 		lastConstIndex lastConstant accessedInstvars modifiedInstvars
    18 		lastConstIndex lastConstant accessedInstvars modifiedInstvars
    17 		accessedStaticVars modifiedStaticVars sentMessages'
    19 		accessedStaticVars modifiedStaticVars sentMessages'
   847     "Created: / 16.11.1998 / 15:42:56 / cg"
   849     "Created: / 16.11.1998 / 15:42:56 / cg"
   848     "Modified: / 16.11.1998 / 15:58:52 / cg"
   850     "Modified: / 16.11.1998 / 15:58:52 / cg"
   849 !
   851 !
   850 
   852 
   851 constIndexShort
   853 constIndexShort
       
   854     |s|
       
   855 
   852     lastConstIndex := code wordAt:pc MSB:true.
   856     lastConstIndex := code wordAt:pc MSB:true.
   853     pc := pc + 2.
   857     pc := pc + 2.
   854 
   858 
   855     lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
   859     lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
   856 
   860     outStream notNil ifTrue:[
   857     outStream notNil ifTrue:[
   861         s := (lastConstant ? '??') displayString.
       
   862         s isString ifTrue:[
       
   863             s bitsPerCharacter > 8 ifTrue:[
       
   864                 s := '...a 2-byte string...'
       
   865             ]
       
   866         ].
   858         outStream
   867         outStream
   859             show:lastConstIndex; 
   868             show:lastConstIndex; 
   860             show:' ['; 
   869             show:' ['; 
   861             show:(lastConstant ? '??') displayString; 
   870             show:s; 
   862             show:'] '
   871             show:'] '
   863     ]
   872     ]
   864 
   873 
   865     "Created: / 16.4.1996 / 15:00:04 / cg"
   874     "Created: / 16.4.1996 / 15:00:04 / cg"
   866     "Modified: / 16.11.1998 / 15:59:23 / cg"
   875     "Modified: / 16.11.1998 / 15:59:23 / cg"
  1233 ! !
  1242 ! !
  1234 
  1243 
  1235 !JavaDecompiler class methodsFor:'documentation'!
  1244 !JavaDecompiler class methodsFor:'documentation'!
  1236 
  1245 
  1237 version
  1246 version
  1238     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaDecompiler.st,v 1.47 1999/11/09 14:56:42 cg Exp $'
  1247     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaDecompiler.st,v 1.48 2000/12/18 16:43:45 cg Exp $'
  1239 ! !
  1248 ! !
  1240 JavaDecompiler initialize!
  1249 JavaDecompiler initialize!