src/JavaDecompiler.st
author vranyj1
Mon, 15 Aug 2011 08:13:33 +0000
branchjk_new_structure
changeset 915 cf0d328465c2
parent 877 f5a5b93e1c78
child 923 b922537eea2a
permissions -rw-r--r--
(none)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     1
"
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
     3
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
     4
                            SWING Research Group, Czech Technical University in Prague
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
     5
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
     6
 Parts of the code written by Claus Gittinger are under following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
     7
 license:
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     8
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    14
 hereby transferred.
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    15
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    16
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    17
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    18
 Permission is hereby granted, free of charge, to any person
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    19
 obtaining a copy of this software and associated documentation
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    20
 files (the 'Software'), to deal in the Software without
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    21
 restriction, including without limitation the rights to use,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    22
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    23
 copies of the Software, and to permit persons to whom the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    24
 Software is furnished to do so, subject to the following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    25
 conditions:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    26
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    27
 The above copyright notice and this permission notice shall be
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    28
 included in all copies or substantial portions of the Software.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    29
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    30
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    31
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    32
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    33
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    34
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    35
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    36
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    37
 OTHER DEALINGS IN THE SOFTWARE.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    38
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    39
 [1] Code written at SWING Research Group contain a signature
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    40
     of one of the above copright owners.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    41
"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    42
"{ Package: 'stx:libjava' }"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    43
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    44
Object subclass:#JavaDecompiler
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    45
	instanceVariableNames:'code pc javaMethod outStream classToCompileFor isStaticMethod
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    46
		lastConstIndex lastConstant accessedInstvars modifiedInstvars
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    47
		accessedStaticVars modifiedStaticVars sentMessages'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    48
	classVariableNames:'DecoderTable'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    49
	poolDictionaries:''
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    50
	category:'Languages-Java-Support-Decompiling'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    51
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    52
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    53
!JavaDecompiler class methodsFor:'documentation'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    54
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    55
copyright
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    56
"
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    57
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    58
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    59
                            SWING Research Group, Czech Technical University in Prague
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    60
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    61
 Parts of the code written by Claus Gittinger are under following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    62
 license:
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    63
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    64
 This software is furnished under a license and may be used
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    65
 only in accordance with the terms of that license and with the
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    66
 inclusion of the above copyright notice.   This software may not
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    67
 be provided or otherwise made available to, or used by, any
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    68
 other person.  No title to or ownership of the software is
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    69
 hereby transferred.
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    70
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    71
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    72
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    73
 Permission is hereby granted, free of charge, to any person
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    74
 obtaining a copy of this software and associated documentation
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    75
 files (the 'Software'), to deal in the Software without
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    76
 restriction, including without limitation the rights to use,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    77
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    78
 copies of the Software, and to permit persons to whom the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    79
 Software is furnished to do so, subject to the following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    80
 conditions:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    81
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    82
 The above copyright notice and this permission notice shall be
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    83
 included in all copies or substantial portions of the Software.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    84
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    85
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    86
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    87
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    88
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    89
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    90
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    91
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    92
 OTHER DEALINGS IN THE SOFTWARE.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    93
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    94
 [1] Code written at SWING Research Group contain a signature
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    95
     of one of the above copright owners.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 837
