JavaClassMemberRef2.st
author Claus Gittinger <cg@exept.de>
Sun, 23 Feb 2020 14:03:15 +0100
branchcvs_MAIN
changeset 3997 5bb44f7e1d20
parent 3412 df11bb428463
permissions -rw-r--r--
#REFACTORING by exept class: Java class changed: #dumpConfigOn:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     1
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3235
diff changeset
     2
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
     3
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
     5
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3235
diff changeset
     6
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     8
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    18
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    19
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    20
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    23
JavaRef2 subclass:#JavaClassMemberRef2
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    24
	instanceVariableNames:'classRefIndex nameAndTypeIndex resolvedClass type'
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    25
	classVariableNames:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    26
	poolDictionaries:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
	category:'Languages-Java-Reader-Support-new'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    30
!JavaClassMemberRef2 class methodsFor:'documentation'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
copyright
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3235
diff changeset
    34
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    35
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    36
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    37
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3235
diff changeset
    38
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    40
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    41
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    48
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    49
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    50
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
    51
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    52
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    53
"
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    54
!
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    55
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    56
documentation
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    57
"
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    58
    An abstract base superclass for method refs and field refs.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    59
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    60
    [author:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    61
        Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    62
        Jan Vrany <jan.vrany@fit.cvut.cz>
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    63
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    64
    [instance variables:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    65
        classRefIndex ...... index to constant pool to classref describing
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    66
                             method's or field's class.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    67
        nameAndTypeIndex ... index to constant pool to name-and-type structure
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    68
                             describing name and type of field or name and descriptor
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    69
                             of a method.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    70
      !! resolvedClass ...... once a reference is resolved, this slot contains
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    71
                             the class to in which this method/field is defined.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    72
                             !!!!!! Used by the VM !!!!!!               
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    73
      !! type ............... this slot contains integer of value:
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    74
                              - ACX_R_VOID     if method returns void.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    75
                              - ACX_R_DOUBLE   if method returns long / field is of type long
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    76
                              - ACX_R_DOUBLE   if method returns double / field is of type double
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    77
                              - 0              otherwise.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    78
                             This value is used by both interpreter and JIT compiler to correctly
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    79
                             push/pop values onto/from stack. long/double occupies 2 slots (2x 32 bit)
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    80
                             !!!!!! Used by the VM !!!!!!               
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    81
    [class variables:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    82
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    83
    [see also:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    84
        JavaFieldRef2
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    85
        JavaMethodRef2
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    86
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    87
"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
    90
!JavaClassMemberRef2 class methodsFor:'instance creation'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
in: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
    ^ self basicNew 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    94
        initializeIn: aJavaConstantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    95
        withNameAndTypeAt: nameAndTypeCPIndex
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    96
        andClassAt: classRefCPIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
    "Created: / 12-05-2011 / 18:36:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   100
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   101
!JavaClassMemberRef2 methodsFor:'accessing'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   103
classRef
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   104
    ^ constantPool at: classRefIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   105
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   106
    "Modified: / 12-05-2011 / 18:38:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   107
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
descriptor
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
    ^ self nameAndType descriptor.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
    "Created: / 08-04-2011 / 15:08:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
    "Modified: / 12-05-2011 / 18:39:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
2978
f44a7499454b Added _GETFIELD_R:_:/ _GETSTATIC_R: / _PUTFIELD_R:_:_: / _PUTSTATIC_R:_: (used by new JIT code)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   116
javaClass
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   117
    ^ resolvedClass
2978
f44a7499454b Added _GETFIELD_R:_:/ _GETSTATIC_R: / _PUTFIELD_R:_:_: / _PUTSTATIC_R:_: (used by new JIT code)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   118
f44a7499454b Added _GETFIELD_R:_:/ _GETSTATIC_R: / _PUTFIELD_R:_:_: / _PUTSTATIC_R:_: (used by new JIT code)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   119
    "Created: / 20-01-2014 / 15:03:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
f44a7499454b Added _GETFIELD_R:_:/ _GETSTATIC_R: / _PUTFIELD_R:_:_: / _PUTSTATIC_R:_: (used by new JIT code)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   120
!
f44a7499454b Added _GETFIELD_R:_:/ _GETSTATIC_R: / _PUTFIELD_R:_:_: / _PUTSTATIC_R:_: (used by new JIT code)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   121
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   122
name
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   123
    ^ self nameAndType name.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   124
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   125
    "Created: / 08-04-2011 / 13:54:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   126
    "Modified: / 12-05-2011 / 18:39:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   127
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   128
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   129
nameAndType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   130
    ^ constantPool at: nameAndTypeIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   131
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
    "Created: / 11-04-2011 / 19:57:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   133
    "Modified: / 12-05-2011 / 18:39:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   134
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   135
3235
6a5d85f29c3a Fixes for reloading
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2992
diff changeset
   136
resolvedClass
6a5d85f29c3a Fixes for reloading
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2992
diff changeset
   137
    ^ resolvedClass
6a5d85f29c3a Fixes for reloading
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2992
diff changeset
   138
!
6a5d85f29c3a Fixes for reloading
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2992
diff changeset
   139
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
selector
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
    ^ self nameAndType selector.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
    "Created: / 11-04-2011 / 20:38:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
    "Modified: / 12-05-2011 / 18:39:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   147
signature
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   148
    ^ self nameAndType signature.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   149
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   150
    "Created: / 20-05-2011 / 17:10:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   151
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   153
!JavaClassMemberRef2 methodsFor:'comparing'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   154
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   155
= anotherJavaRef
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   156
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   157
    ^ self class == anotherJavaRef class 
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   158
        and:[self classRef = anotherJavaRef classRef
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   159
            and:[self nameAndType = anotherJavaRef nameAndType]]
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   160
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   161
    "Modified: / 30-08-2013 / 17:15:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   162
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   163
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   164
hash
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   165
    ^ self classRef hash bitXor: self nameAndType hash
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   166
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   167
    "Modified: / 30-08-2013 / 17:14:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   168
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   169
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   170
!JavaClassMemberRef2 methodsFor:'initialization'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   171
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   172
initializeIn: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   173
    constantPool := aJavaConstantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   174
    classRefIndex := classRefCPIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   175
    nameAndTypeIndex := nameAndTypeCPIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   176
    super initialize.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   177
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   178
    "Created: / 12-05-2011 / 18:37:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   179
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   180
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   181
!JavaClassMemberRef2 methodsFor:'printing'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   182
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   183
displayString
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   184
    "superclass JavaRef2 says that I am responsible to implement this method"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   185
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   186
    ^ self classRef displayString , '.' , self name
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   187
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   188
    "Created: / 14-08-2011 / 21:18:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   189
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   190
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   191
printString
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   192
    ^ 'JavaClassContentRef: class=[' , self classRef printString , '] name=[' 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   193
        , self nameAndType printString , ']'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   194
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   195
    "Created: / 10-05-2011 / 14:15:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   196
    "Modified: / 12-05-2011 / 18:40:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   197
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   198
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   199
!JavaClassMemberRef2 methodsFor:'resolving'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   200
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   201
invalidate
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   202
    self classRef invalidate.    
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   203
    resolvedClass := nil.
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   204
    ^ super invalidate.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   205
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   206
    "Created: / 13-04-2011 / 12:21:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   207
    "Modified: / 18-05-2011 / 12:41:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   208
    "Modified: / 31-01-2014 / 03:02:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   209
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   210
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   211
invalidateForClass: class 
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   212
    "Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   213
     Return true, if reference was invalidated."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   214
    
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   215
    (self classRef invalidateForClass: class) ifTrue: [
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   216
        self invalidate.
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   217
        ^ true
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   218
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   219
    ^ false.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   220
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   221
    "Modified: / 12-05-2011 / 18:40:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   222
    "Modified (format): / 21-02-2012 / 10:21:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   223
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   224
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2978
diff changeset
   225
!JavaClassMemberRef2 class methodsFor:'documentation'!
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   226
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   227
version_CVS
3412
df11bb428463 Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3360
diff changeset
   228
    ^ '$Header: /cvs/stx/stx/libjava/JavaClassMemberRef2.st,v 1.2 2015-03-20 12:07:59 vrany Exp $'
2255
8e7491f627a9 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   229
!
8e7491f627a9 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   230
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   231
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   232
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   233
    ^ '$Changeset: <not expanded> $'
2227
6af10f8ad39e added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   234
!
6af10f8ad39e added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   235
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   236
version_SVN
2731
13f5be2bf83b Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2711 2678
diff changeset
   237
    ^ 'Id'
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   238
! !
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2255
diff changeset
   239