JavaConstantPool.st
branchdevelopment
changeset 2976 a384a02381c0
parent 2817 96f3e2254489
child 2992 732f9db2a195
equal deleted inserted replaced
2975:ec1f7113fac0 2976:a384a02381c0
   127         put: (JavaNameAndType2 in: self withNameAt: nameIndex andDescriptorAt: descriptorIndex).
   127         put: (JavaNameAndType2 in: self withNameAt: nameIndex andDescriptorAt: descriptorIndex).
   128 
   128 
   129     "Created: / 13-05-2011 / 09:05:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
   129     "Created: / 13-05-2011 / 09:05:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
   130 ! !
   130 ! !
   131 
   131 
       
   132 !JavaConstantPool methodsFor:'invalidation'!
       
   133 
       
   134 invalidate 
       
   135     "Invalidate all resolved references. Returns true if at least one ref has 
       
   136      been invalidated, false otherwise"
       
   137     
       
   138     | anyInvalidated |
       
   139 
       
   140     anyInvalidated := false.
       
   141     self do: [:ref | 
       
   142         (ref notNil and: [ ref isString not and: [ ref isNumber not ] ]) ifTrue: [
       
   143             anyInvalidated := anyInvalidated | (ref invalidate)
       
   144         ].
       
   145     ].
       
   146     anyInvalidated ifTrue:[ JavaVM flushCachesFor: owner  ].  
       
   147     ^ anyInvalidated
       
   148 
       
   149     "Created: / 20-01-2014 / 09:43:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   150 !
       
   151 
       
   152 invalidateForClass: binaryName 
       
   153     "Invalidate all resolved references to given class.
       
   154      Returns true if at least one ref has been invalidated,
       
   155      false otherwise"
       
   156     
       
   157     | anyInvalidated |
       
   158 
       
   159     anyInvalidated := false.
       
   160     self do: [:ref | 
       
   161         (ref notNil and: [ ref isString not and: [ ref isNumber not ] ]) ifTrue: [
       
   162             anyInvalidated := anyInvalidated 
       
   163                     | (ref invalidateForClass: binaryName)
       
   164         ].
       
   165     ].
       
   166     anyInvalidated ifTrue:[ JavaVM flushCachesFor: owner  ].
       
   167     ^ anyInvalidated
       
   168 
       
   169     "Created: / 08-04-2011 / 16:11:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
       
   170     "Modified: / 20-01-2014 / 10:15:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   171 ! !
   132 
   172 
   133 !JavaConstantPool methodsFor:'printing & storing'!
   173 !JavaConstantPool methodsFor:'printing & storing'!
   134 
   174 
   135 displayString
   175 displayString
   136     owner isNil ifTrue:[
   176     owner isNil ifTrue:[