diff changeset
    96
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    97
"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    98
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    99
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   100
examples
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   101
"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   102
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   103
                                                                        [exBegin]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   104
    |m|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   105
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   106
    m := JAVA::java::lang::Object compiledMethodAt:#'toString()Ljava/lang/String;'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   107
    JavaDecompiler decompile:m to:Transcript.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   108
                                                                        [exEnd]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   109
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   110
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   111
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   112
                                                                        [exBegin]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   113
    |m|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   114
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   115
    m := JAVA::java::lang::Object compiledMethodAt:#'toString()Ljava/lang/String;'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   116
    JavaDecompiler decompile:m to:nil.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   117
                                                                        [exEnd]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   118
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   119
"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   120
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   121
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   122
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   123
!JavaDecompiler class methodsFor:'initialization'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   124
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   125
initialize
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   126
    DecoderTable := #(
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   127
        (nop)                                   "/ 0
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   128
        (aconst_null)                           "/ 1
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   129
        (iconst_m1)                             "/ 2
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   130
        (iconst_0)                              "/ 3
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   131
        (iconst_1)                              "/ 4
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   132
        (iconst_2)                              "/ 5
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   133
        (iconst_3)                              "/ 6
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   134
        (iconst_4)                              "/ 7
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   135
        (iconst_5)                              "/ 8
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   136
        (lconst_0)                              "/ 9
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   137
        
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   138
        (lconst_1)                              "/ 10
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   139
        (fconst_0)                              "/ 11
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   140
        (fconst_1)                              "/ 12
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   141
        (fconst_2)                              "/ 13
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   142
        (dconst_0)                              "/ 14
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   143
        (dconst_1)                              "/ 15
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   144
        (bipush signedByte)                     "/ 16
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   145
        (sipush signedShort)                    "/ 17
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   146
        (ldc1 constIndexByte remember_ldc1)              "/ 18
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   147
        (ldc2 constIndexShort remember_ldc2)             "/ 19
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   148
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   149
        (ldc2w constIndexShort remember_ldc2w)            "/ 20
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   150
        (iload localIndexByte)                  "/ 21
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   151
        (lload localIndexByte)                  "/ 22
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   152
        (fload localIndexByte)                  "/ 23
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   153
        (dload localIndexByte)                  "/ 24
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   154
        (aload localIndexByte)                  "/ 25
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   155
        (iload_0)                               "/ 26
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   156
        (iload_1)                               "/ 27
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   157
        (iload_2)                               "/ 28
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   158
        (iload_3)                               "/ 29
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   159
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   160
        (lload_0)                               "/ 30
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   161
        (lload_1)                               "/ 31
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   162
        (lload_2)                               "/ 32
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   163
        (lload_3)                               "/ 33
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   164
        (fload_0)                               "/ 34
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   165
        (fload_1)                               "/ 35
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   166
        (fload_2)                               "/ 36
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   167
        (fload_3)                               "/ 37
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   168
        (dload_0)                               "/ 38
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   169
        (dload_1)                               "/ 39
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   170
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   171
        (dload_2)                               "/ 40
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   172
        (dload_3)                               "/ 41
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   173
        (aload_0)                               "/ 42
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   174
        (aload_1)                               "/ 43
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   175
        (aload_2)                               "/ 44
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   176
        (aload_3)                               "/ 45
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   177
        (iaload)                                "/ 46
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   178
        (laload)                                "/ 47
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   179
        (faload)                                "/ 48
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   180
        (daload)                                "/ 49
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   181
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   182
        (aaload)                                "/ 50
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   183
        (baload)                                "/ 51
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   184
        (caload)                                "/ 52
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   185
        (saload)                                "/ 53
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   186
        (istore localIndexByte)                 "/ 54
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   187
        (lstore localIndexByte)                 "/ 55
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   188
        (fstore localIndexByte)                 "/ 56
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   189
        (dstore localIndexByte)                 "/ 57
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   190
        (astore localIndexByte)                 "/ 58
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   191
        (istore_0)                              "/ 59
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   192
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   193
        (istore_1)                              "/ 60
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   194
        (istore_2)                              "/ 61
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   195
        (istore_3)                              "/ 62
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   196
        (lstore_0)                              "/ 63
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   197
        (lstore_1)                              "/ 64
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   198
        (lstore_2)                              "/ 65
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   199
        (lstore_3)                              "/ 66
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   200
        (fstore_0)                              "/ 67
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   201
        (fstore_1)                              "/ 68
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   202
        (fstore_2)                              "/ 69
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   203
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   204
        (fstore_3)                              "/ 70
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   205
        (dstore_0)                              "/ 71
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   206
        (dstore_1)                              "/ 72
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   207
        (dstore_2)                              "/ 73
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   208
        (dstore_3)                              "/ 74
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   209
        (astore_0)                              "/ 75
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   210
        (astore_1)                              "/ 76
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   211
        (astore_2)                              "/ 77
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   212
        (astore_3)                              "/ 78
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   213
        (iastore)                               "/ 79
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   214
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   215
        (lastore)                               "/ 80
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   216
        (fastore)                               "/ 81
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   217
        (dastore)                               "/ 82
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   218
        (aastore)                               "/ 83
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   219
        (bastore)                               "/ 84
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   220
        (castore)                               "/ 85
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   221
        (sastore)                               "/ 86
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   222
        (pop)                                   "/ 87
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   223
        (pop2)                                  "/ 88
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   224
        (dup)                                   "/ 89
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   225
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   226
        (dup_x1)                                "/ 90
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   227
        (dup_x2)                                "/ 91
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   228
        (dup2)                                  "/ 92
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   229
        (dup2_x1)                               "/ 93
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   230
        (dup2_x2)                               "/ 94
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   231
        (swap)                                  "/ 95
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   232
        (iadd)                                  "/ 96
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   233
        (ladd)                                  "/ 97
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   234
        (fadd)                                  "/ 98
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   235
        (dadd)                                  "/ 99
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   236
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   237
        (isub)                                  "/ 100
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   238
        (lsub)                                  "/ 101
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   239
        (fsub)                                  "/ 102
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   240
        (dsub)                                  "/ 103
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   241
        (imul)                                  "/ 104
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   242
        (lmul)                                  "/ 105
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   243
        (fmul)                                  "/ 106
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   244
        (dmul)                                  "/ 107
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   245
        (idiv)                                  "/ 108
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   246
        (ldiv)                                  "/ 109
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   247
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   248
        (fdiv)                                  "/ 110
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   249
        (ddiv)                                  "/ 111
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   250
"/        (imod)                                  "/ 112     "/ obsolete
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   251
        (irem)                                  "/ 112
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   252
"/        (lmod)                                  "/ 113     "/ obsolete
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   253
        (lrem)                                  "/ 113
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   254
"/        (fmod)                                  "/ 114     "/ obsolete
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   255
        (frem)                                  "/ 114
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   256
"/        (dmod)                                  "/ 115     "/ obsolete
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   257
        (drem)                                  "/ 115
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   258
        (ineg)                                  "/ 116
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   259
        (lneg)                                  "/ 117
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   260
        (fneg)                                  "/ 118
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   261
        (dneg)                                  "/ 119
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   262
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   263
        (ishl)                                  "/ 120
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   264
        (lshl)                                  "/ 121
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   265
        (ishr)                                  "/ 122
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   266
        (lshr)                                  "/ 123
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   267
        (iushr)                                 "/ 124
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   268
        (lushr)                                 "/ 125
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   269
        (iand)                                  "/ 126
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   270
        (land)                                  "/ 127
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   271
        (ior)                                   "/ 128
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   272
        (lor)                                   "/ 129
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   273
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   274
        (ixor)                                  "/ 130
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   275
        (lxor)                                  "/ 131
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   276
        (iinc localIndexByte signedByte)        "/ 132
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   277
        (i2l)                                   "/ 133
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   278
        (i2f)                                   "/ 134
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   279
        (i2d)                                   "/ 135
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   280
        (l2i)                                   "/ 136    
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   281
        (l2f)                                   "/ 137
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   282
        (l2d)                                   "/ 138
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   283
        (f2i)                                   "/ 139
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   284
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   285
        (f2l)                                   "/ 140
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   286
        (f2d)                                   "/ 141
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   287
        (d2i)                                   "/ 142
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   288
        (d2l)                                   "/ 143
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   289
        (d2f)                                   "/ 144
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   290
        (int2byte)                              "/ 145
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   291
        (int2char)                              "/ 146
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   292
        (int2short)                             "/ 147
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   293
        (lcmp)                                  "/ 148
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   294
        (fcmpl)                                 "/ 149
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   295
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   296
        (fcmpg)                                 "/ 150
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   297
        (dcmpl)                                 "/ 151
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   298
        (dcmpg)                                 "/ 152
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   299
        (ifeq signedBranchShort)                "/ 153
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   300
        (ifne signedBranchShort)                "/ 154
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   301
        (iflt signedBranchShort)                "/ 155
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   302
        (ifge signedBranchShort)                "/ 156
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   303
        (ifgt signedBranchShort)                "/ 157
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   304
        (ifle signedBranchShort)                "/ 158
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   305
        (if_icmpeq signedBranchShort)           "/ 159
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   306
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   307
        (if_icmpne signedBranchShort)           "/ 160
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   308
        (if_icmplt signedBranchShort)           "/ 161
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   309
        (if_icmpge signedBranchShort)           "/ 162
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   310
        (if_icmpgt signedBranchShort)           "/ 163
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   311
        (if_icmple signedBranchShort)           "/ 164
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   312
        (if_acmpeq signedBranchShort)           "/ 165
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   313
        (if_acmpne signedBranchShort)           "/ 166
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   314
        (goto signedBranchShort)                "/ 167
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   315
        (jsr signedBranchShort)                 "/ 168
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   316
        (ret localIndexByte)                    "/ 169
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   317
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   318
        (tableswitch tableSwitchBytes)          "/ 170
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   319
        (lookupswitch lookupSwitchBytes)        "/ 171
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   320
        (ireturn)                               "/ 172
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   321
        (lreturn)                               "/ 173
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   322
        (freturn)                               "/ 174
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   323
        (dreturn)                               "/ 175
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   324
        (areturn)                               "/ 176
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   325
        (return)                                "/ 177
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   326
        (getstatic constIndexShort remember_getstatic)               "/ 178
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   327
        (putstatic constIndexShort remember_putstatic)               "/ 179
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   328
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   329
        (getfield constIndexShort remember_getfield)                 "/ 180
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   330
        (putfield constIndexShort remember_putfield)                 "/ 181
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   331
        (invokevirtual constIndexShort remember_invokevirtual)       "/ 182
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   332
        (invokenonvirtual constIndexShort remember_invokenonvirtual) "/ 183
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   333
        (invokestatic constIndexShort remember_invokestatic)         "/ 184
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   334
        (invokeinterface constIndexShort nargsByte reservedByte remember_invokeinterface)          "/ 185
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   335
        (newfromname)                           "/ 186
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   336
        (new constIndexShort remember_new)      "/ 187
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   337
        (newarray arrayTypeByte)                "/ 188
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   338
        (anewarray constIndexShort)             "/ 189
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   339
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   340
        (arraylength)                           "/ 190
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   341
        (athrow remember_athrow)                "/ 191
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   342
        (checkcast constIndexShort)             "/ 192
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   343
        (instanceof constIndexShort)            "/ 193
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   344
        (monitorenter)                          "/ 194
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   345
        (monitorexit)                           "/ 195
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   346
"/        (verifystack)                           "/ 196 obsolete (Alpha release)
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   347
        (wide)                                  "/ 196
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   348
        (multianewarray constIndexShort dimensionsByte) "/ 197
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   349
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   350
        (ifnull    signedBranchShort)           "/ 198
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   351
        (ifnonnull signedBranchShort)           "/ 199
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   352
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   353
        (#'goto_w' signedBranchLong)            "/ 200
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   354
        (#'jsr_w' signedBranchShort)            "/ 201
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   355
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   356
        (breakpoint)                            "/ 202
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   357
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   358
        nil                                     "/ 203
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   359
        nil                                     "/ 204
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   360
        nil                                     "/ 205
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   361
        nil                                     "/ 206
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   362
        nil                                     "/ 207
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   363
        nil                                     "/ 208
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   364
        (#'ret_w' signedBranchShort)            "/ 209
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   365
                                         
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   366
        nil                                     "/ 210
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   367
        nil                                     "/ 211
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   368
        nil                                     "/ 212
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   369
        nil                                     "/ 213
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   370
        nil                                     "/ 214
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   371
        nil                                     "/ 215
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   372
        nil                                     "/ 216
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   373
        nil                                     "/ 217
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   374
        nil                                     "/ 218
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   375
        nil                                     "/ 219
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   376
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   377
        nil                                     "/ 220
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   378
        nil                                     "/ 221
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   379
        nil                                     "/ 222
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   380
        nil                                     "/ 223
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   381
        nil                                     "/ 224
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   382
        nil                                     "/ 225
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   383
        nil                                     "/ 226
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   384
        nil                                     "/ 227
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   385
        nil                                     "/ 228
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   386
        nil                                     "/ 229
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   387
                                    
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   388
        nil                                     "/ 230
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   389
        nil                                     "/ 231
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   390
        nil                                     "/ 232
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   391
        nil                                     "/ 233
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   392
        nil                                     "/ 234
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   393
        nil                                     "/ 235
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   394
        nil                                     "/ 236
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   395
        nil                                     "/ 237
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   396
        nil                                     "/ 238
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   397
        nil                                     "/ 239
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   398
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   399
        nil                                     "/ 240
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   400
        nil                                     "/ 241
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   401
        nil                                     "/ 242
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   402
        nil                                     "/ 243
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   403
        nil                                     "/ 244
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   404
        nil                                     "/ 245
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   405
        nil                                     "/ 246
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   406
        nil                                     "/ 247
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   407
        nil                                     "/ 248
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   408
        nil                                     "/ 249
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   409
                                              
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   410
        nil                                     "/ 250
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   411
        nil                                     "/ 251
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   412
        nil                                     "/ 252
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   413
        nil                                     "/ 253
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   414
        nil                                     "/ 254
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   415
        (invokenonvirtual_d constIndexShort)    "/ 255 special - dummy invokenonvirtual
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   416
    )
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   417
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   418
    "
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   419
     JavaDecompiler initialize
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   420
    "
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   421
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   422
    "Modified: / 16.11.1998 / 15:55:49 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   423
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   424
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   425
!JavaDecompiler class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   426
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   427
instructionTable
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   428
    ^ DecoderTable
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   429
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   430
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   431
!JavaDecompiler class methodsFor:'class definition generation'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   432
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   433
definitionOf:aJavaClass on:s
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   434
    |pckgName needCR fields staticFields superClass
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   435
     interfaces methodList staticMethods nonStaticMethods
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   436
     accessAttributeStyle codeStyle classNameStyle methodNameStyle|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   437
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   438
    accessAttributeStyle := Java prettyPrintStyle at:#accessAttribute.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   439
    codeStyle := Java prettyPrintStyle at:#code.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   440
    classNameStyle := Java prettyPrintStyle at:#className.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   441
    methodNameStyle := Java prettyPrintStyle at:#className.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   442
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   443
    pckgName := aJavaClass package.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   444
    pckgName ~= aJavaClass name ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   445
        s nextPutAll:'package ' , (pckgName copyReplaceAll:$/ with:$.).
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   446
        s nextPutAll:';'; cr; cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   447
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   448
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   449
    needCR := false.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   450
    s emphasis:accessAttributeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   451
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   452
    aJavaClass isPublic ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   453
       s nextPutAll:'public '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   454
       needCR := true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   455
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   456
    aJavaClass isAbstract ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   457
       s nextPutAll:'abstract '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   458
       needCR := true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   459
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   460
    aJavaClass isFinal ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   461
       s nextPutAll:'final '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   462
       needCR := true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   463
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   464
    s emphasis:codeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   465
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   466
    needCR ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   467
        s cr
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   468
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   469
    aJavaClass isInterface ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   470
       s nextPutAll:'interface '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   471
    ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   472
       s nextPutAll:'class '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   473
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   474
    s emphasis:classNameStyle; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   475
      nextPutAll:aJavaClass lastName; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   476
      emphasis:codeStyle; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   477
      space.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   478
    superClass := aJavaClass superclass.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   479
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   480
    (superClass ~~ (Java at:'java.lang.Object')
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   481
    and:[superClass isJavaClass]) ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   482
        s nextPutAll:'extends '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   483
        s emphasis:classNameStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   484
        (superClass package ~= 'java/lang' 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   485
        and:[superClass package ~= pckgName]) ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   486
            s nextPutAll:(superClass displayString). 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   487
        ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   488
            s nextPutAll:(superClass lastName).
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   489
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   490
        s emphasis:codeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   491
        s space.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   492
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   493
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   494
    (interfaces := aJavaClass interfaces) size > 0 ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   495
        (aJavaClass isInterface
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   496
        and:[interfaces size == 1]) ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   497
            s nextPutAll:'extends '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   498
        ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   499
            s nextPutAll:'implements '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   500
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   501
        interfaces keysAndValuesDo:[:nr :if |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   502
            |nameString|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   503
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   504
            nr ~~ 1 ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   505
                s nextPutAll:', '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   506
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   507
            s emphasis:classNameStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   508
            (if package ~= 'java/lang' 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   509
            and:[if package ~= pckgName]) ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   510
                if isJavaClass ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   511
                    "/ ought to be an unresolved class ...
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   512
                    nameString := if fullName copyReplaceAll:$/ with:$.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   513
                ] ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   514
                    nameString := if displayString
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   515
                ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   516
            ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   517
                nameString := if lastName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   518
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   519
            s nextPutAll:nameString.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   520
            s emphasis:codeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   521
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   522
        s space.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   523
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   524
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   525
    s nextPutAll:'{'; cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   526
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   527
    needCR := false.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   528
    staticFields := aJavaClass staticFields.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   529
    staticFields size > 0 ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   530
        needCR := true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   531
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   532
        staticFields do:[:aField |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   533
            |type v|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   534
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   535
            s nextPutAll:'    '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   536
            s emphasis:accessAttributeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   537
            aField isPublic ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   538
                s nextPutAll:'public '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   539
            ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   540
                aField isPrivate ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   541
                    s nextPutAll:'private '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   542
                ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   543
                    aField isProtected ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   544
                        s nextPutAll:'protected '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   545
                    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   546
                ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   547
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   548
            s nextPutAll:'static '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   549
            aField isFinal ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   550
                s nextPutAll:'final '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   551
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   552
            aField isVolatile ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   553
                s nextPutAll:'volatile '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   554
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   555
            s emphasis:codeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   556
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   557
            (((type := aField type) startsWith:pckgName) 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   558
            or:[type startsWith:(pckgName copyReplaceAll:$/ with:$.)]) ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   559
                type := type copyFrom:(pckgName size + 1 + 1).
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   560
            ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   561
                (type startsWith:'java.lang.') ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   562
                    type := type copyFrom:(11).
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   563
                ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   564
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   565
            type := type copy replaceAll:$/ with:$..
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   566
            s nextPutAll:type; space;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   567
              nextPutAll:aField name.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   568
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   569
            (v := aField constantValue) notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   570
                s nextPutAll:' = '; nextPutAll:v displayString.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   571
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   572
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   573
            s nextPutAll:';'; cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   574
            needCR := true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   575
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   576
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   577
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   578
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   579
    fields := aJavaClass fields.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   580
    fields size > 0 ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   581
        needCR ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   582
            s cr
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   583
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   584
        needCR := true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   585
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   586
        fields do:[:aField |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   587
            |type v|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   588
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   589
            s nextPutAll:'    '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   590
            s emphasis:accessAttributeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   591
            aField isPublic ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   592
                s nextPutAll:'public '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   593
            ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   594
                aField isPrivate ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   595
                    s nextPutAll:'private '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   596
                ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   597
                    aField isProtected ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   598
                        s nextPutAll:'protected '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   599
                    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   600
                ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   601
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   602
            aField isFinal ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   603
                s nextPutAll:'final '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   604
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   605
            aField isTransient ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   606
                s nextPutAll:'transient '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   607
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   608
            aField isVolatile ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   609
                s nextPutAll:'volatile '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   610
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   611
            s emphasis:codeStyle.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   612
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   613
            (((type := aField type) startsWith:pckgName) 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   614
            or:[type startsWith:(pckgName copyReplaceAll:$/ with:$.)]) ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   615
                type := type copyFrom:(pckgName size + 1 + 1).
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   616
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   617
            type := type copy replaceAll:$/ with:$..
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   618
            s nextPutAll:type; space;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   619
              nextPutAll:aField name.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   620
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   621
            (v := aField constantValue) notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   622
                s nextPutAll:' = '; nextPutAll:v displayString.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   623
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   624
            s nextPutAll:';'; cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   625
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   626
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   627
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   628
    aJavaClass methodDictionary size > 0 ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   629
        needCR ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   630
            s cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   631
            needCR := false.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   632
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   633
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   634
        staticMethods := OrderedCollection new.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   635
        nonStaticMethods := OrderedCollection new.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   636
        "/
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   637
        "/ static methods first ...
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   638
        "/
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   639
        aJavaClass methodDictionary do:[:aMethod |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   640
            |m|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   641
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   642
            m := aMethod.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   643
            m isWrapped ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   644
                m := m originalMethod
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   645
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   646
            m isStatic ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   647
                staticMethods add:m.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   648
            ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   649
                nonStaticMethods add:m.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   650
            ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   651
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   652
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   653
        staticMethods notEmpty ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   654
            staticMethods sort:[:a :b | a name < b name].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   655
            staticMethods do:[:aMethod |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   656
                self methodDefinitionOf:aMethod inPackage:pckgName on:s.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   657
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   658
            s cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   659
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   660
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   661
        "/
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   662
        "/ instance methods ...
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   663
        "/
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   664
        nonStaticMethods notEmpty ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   665
            nonStaticMethods sort:[:a :b | a name < b name].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   666
            nonStaticMethods do:[:aMethod |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   667
                self methodDefinitionOf:aMethod inPackage:pckgName on:s.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   668
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   669
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   670
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   671
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   672
    s nextPutAll:'}'; cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   673
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   674
    "Created: / 22.3.1997 / 14:29:37 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   675
    "Modified: / 5.12.1998 / 15:58:37 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   676
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   677
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   678
methodDefinitionOf: m inPackage: pckgName on: s 
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   679
    | aMethod nm  specComponents  accessAttributeStyle  codeStyle  methodNameStyle |
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   680
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   681
    aMethod := m.
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   682
    m isWrapped ifTrue: [
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   683
        aMethod := m originalMethod
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   684
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   685
    accessAttributeStyle := Java prettyPrintStyle at: #accessAttribute.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   686
    codeStyle := Java prettyPrintStyle at: #code.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   687
    methodNameStyle := Java prettyPrintStyle at: #methodName.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   688
    s nextPutAll: '    '.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   689
    s emphasis: accessAttributeStyle.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   690
    aMethod isPublic ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   691
        s nextPutAll: 'public '.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   692
    ] ifFalse: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   693
        aMethod isProtected ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   694
            s nextPutAll: 'protected '.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   695
        ] ifFalse: [ s nextPutAll: 'private '. ]
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   696
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   697
    aMethod isFinal ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   698
        s nextPutAll: 'final '.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   699
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   700
    aMethod isStatic ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   701
        s nextPutAll: 'static '.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   702
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   703
    aMethod isNative ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   704
        s nextPutAll: 'native '.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   705
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   706
    aMethod isSynchronized ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   707
        s nextPutAll: 'synchronized '.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   708
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   709
    s emphasis: codeStyle.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   710
    (nm := aMethod name) = '<init>' ifTrue: [
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   711
        nm := aMethod javaClass lastName.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   712
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   713
    specComponents := JavaMethod 
915
vranyj1
parents: 877
diff changeset
   714
                specComponentsWithArgsFromSignature: (aMethod instVarNamed:#descriptor)
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   715
                withName: nm
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   716
                in: (aMethod javaClass package).
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   717
    s nextPutAll: (specComponents at: 1).
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   718
    s space.
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   719
    s emphasis: methodNameStyle.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   720
    s nextPutAll: (specComponents at: 2).
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   721
    s emphasis: codeStyle.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   722
    s nextPutAll: ' ('.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   723
    s nextPutAll: (specComponents at: 3).
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   724
    s nextPutAll: ')'.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   725
    aMethod exceptionTable size > 0 ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   726
        s nextPutAll: ' throws '.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   727
        aMethod exceptionTable 
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   728
            keysAndValuesDo: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   729
                :index :aClassRef | 
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   730
                | nm |
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   731
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   732
                nm := aClassRef name.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   733
                (nm startsWith: pckgName) ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   734
                    nm := nm copyFrom: pckgName size + 2
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   735
                ] ifFalse: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   736
                    (nm startsWith: 'java/lang') ifTrue: [
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   737
                        nm := nm copyFrom: 'java/lang' size + 2.
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   738
                    ].
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   739
                ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   740
                index ~~ 1 ifTrue: [ s nextPutAll: ', ' ].
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   741
                s nextPutAll: (nm copyReplaceAll: $/ with: $.)
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   742
            ]
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   743
    ].
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   744
    s
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   745
        nextPutAll: ';';
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   746
        cr.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   747
837
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   748
    "Created: / 01-08-1997 / 12:24:11 / cg"
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   749
    "Modified: / 14-11-1998 / 00:03:09 / cg"
8f42226d82c0 slightly refactored exceptionTable methods and their callers.. no typechanging side effects
hlopkmar
parents: 752
diff changeset
   750
    "Modified: / 04-06-2011 / 17:18:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
915
vranyj1
parents: 877
diff changeset
   751
    "Modified: / 15-08-2011 / 08:52:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   752
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   753
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   754
!JavaDecompiler class methodsFor:'decompiling'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   755
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   756
decompile:aJavaMethod
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   757
    self decompile:aJavaMethod to:Transcript
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   758
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   759
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   760
decompile:aJavaMethod to:aStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   761
    self new decompile:aJavaMethod to:aStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   762
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   763
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   764
!JavaDecompiler methodsFor:'decompiling'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   765
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   766
decompile:aJavaMethod to:aStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   767
    |who endPC|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   768
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   769
    outStream := aStream.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   770
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   771
    isStaticMethod := aJavaMethod isStatic.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   772
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   773
    who := aJavaMethod who.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   774
    who notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   775
        classToCompileFor := who methodClass.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   776
        outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   777
            outStream cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   778
"/            outStream showCR:'decompiling ' , classToCompileFor name , '>>' , (who methodSelector) , ':'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   779
            outStream showCR:'decompiling ' , aJavaMethod displayString , ':'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   780
            isStaticMethod ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   781
                outStream show:'static method'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   782
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   783
            outStream cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   784
            outStream cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   785
        ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   786
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   787
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   788
    javaMethod := aJavaMethod.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   789
    code := aJavaMethod javaByteCode.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   790
    endPC := code size.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   791
    endPC == 0 ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   792
        outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   793
            javaMethod isNative ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   794
                outStream nextPutAll:'// native method'; cr
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   795
            ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   796
                outStream nextPutAll:'{}  // no bytecode'; cr
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   797
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   798
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   799
        ^ self
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   800
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   801
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   802
    self enumerateInstructions.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   803
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   804
    "Modified: / 9.11.1999 / 15:33:20 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   805
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   806
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   807
enumerateInstructions
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   808
    |who endPC insn spec op wide|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   809
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   810
    wide := false.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   811
    pc := 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   812
    endPC := code size.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   813
    [pc <= endPC] whileTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   814
        insn := code at:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   815
        pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   816
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   817
        spec := DecoderTable at:(insn + 1).
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   818
        spec isNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   819
            op := '** invalid opcode: ', insn printString, ' **'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   820
        ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   821
            op := spec at:1
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   822
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   823
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   824
        outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   825
            outStream 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   826
                show:((pc - 1 - 1) printStringPaddedTo:4); 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   827
                show:' '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   828
            outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   829
                show:(wide ifTrue:[op , '(w)'] ifFalse:[op]).
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   830
            outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   831
                show:' '.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   832
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   833
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   834
        op == #wide ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   835
            wide := true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   836
        ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   837
            self instructionHookPC:(pc-1) op:op spec:spec.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   838
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   839
            spec notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   840
                spec from:2 to:spec size do:[:what |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   841
                    wide ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   842
                        self perform:(what , '_wide') asSymbol.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   843
                    ] ifFalse:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   844
                        self perform:what
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   845
                    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   846
                ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   847
            ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   848
            wide := false.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   849
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   850
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   851
        outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   852
            outStream cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   853
        ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   854
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   855
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   856
    "Created: / 9.11.1999 / 15:32:49 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   857
    "Modified: / 9.11.1999 / 15:36:22 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   858
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   859
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   860
instructionHookPC:pc op:op spec:spec
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   861
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   862
    "Created: / 9.11.1999 / 15:35:19 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   863
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   864
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   865
!JavaDecompiler methodsFor:'operand decoding'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   866
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   867
arrayTypeByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   868
    |hi low index type|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   869
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   870
    index := code at:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   871
    pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   872
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   873
    type := #('T_ARRAY' 'invalid2' 'invalid3' 'T_BOOLEAN'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   874
              'T_CHAR'  'T_FLOAT'  'T_DOUBLE'  'T_BYTE' 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   875
              'T_SHORT' 'T_INT'    'T_LONG' ) at:index ifAbsent:['invalid' , index printString].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   876
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   877
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   878
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   879
            show:index; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   880
            show:' [';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   881
            show:type;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   882
            show:']'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   883
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   884
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   885
    "Created: / 16.11.1998 / 15:41:47 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   886
    "Modified: / 16.11.1998 / 15:43:27 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   887
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   888
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   889
constIndexByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   890
    lastConstIndex := code at:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   891
    pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   892
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   893
    lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   894
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   895
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   896
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   897
            show:lastConstIndex; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   898
            show:' ['; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   899
            show:(lastConstant ? '??') displayString; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   900
            show:'] '
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   901
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   902
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   903
    "Created: / 16.11.1998 / 15:42:56 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   904
    "Modified: / 16.11.1998 / 15:58:52 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   905
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   906
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   907
constIndexShort
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   908
    |s|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   909
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   910
    lastConstIndex := code wordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   911
    pc := pc + 2.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   912
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   913
    lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   914
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   915
        s := (lastConstant ? '??') displayString.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   916
        s isString ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   917
            s bitsPerCharacter > 8 ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   918
                s := '...a 2-byte string...'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   919
            ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   920
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   921
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   922
            show:lastConstIndex; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   923
            show:' ['; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   924
            show:s; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   925
            show:'] '
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   926
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   927
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   928
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   929
    "Modified: / 16.11.1998 / 15:59:23 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   930
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   931
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   932
dimensionsByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   933
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   934
        outStream show:' dims= '. 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   935
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   936
    self unsignedByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   937
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   938
    "Modified: / 9.11.1999 / 15:46:06 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   939
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   940
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   941
localIndexByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   942
    |index|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   943
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   944
    index := code at:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   945
    pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   946
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   947
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   948
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   949
            show:index; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   950
            show:' '
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   951
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   952
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   953
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   954
    "Modified: / 16.11.1998 / 15:43:55 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   955
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   956
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   957
localIndexByte_wide
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   958
    |index|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   959
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   960
    index := code wordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   961
    pc := pc + 2.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   962
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   963
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   964
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   965
            show:index; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   966
            show:' '
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   967
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   968
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   969
    "Created: / 4.8.1997 / 19:02:09 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   970
    "Modified: / 16.11.1998 / 15:44:02 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   971
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   972
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   973
lookupSwitchBytes
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   974
    |defaultOffset delta nPairs match pc0|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   975
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   976
    pc0 := pc-1.  "/ i.e. the pc of the tableSwitch op
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   977
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   978
    [(pc-1) \\ 4 ~~ 0] whileTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   979
        pc := pc + 1
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   980
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   981
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   982
    defaultOffset := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   983
    pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   984
    nPairs := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   985
    pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   986
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   987
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   988
        outStream show:'n='; show:nPairs; cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   989
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   990
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   991
    nPairs timesRepeat:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   992
        match := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   993
        pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   994
        delta := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   995
        pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   996
        outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   997
            outStream show:'    '; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   998
                      show:match;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   999
                      show:' -> ';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1000
                      show:delta;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1001
                      show:' [';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1002
                      show:(pc0 - 1 + delta);
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1003
                      show:']';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1004
                      cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1005
        ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1006
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1007
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1008
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1009
        outStream show:'    '; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1010
                  show:'default';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1011
                  show:' -> ';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1012
                  show:defaultOffset;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1013
                  show:' [';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1014
                  show:(pc0 - 1 + defaultOffset);
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1015
                  show:']'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1016
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1017
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1018
    "Modified: / 9.11.1999 / 15:45:50 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1019
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1020
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1021
nargsByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1022
    |byte constants|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1023
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1024
    byte := code byteAt:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1025
    pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1026
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1027
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1028
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1029
            show:byte 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1030
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1031
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1032
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1033
    "Modified: / 16.11.1998 / 15:44:34 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1034
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1035
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1036
reservedByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1037
    |byte constants|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1038
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1039
    byte := code byteAt:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1040
    pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1041
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1042
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1043
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1044
            show:byte 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1045
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1046
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1047
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1048
    "Modified: / 16.11.1998 / 15:44:42 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1049
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1050
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1051
signedBranchShort
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1052
    |index constants|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1053
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1054
    index := code signedWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1055
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1056
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1057
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1058
            show:index; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1059
            show:' ['; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1060
            show:(pc - 1 + index - 1); 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1061
            show:']'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1062
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1063
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1064
    pc := pc + 2.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1065
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1066
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1067
    "Modified: / 16.11.1998 / 15:44:51 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1068
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1069
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1070
signedByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1071
    |byte constants|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1072
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1073
    byte := code signedByteAt:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1074
    pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1075
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1076
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1077
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1078
            show:byte 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1079
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1080
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1081
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1082
    "Modified: / 16.11.1998 / 15:44:58 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1083
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1084
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1085
signedByte_wide
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1086
    self signedShort
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1087
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1088
    "Created: / 13.1.1998 / 23:56:36 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1089
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1090
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1091
signedShort
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1092
    |word constants|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1093
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1094
    word := code signedWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1095
    pc := pc + 2.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1096
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1097
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1098
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1099
            show:word 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1100
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1101
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1102
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1103
    "Modified: / 16.11.1998 / 15:45:06 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1104
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1105
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1106
tableSwitchBytes
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1107
    |defaultOffset delta low high pc0|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1108
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1109
    pc0 := pc-1.  "/ i.e. the pc of the tableSwitch op
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1110
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1111
    [(pc-1) \\ 4 ~~ 0] whileTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1112
        pc := pc + 1
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1113
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1114
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1115
    defaultOffset := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1116
    pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1117
    low := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1118
    pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1119
    high := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1120
    pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1121
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1122
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1123
        outStream cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1124
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1125
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1126
    low to:high do:[:switchValue |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1127
        delta := code signedDoubleWordAt:pc MSB:true.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1128
        pc := pc + 4.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1129
        outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1130
            outStream show:'    '; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1131
                      show:switchValue;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1132
                      show:' -> ';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1133
                      show:delta;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1134
                      show:' [';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1135
                      show:(pc0 - 1 + delta);
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1136
                      show:']';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1137
                      cr.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1138
        ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1139
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1140
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1141
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1142
        outStream show:'    '; 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1143
                  show:'default';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1144
                  show:' -> ';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1145
                  show:defaultOffset;
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1146
                  show:' [';
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1147
                  show:(pc0 - 1 + defaultOffset);
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1148
                  show:']'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1149
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1150
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1151
    "Modified: / 9.11.1999 / 15:44:36 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1152
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1153
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1154
unsignedByte
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1155
    |byte constants|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1156
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1157
    byte := code byteAt:pc.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1158
    pc := pc + 1.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1159
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1160
    outStream notNil ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1161
        outStream
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1162
            show:byte 
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1163
    ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1164
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1165
    "Created: / 16.4.1996 / 15:00:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1166
    "Modified: / 16.11.1998 / 15:45:33 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1167
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1168
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1169
!JavaDecompiler methodsFor:'private'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1170
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1171
popType:type
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1172
    (type == #long) ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1173
        ^ self popLong
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1174
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1175
    type == #double ifTrue:[
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1176
        ^ self popDouble
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1177
    ].
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1178
    ^ self popStack
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1179
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1180
    "Created: 16.8.1997 / 03:14:11 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1181
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1182
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1183
!JavaDecompiler methodsFor:'statistics'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1184
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1185
remember_athrow
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1186
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1187
    "Created: / 16.11.1998 / 19:37:32 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1188
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1189
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1190
remember_getfield
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1191
    |fieldRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1192
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1193
    fieldRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1194
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1195
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1196
    "Created: / 16.11.1998 / 16:07:58 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1197
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1198
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1199
remember_getstatic
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1200
    |fieldRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1201
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1202
    fieldRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1203
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1204
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1205
    "Created: / 16.11.1998 / 16:08:06 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1206
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1207
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1208
remember_invokeinterface
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1209
    |mthdRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1210
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1211
    mthdRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1212
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1213
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1214
    "Created: / 16.11.1998 / 16:07:29 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1215
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1216
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1217
remember_invokenonvirtual
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1218
    |mthdRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1219
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1220
    mthdRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1221
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1222
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1223
    "Created: / 16.11.1998 / 16:06:49 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1224
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1225
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1226
remember_invokestatic
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1227
    |mthdRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1228
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1229
    mthdRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1230
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1231
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1232
    "Created: / 16.11.1998 / 16:06:40 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1233
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1234
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1235
remember_invokevirtual
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1236
    |mthdRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1237
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1238
    mthdRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1239
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1240
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1241
    "Created: / 16.11.1998 / 16:06:32 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1242
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1243
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1244
remember_ldc1
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1245
    |what|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1246
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1247
    what := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1248
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1249
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1250
    "Created: / 16.11.1998 / 16:07:12 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1251
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1252
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1253
remember_ldc2
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1254
    |what|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1255
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1256
    what := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1257
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1258
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1259
    "Created: / 16.11.1998 / 16:07:19 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1260
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1261
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1262
remember_ldc2w
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1263
    |what|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1264
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1265
    what := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1266
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1267
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1268
    "Created: / 16.11.1998 / 16:07:20 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1269
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1270
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1271
remember_new
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1272
    |class|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1273
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1274
    class := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1275
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1276
    "Created: / 16.11.1998 / 15:59:43 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1277
    "Modified: / 16.11.1998 / 16:12:27 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1278
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1279
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1280
remember_putfield
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1281
    |fieldRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1282
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1283
    fieldRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1284
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1285
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1286
    "Created: / 16.11.1998 / 16:08:00 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1287
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1288
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1289
remember_putstatic
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1290
    |fieldRef|
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1291
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1292
    fieldRef := lastConstant.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1293
    "/ ....
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1294
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1295
    "Created: / 16.11.1998 / 16:08:04 / cg"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1296
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1297
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1298
!JavaDecompiler class methodsFor:'documentation'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1299
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1300
version
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1301
    ^ '$Id$'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1302
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1303
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1304
version_SVN
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1305
    ^ '$Id$'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1306
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1307
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1308
JavaDecompiler initialize!