Fixed JavaMethod>>referencesLiteral: and other literal-access methods
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 29 Jul 2016 10:54:57 +0100
changeset 3605 da57f13e6a23
parent 3604 c83d1af09f6c
child 3612 8034fe0e17e2
Fixed JavaMethod>>referencesLiteral: and other literal-access methods ...used by the IDE. JVM does not use per-method literal frame but per-class constant pool. Therefore to get a list of literals referenced by a Java method one has to analyze method's bytecode. For searching methods such as #referencesLiteral: one can quickly scan whole constant pool to rule-out methods that cannot possibly refer to given object. For tools courtesy, class refs and method refs create a literal of class Symbol with value of class's binary name and method's selector. This make queries like #referencesLiteral: to behave somewhat like they do for Smalltalk. This fixes "Class" -> "Spawn" -> "Buffer with Refereces to Class" for Java classes.
JavaByteCodeEnumerator.st
JavaByteCodeProcessor.st
JavaClassRef2.st
JavaExceptionTests.st
JavaMethod.st
JavaMethodAnalyzer.st
JavaRef2.st
JavaStringRef2.st
Make.proto
Make.spec
abbrev.stc
bc.mak
experiments/JavaByteCodeInterpreter.st
libInit.cc
stx_libjava.st
--- a/JavaByteCodeEnumerator.st	Thu Jul 28 09:47:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-"
- COPYRIGHT (c) 1996-2015 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
-                            SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
-     of one of the above copright owners. For exact set of such code,
-     see the differences between this version and version stx:libjava
-     as of 1.9.2010
-"
-"{ Package: 'stx:libjava' }"
-
-JavaDecompiler subclass:#JavaByteCodeEnumerator
-	instanceVariableNames:'literalAction'
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Languages-Java-Support-Decompiling'
-!
-
-!JavaByteCodeEnumerator class methodsFor:'documentation'!
-
-copyright
-"
- COPYRIGHT (c) 1996-2015 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
-                            SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
-     of one of the above copright owners. For exact set of such code,
-     see the differences between this version and version stx:libjava
-     as of 1.9.2010
-
-"
-! !
-
-!JavaByteCodeEnumerator methodsFor:'accessing'!
-
-literalAction
-    "return the value of the instance variable 'literalAction' (automatically generated)"
-
-    ^ literalAction
-
-    "Created: / 9.11.1999 / 15:27:37 / cg"
-!
-
-literalAction:something
-    "set the value of the instance variable 'literalAction' (automatically generated)"
-
-    literalAction := something.
-
-    "Created: / 9.11.1999 / 15:27:37 / cg"
-! !
-
-!JavaByteCodeEnumerator methodsFor:'operand decoding'!
-
-constIndexByte
-    lastConstIndex := code at:pc.
-    pc := pc + 1.
-
-    lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
-    literalAction notNil ifTrue:[
-        literalAction value:pc-2 value:lastConstIndex value:lastConstant
-    ].
-
-    "Created: / 9.11.1999 / 15:26:42 / cg"
-    "Modified: / 9.11.1999 / 15:29:24 / cg"
-!
-
-constIndexShort
-    lastConstIndex := code wordAt:pc MSB:true.
-    pc := pc + 2.
-
-    lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
-
-    literalAction notNil ifTrue:[
-        literalAction value:pc-3 value:lastConstIndex value:lastConstant
-    ].
-
-    "Created: / 9.11.1999 / 15:27:32 / cg"
-    "Modified: / 9.11.1999 / 15:29:31 / cg"
-! !
-
-!JavaByteCodeEnumerator methodsFor:'processing'!
-
-instructionHookPC:pc op:op spec:spec
-"/    self halt.
-
-    "Created: / 9.11.1999 / 15:35:39 / cg"
-    "Modified: / 9.11.1999 / 17:21:18 / cg"
-!
-
-remember_invokeinterface
-"/    self halt.
-
-    "Created: / 9.11.1999 / 17:20:58 / cg"
-    "Modified: / 9.11.1999 / 17:22:04 / cg"
-!
-
-remember_invokenonvirtual
-"/    self halt.
-
-    "Created: / 9.11.1999 / 17:21:06 / cg"
-    "Modified: / 9.11.1999 / 17:21:51 / cg"
-!
-
-remember_invokestatic
-"/    self halt.
-
-    "Modified: / 9.11.1999 / 17:22:00 / cg"
-    "Created: / 9.11.1999 / 17:22:14 / cg"
-!
-
-remember_invokevirtual
-"/    self halt.
-
-    "Created: / 9.11.1999 / 17:21:08 / cg"
-    "Modified: / 9.11.1999 / 17:22:00 / cg"
-! !
-
-!JavaByteCodeEnumerator class methodsFor:'documentation'!
-
-version
-    ^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.11 2015-03-20 12:07:59 vrany Exp $'
-!
-
-version_CVS
-    ^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.11 2015-03-20 12:07:59 vrany Exp $'
-!
-
-version_HG
-
-    ^ '$Changeset: <not expanded> $'
-!
-
-version_SVN
-    ^ 'Id'
-! !
-
--- a/JavaByteCodeProcessor.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/JavaByteCodeProcessor.st	Fri Jul 29 10:54:57 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996-2015 by Claus Gittinger
 
@@ -1522,7 +1524,7 @@
     ^ self subclassResponsibility
     "
      Description
-     The <n> must be an index into the local variable array of the current frame (§3.6).
+     The <n> must be an index into the local variable array of the current frame (§3.6).
      The local variable at <n> must contain an int. The value of the local variable
      at <n> is pushed onto the operand stack.
 
@@ -1543,7 +1545,7 @@
 
     "
      Description
-     The <n> must be an index into the local variable array of the current frame (§3.6).
+     The <n> must be an index into the local variable array of the current frame (§3.6).
      The local variable at <n> must contain an int. The value of the local variable
      at <n> is pushed onto the operand stack.
 
@@ -1708,7 +1710,7 @@
     ^ self subclassResponsibility
     "
      Description
-     The <n> must be an index into the local variable array of the current frame (§3.6).
+     The <n> must be an index into the local variable array of the current frame (§3.6).
      The value on the top of the operand stack must be of type int. It is popped from
      the operand stack, and the value of the local variable at <n> is set to value.
 
@@ -1728,7 +1730,7 @@
 
     "
      Description
-     The <n> must be an index into the local variable array of the current frame (§3.6).
+     The <n> must be an index into the local variable array of the current frame (§3.6).
      The value on the top of the operand stack must be of type int. It is popped from
      the operand stack, and the value of the local variable at <n> is set to value.
 
@@ -1904,18 +1906,220 @@
     "raise an error: must be redefined in concrete subclass(es)"
 
     ^ self subclassResponsibility
+
+    "
+    Operation
+
+       Push item from run-time constant pool
+
+    Format
+
+       ldc
+       index
+
+    Forms
+
+       ldc = 18 (0x12)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The index is an unsigned byte that must be a valid index into
+       the run-time constant pool of the current class ([384]§2.6).
+       The run-time constant pool entry at index either must be a
+       run-time constant of type int or float, or a reference to a
+       string literal, or a symbolic reference to a class, method
+       type, or method handle ([385]§5.1).
+
+       If the run-time constant pool entry is a run-time constant of
+       type int or float, the numeric value of that run-time constant
+       is pushed onto the operand stack as an int or float,
+       respectively.
+
+       Otherwise, if the run-time constant pool entry is a reference
+       to an instance of class String representing a string literal
+       ([386]§5.1), then a reference to that instance, value, is
+       pushed onto the operand stack.
+
+       Otherwise, if the run-time constant pool entry is a symbolic
+       reference to a class ([387]§5.1), then the named class is
+       resolved ([388]§5.4.3.1) and a reference to the Class object
+       representing that class, value, is pushed onto the operand
+       stack.
+
+       Otherwise, the run-time constant pool entry must be a symbolic
+       reference to a method type or a method handle ([389]§5.1). The
+       method type or method handle is resolved ([390]§5.4.3.5) and a
+       reference to the resulting instance of
+       java.lang.invoke.MethodType or java.lang.invoke.MethodHandle,
+       value, is pushed onto the operand stack.
+
+    Linking Exceptions
+
+       During resolution of a symbolic reference to a class, any of
+       the exceptions pertaining to class resolution ([391]§5.4.3.1)
+       can be thrown.
+
+       During resolution of a symbolic reference to a method type or
+       method handle, any of the exception pertaining to method type
+       or method handle resolution ([392]§5.4.3.5) can be thrown.
+
+    Notes
+
+       The ldc instruction can only be used to push a value of type
+       float taken from the float value set ([393]§2.3.2) because a
+       constant of type float in the constant pool ([394]§4.4.4) must
+       be taken from the float value set.
+    "
+
+    "Modified (comment): / 29-07-2016 / 09:11:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 ldc2
     "raise an error: must be redefined in concrete subclass(es)"
 
     ^ self subclassResponsibility
+
+    "
+    ldc_w
+
+    Operation
+
+       Push item from run-time constant pool (wide index)
+
+    Format
+
+       ldc_w
+       indexbyte1
+       indexbyte2
+
+    Forms
+
+       ldc_w = 19 (0x13)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The unsigned indexbyte1 and indexbyte2 are assembled into an
+       unsigned 16-bit index into the run-time constant pool of the
+       current class ([395]§2.6), where the value of the index is
+       calculated as (indexbyte1 << 8) | indexbyte2. The index must be
+       a valid index into the run-time constant pool of the current
+       class. The run-time constant pool entry at the index either
+       must be a run-time constant of type int or float, or a
+       reference to a string literal, or a symbolic reference to a
+       class, method type, or method handle ([396]§5.1).
+
+       If the run-time constant pool entry is a run-time constant of
+       type int or float, the numeric value of that run-time constant
+       is pushed onto the operand stack as an int or float,
+       respectively.
+
+       Otherwise, if the run-time constant pool entry is a reference
+       to an instance of class String representing a string literal
+       ([397]§5.1), then a reference to that instance, value, is
+       pushed onto the operand stack.
+
+       Otherwise, if the run-time constant pool entry is a symbolic
+       reference to a class ([398]§4.4.1). The named class is resolved
+       ([399]§5.4.3.1) and a reference to the Class object
+       representing that class, value, is pushed onto the operand
+       stack.
+
+       Otherwise, the run-time constant pool entry must be a symbolic
+       reference to a method type or a method handle ([400]§5.1). The
+       method type or method handle is resolved ([401]§5.4.3.5) and a
+       reference to the resulting instance of
+       java.lang.invoke.MethodType or java.lang.invoke.MethodHandle,
+       value, is pushed onto the operand stack.
+
+    Linking Exceptions
+
+       During resolution of the symbolic reference to a class, any of
+       the exceptions pertaining to class resolution ([402]§5.4.3.1)
+       can be thrown.
+
+       During resolution of a symbolic reference to a method type or
+       method handle, any of the exception pertaining to method type
+       or method handle resolution ([403]§5.4.3.5) can be thrown.
+
+    Notes
+
+       The ldc_w instruction is identical to the ldc instruction
+       ([404]§ldc) except for its wider run-time constant pool index.
+
+       The ldc_w instruction can only be used to push a value of type
+       float taken from the float value set ([405]§2.3.2) because a
+       constant of type float in the constant pool ([406]§4.4.4) must
+       be taken from the float value set.
+    "
+
+    "Modified (comment): / 29-07-2016 / 09:12:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 ldc2w
     "raise an error: must be redefined in concrete subclass(es)"
 
     ^ self subclassResponsibility
+
+    "
+    ldc2_w
+
+    Operation
+
+       Push long or double from run-time constant pool (wide index)
+
+    Format
+
+       ldc2_w
+       indexbyte1
+       indexbyte2
+
+    Forms
+
+       ldc2_w = 20 (0x14)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The unsigned indexbyte1 and indexbyte2 are assembled into an
+       unsigned 16-bit index into the run-time constant pool of the
+       current class ([407]§2.6), where the value of the index is
+       calculated as (indexbyte1 << 8) | indexbyte2. The index must be
+       a valid index into the run-time constant pool of the current
+       class. The run-time constant pool entry at the index must be a
+       run-time constant of type long or double ([408]§5.1). The
+       numeric value of that run-time constant is pushed onto the
+       operand stack as a long or double, respectively.
+
+    Notes
+
+       Only a wide-index version of the ldc2_w instruction exists;
+       there is no ldc2 instruction that pushes a long or double with
+       a single-byte index.
+
+       The ldc2_w instruction can only be used to push a value of type
+       double taken from the double value set ([409]§2.3.2) because a
+       constant of type double in the constant pool ([410]§4.4.5) must
+       be taken from the double value set.
+    "
+
+    "Modified (comment): / 29-07-2016 / 09:13:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 ldiv
--- a/JavaClassRef2.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/JavaClassRef2.st	Fri Jul 29 10:54:57 2016 +0100
@@ -20,6 +20,8 @@
 "
 "{ Package: 'stx:libjava' }"
 
+"{ NameSpace: Smalltalk }"
+
 JavaRef2 subclass:#JavaClassRef2
 	instanceVariableNames:'nameIndex'
 	classVariableNames:''
@@ -283,12 +285,6 @@
 
 !JavaClassRef2 methodsFor:'queries'!
 
-isJavaClassOrStringRef
-    ^ true.
-
-    "Created: / 11-04-2011 / 19:10:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
 isJavaClassRef
     ^true.
 
--- a/JavaExceptionTests.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/JavaExceptionTests.st	Fri Jul 29 10:54:57 2016 +0100
@@ -67,7 +67,6 @@
     "Created: / 30-03-2012 / 13:38:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !JavaExceptionTests methodsFor:'callbacks'!
 
 call: trhower with: aBoolean 
--- a/JavaMethod.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/JavaMethod.st	Fri Jul 29 10:54:57 2016 +0100
@@ -1071,30 +1071,41 @@
     "Modified: / 13-12-2010 / 11:06:40 / Jan Kurs <kurs.jan@post.cz>"
 !
 
-literalsDetect:aBlock ifNone:exceptionBlock
-    "execute a one arg block for each of our literals.
-     return the first literal for which aBlock returns true"
-
-    "/ sigh - must first extract all accessed literals ...
-    "/ must deparse the byteCode in order to do this.
-
-    |walker|
-
-    walker := JavaByteCodeEnumerator new.
-    walker literalAction:[:pc :slotIndex :const |
-        const isJavaMethodRef ifTrue:[
-            (aBlock value:(const name)) ifTrue:[^ const name].
-        ] ifFalse:[
-            const isJavaClassRef ifTrue:[
-                (aBlock value:(const name)) ifTrue:[^ const name].
-            ]
-        ]
-    ].
-    walker decompile:self to:nil.
-    ^ nil
-
-    "Created: / 9.11.1999 / 15:21:40 / cg"
-    "Modified: / 24.12.1999 / 02:55:55 / cg"
+literalAt:index ifAbsent:exceptionalValue
+    "return a literal element"
+
+    "/ JVM does not use per-method literal frame like Smalltalk.
+    "/ Therefore, #literalAt:ifAbsent: has now meaning and is not supported
+    self shouldNotImplement
+
+    "Created: / 29-07-2016 / 09:48:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+literalAt:index put:newValue
+    "change a literal slots value.
+     WARNING: dangerous internal interface; only for knowledgable users"
+
+    "/ JVM does not use per-method literal frame like Smalltalk.
+    "/ Therefore, #literalAt:put: has now meaning and is not supported
+    self shouldNotImplement
+
+    "Created: / 29-07-2016 / 09:46:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+literals
+    "return the literals as an array"
+
+    ^ Array streamContents: [ :s | self literalsDo:[:e | s nextPut: e] ]
+
+    "Created: / 29-07-2016 / 09:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+literalsDo:aBlock
+    "execute a one arg block for each of our literals"
+
+    self analyzer literalsDo: aBlock
+
+    "Created: / 29-07-2016 / 09:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 localVariableTable
@@ -2618,61 +2629,25 @@
     ^ javaClass package
 !
 
-referencesGlobal:aGlobalName
-    "return true, if this method refers to a global named aGlobalName"
-
-    |walker any|
-
-    "/ quick check, if constantPool includes a methodRef for this
-    "/ selector.
-
-    any := false.
-    self javaClass constantPool do:[:const |
-        (const isNumber
-        or:[const isString
-        or:[const isNil]]) ifFalse:[
-            const isJavaClass ifTrue:[
-                any := any or:[const fullName = aGlobalName].
-            ] ifFalse:[
-                const isJavaClassRef ifTrue:[
-                    any := any or:[const fullName = aGlobalName].
-                ]
-            ].
-        ].
-    ].
-    any ifFalse:[^ false].
-
-    "/ sigh - must extract all accessed literals ...
-    "/ must deparse the byteCode in order to do this.
-
-    walker := JavaByteCodeEnumerator new.
-    walker
-        literalAction:
-            [:pc :slotIndex :const |
-                |mSel|
-
-                (const isNumber
-                or:[const isString
-                or:[const isNil]]) ifFalse:[
-                    const isJavaClass ifTrue:[
-                        mSel := const fullName.
-                    ] ifFalse:[
-                        const isJavaClassRef ifTrue:[
-                            mSel := const fullName.
-                        ]
-                    ].
-                ].
-                mSel notNil ifTrue:[
-                    "/ Transcript showCR:mSel.
-                    mSel = aGlobalName ifTrue:[
-                        ^ true
-                    ]
-                ].
-            ].
-    walker decompile:self to:nil.
-
-    "Created: / 9.11.1999 / 17:15:46 / cg"
-    "Modified: / 9.11.1999 / 17:18:02 / cg"
+referencesLiteral:aLiteral
+    "return true, if this method directly references the given literal directly
+     (i.e. a flat search, which does not look deeper into literal arrays)."
+
+    | cp |
+
+    "/ JVM does not use per-method literal frame like Smalltalk but
+    "/ per-class constant pool. To avoid decompilation of bytecode to
+    "/ see what's actually referenced, do a quick-search through a constant
+    "/ pool to quickly rule out methods that cannot possibly refer to it.
+    cp := javaClass constantPool.
+    (cp includes: aLiteral) ifFalse:[ ^ false ].
+    ^super referencesLiteral:aLiteral.
+    "
+     (CompiledCode compiledMethodAt:#referencesLiteral:) referencesGlobal:#literalsDetect:ifNone:
+     (CompiledCode compiledMethodAt:#referencesLiteral:) referencesGlobal:#bla
+    "
+
+    "Created: / 29-07-2016 / 09:59:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 sends:aSelectorSymbol
--- a/JavaMethodAnalyzer.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/JavaMethodAnalyzer.st	Fri Jul 29 10:54:57 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996-2015 by Claus Gittinger
 
@@ -20,9 +22,12 @@
 "
 "{ Package: 'stx:libjava' }"
 
+"{ NameSpace: Smalltalk }"
+
 JavaByteCodeProcessorAdapter subclass:#JavaMethodAnalyzer
 	instanceVariableNames:'fieldsAccessed fieldsRead fieldsWritten staticsAccessed
-		staticsRead staticsWritten methodsInvoked refdClasses'
+		staticsRead staticsWritten methodsInvoked refdClasses
+		constantsAccessed'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Languages-Java-Support-Decompiling'
@@ -86,6 +91,30 @@
     "Created: / 30-08-2013 / 13:33:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!JavaMethodAnalyzer methodsFor:'enumerating'!
+
+literalsDo: aBlock
+    constantsAccessed do:aBlock.
+    refdClasses do:[:ref | 
+        | nameSym |
+
+        nameSym := ref name asSymbolIfInterned.
+        nameSym notNil ifTrue:[ 
+            aBlock value: nameSym.
+        ].
+    ].
+    methodsInvoked do:[:ref | 
+        | selectorSym |
+
+        selectorSym := (ref name , ref descriptor) asSymbolIfInterned.
+        selectorSym notNil ifTrue:[ 
+            aBlock value: selectorSym
+        ].
+    ]
+
+    "Created: / 29-07-2016 / 09:42:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !JavaMethodAnalyzer methodsFor:'instructions'!
 
 anewarray
@@ -146,6 +175,312 @@
     "Created: / 30-08-2013 / 17:05:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+ldc1
+    self ldc: self fetchIndex.
+    "
+    Operation
+
+       Push item from run-time constant pool
+
+    Format
+
+       ldc
+       index
+
+    Forms
+
+       ldc = 18 (0x12)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The index is an unsigned byte that must be a valid index into
+       the run-time constant pool of the current class ([384]§2.6).
+       The run-time constant pool entry at index either must be a
+       run-time constant of type int or float, or a reference to a
+       string literal, or a symbolic reference to a class, method
+       type, or method handle ([385]§5.1).
+
+       If the run-time constant pool entry is a run-time constant of
+       type int or float, the numeric value of that run-time constant
+       is pushed onto the operand stack as an int or float,
+       respectively.
+
+       Otherwise, if the run-time constant pool entry is a reference
+       to an instance of class String representing a string literal
+       ([386]§5.1), then a reference to that instance, value, is
+       pushed onto the operand stack.
+
+       Otherwise, if the run-time constant pool entry is a symbolic
+       reference to a class ([387]§5.1), then the named class is
+       resolved ([388]§5.4.3.1) and a reference to the Class object
+       representing that class, value, is pushed onto the operand
+       stack.
+
+       Otherwise, the run-time constant pool entry must be a symbolic
+       reference to a method type or a method handle ([389]§5.1). The
+       method type or method handle is resolved ([390]§5.4.3.5) and a
+       reference to the resulting instance of
+       java.lang.invoke.MethodType or java.lang.invoke.MethodHandle,
+       value, is pushed onto the operand stack.
+
+    Linking Exceptions
+
+       During resolution of a symbolic reference to a class, any of
+       the exceptions pertaining to class resolution ([391]§5.4.3.1)
+       can be thrown.
+
+       During resolution of a symbolic reference to a method type or
+       method handle, any of the exception pertaining to method type
+       or method handle resolution ([392]§5.4.3.5) can be thrown.
+
+    Notes
+
+       The ldc instruction can only be used to push a value of type
+       float taken from the float value set ([393]§2.3.2) because a
+       constant of type float in the constant pool ([394]§4.4.4) must
+       be taken from the float value set.
+    "
+
+    "Created: / 29-07-2016 / 09:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 29-07-2016 / 10:18:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+ldc2
+    self ldc: self fetchIndex2
+
+    "
+    ldc_w
+
+    Operation
+
+       Push item from run-time constant pool (wide index)
+
+    Format
+
+       ldc_w
+       indexbyte1
+       indexbyte2
+
+    Forms
+
+       ldc_w = 19 (0x13)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The unsigned indexbyte1 and indexbyte2 are assembled into an
+       unsigned 16-bit index into the run-time constant pool of the
+       current class ([395]§2.6), where the value of the index is
+       calculated as (indexbyte1 << 8) | indexbyte2. The index must be
+       a valid index into the run-time constant pool of the current
+       class. The run-time constant pool entry at the index either
+       must be a run-time constant of type int or float, or a
+       reference to a string literal, or a symbolic reference to a
+       class, method type, or method handle ([396]§5.1).
+
+       If the run-time constant pool entry is a run-time constant of
+       type int or float, the numeric value of that run-time constant
+       is pushed onto the operand stack as an int or float,
+       respectively.
+
+       Otherwise, if the run-time constant pool entry is a reference
+       to an instance of class String representing a string literal
+       ([397]§5.1), then a reference to that instance, value, is
+       pushed onto the operand stack.
+
+       Otherwise, if the run-time constant pool entry is a symbolic
+       reference to a class ([398]§4.4.1). The named class is resolved
+       ([399]§5.4.3.1) and a reference to the Class object
+       representing that class, value, is pushed onto the operand
+       stack.
+
+       Otherwise, the run-time constant pool entry must be a symbolic
+       reference to a method type or a method handle ([400]§5.1). The
+       method type or method handle is resolved ([401]§5.4.3.5) and a
+       reference to the resulting instance of
+       java.lang.invoke.MethodType or java.lang.invoke.MethodHandle,
+       value, is pushed onto the operand stack.
+
+    Linking Exceptions
+
+       During resolution of the symbolic reference to a class, any of
+       the exceptions pertaining to class resolution ([402]§5.4.3.1)
+       can be thrown.
+
+       During resolution of a symbolic reference to a method type or
+       method handle, any of the exception pertaining to method type
+       or method handle resolution ([403]§5.4.3.5) can be thrown.
+
+    Notes
+
+       The ldc_w instruction is identical to the ldc instruction
+       ([404]§ldc) except for its wider run-time constant pool index.
+
+       The ldc_w instruction can only be used to push a value of type
+       float taken from the float value set ([405]§2.3.2) because a
+       constant of type float in the constant pool ([406]§4.4.4) must
+       be taken from the float value set.
+    "
+
+    "Created: / 29-07-2016 / 09:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 29-07-2016 / 10:18:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+ldc2w
+    constantsAccessed add: (constantPool at: self fetchIndex2).     
+
+    "
+    ldc2_w
+
+    Operation
+
+       Push long or double from run-time constant pool (wide index)
+
+    Format
+
+       ldc2_w
+       indexbyte1
+       indexbyte2
+
+    Forms
+
+       ldc2_w = 20 (0x14)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The unsigned indexbyte1 and indexbyte2 are assembled into an
+       unsigned 16-bit index into the run-time constant pool of the
+       current class ([407]§2.6), where the value of the index is
+       calculated as (indexbyte1 << 8) | indexbyte2. The index must be
+       a valid index into the run-time constant pool of the current
+       class. The run-time constant pool entry at the index must be a
+       run-time constant of type long or double ([408]§5.1). The
+       numeric value of that run-time constant is pushed onto the
+       operand stack as a long or double, respectively.
+
+    Notes
+
+       Only a wide-index version of the ldc2_w instruction exists;
+       there is no ldc2 instruction that pushes a long or double with
+       a single-byte index.
+
+       The ldc2_w instruction can only be used to push a value of type
+       double taken from the double value set ([409]§2.3.2) because a
+       constant of type double in the constant pool ([410]§4.4.5) must
+       be taken from the double value set.
+    "
+
+    "Created: / 29-07-2016 / 09:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+ldc: index
+    | constantOrRef |
+
+    constantOrRef := constantPool at: index.
+    constantOrRef isJavaRef ifTrue:[ 
+        constantOrRef isJavaClassRef ifTrue:[
+            refdClasses add: constantOrRef.
+        ].
+        constantOrRef isJavaStringRef ifTrue:[ 
+            (constantOrRef isResolved or:[ JavaVM booted ]) ifTrue:[ 
+                constantsAccessed add: constantOrRef resolve.
+            ].
+        ]
+    ] ifFalse:[ 
+        constantsAccessed add: constantOrRef    
+    ].
+
+
+    "
+    Operation
+
+       Push item from run-time constant pool
+
+    Format
+
+       ldc
+       index
+
+    Forms
+
+       ldc = 18 (0x12)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The index is an unsigned byte that must be a valid index into
+       the run-time constant pool of the current class ([384]§2.6).
+       The run-time constant pool entry at index either must be a
+       run-time constant of type int or float, or a reference to a
+       string literal, or a symbolic reference to a class, method
+       type, or method handle ([385]§5.1).
+
+       If the run-time constant pool entry is a run-time constant of
+       type int or float, the numeric value of that run-time constant
+       is pushed onto the operand stack as an int or float,
+       respectively.
+
+       Otherwise, if the run-time constant pool entry is a reference
+       to an instance of class String representing a string literal
+       ([386]§5.1), then a reference to that instance, value, is
+       pushed onto the operand stack.
+
+       Otherwise, if the run-time constant pool entry is a symbolic
+       reference to a class ([387]§5.1), then the named class is
+       resolved ([388]§5.4.3.1) and a reference to the Class object
+       representing that class, value, is pushed onto the operand
+       stack.
+
+       Otherwise, the run-time constant pool entry must be a symbolic
+       reference to a method type or a method handle ([389]§5.1). The
+       method type or method handle is resolved ([390]§5.4.3.5) and a
+       reference to the resulting instance of
+       java.lang.invoke.MethodType or java.lang.invoke.MethodHandle,
+       value, is pushed onto the operand stack.
+
+    Linking Exceptions
+
+       During resolution of a symbolic reference to a class, any of
+       the exceptions pertaining to class resolution ([391]§5.4.3.1)
+       can be thrown.
+
+       During resolution of a symbolic reference to a method type or
+       method handle, any of the exception pertaining to method type
+       or method handle resolution ([392]§5.4.3.5) can be thrown.
+
+    Notes
+
+       The ldc instruction can only be used to push a value of type
+       float taken from the float value set ([393]§2.3.2) because a
+       constant of type float in the constant pool ([394]§4.4.4) must
+       be taken from the float value set.
+    "
+
+    "Created: / 29-07-2016 / 10:17:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 multianewarray
     | classRef |
 
@@ -201,13 +536,15 @@
     methodsInvoked := Set new.
     refdClasses := Set new.
 
+    constantsAccessed := Set new.
+
     "/ Abstract, native or other funny method
     aMethod byteCode isNil ifTrue:[ ^ self ].
 
     ^ super process: aMethod receiver: aReceiver arguments: args.
 
     "Created: / 30-08-2013 / 13:23:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 09-09-2013 / 12:15:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 29-07-2016 / 09:20:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaMethodAnalyzer methodsFor:'queries'!
--- a/JavaRef2.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/JavaRef2.st	Fri Jul 29 10:54:57 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1996-2015 by Claus Gittinger
 
@@ -211,6 +209,12 @@
     "Created: / 08-04-2011 / 16:15:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
+isJavaStringRef
+    ^ false.
+
+    "Created: / 29-07-2016 / 10:06:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 isNewJavaRef
     "only temporary, to know if ref is old (claus' version) or new (m version)"
     
--- a/JavaStringRef2.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/JavaStringRef2.st	Fri Jul 29 10:54:57 2016 +0100
@@ -166,10 +166,10 @@
 
 !JavaStringRef2 methodsFor:'queries'!
 
-isJavaClassOrStringRef
-^ true.
+isJavaStringRef
+    ^ true
 
-"Created: / 11-04-2011 / 19:10:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Created: / 29-07-2016 / 10:06:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaStringRef2 class methodsFor:'documentation'!
--- a/Make.proto	Thu Jul 28 09:47:24 2016 +0100
+++ b/Make.proto	Fri Jul 29 10:54:57 2016 +0100
@@ -254,7 +254,6 @@
 $(OUTDIR)JavaAnnotationPrimitiveValue.$(O) JavaAnnotationPrimitiveValue.$(C) JavaAnnotationPrimitiveValue.$(H): JavaAnnotationPrimitiveValue.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaAnnotationValue.$(H) $(STCHDR)
 $(OUTDIR)JavaBehavior.$(O) JavaBehavior.$(C) JavaBehavior.$(H): JavaBehavior.st $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaConstants.$(H) $(STCHDR)
 $(OUTDIR)JavaByteCodeDisassembler.$(O) JavaByteCodeDisassembler.$(C) JavaByteCodeDisassembler.$(H): JavaByteCodeDisassembler.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessor.$(H) $(STCHDR)
-$(OUTDIR)JavaByteCodeEnumerator.$(O) JavaByteCodeEnumerator.$(C) JavaByteCodeEnumerator.$(H): JavaByteCodeEnumerator.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaDecompiler.$(H) $(STCHDR)
 $(OUTDIR)JavaByteCodeProcessorAdapter.$(O) JavaByteCodeProcessorAdapter.$(C) JavaByteCodeProcessorAdapter.$(H): JavaByteCodeProcessorAdapter.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessor.$(H) $(STCHDR)
 $(OUTDIR)JavaClassAnnotationContainer.$(O) JavaClassAnnotationContainer.$(C) JavaClassAnnotationContainer.$(H): JavaClassAnnotationContainer.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaAnnotationContainer.$(H) $(STCHDR)
 $(OUTDIR)JavaClassMemberRef2.$(O) JavaClassMemberRef2.$(C) JavaClassMemberRef2.$(H): JavaClassMemberRef2.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(STCHDR)
--- a/Make.spec	Thu Jul 28 09:47:24 2016 +0100
+++ b/Make.spec	Fri Jul 29 10:54:57 2016 +0100
@@ -128,7 +128,6 @@
 	JavaAnnotationPrimitiveValue \
 	JavaBehavior \
 	JavaByteCodeDisassembler \
-	JavaByteCodeEnumerator \
 	JavaByteCodeProcessorAdapter \
 	JavaClassAnnotationContainer \
 	JavaClassMemberRef2 \
@@ -271,7 +270,6 @@
     $(OUTDIR_SLASH)JavaAnnotationPrimitiveValue.$(O) \
     $(OUTDIR_SLASH)JavaBehavior.$(O) \
     $(OUTDIR_SLASH)JavaByteCodeDisassembler.$(O) \
-    $(OUTDIR_SLASH)JavaByteCodeEnumerator.$(O) \
     $(OUTDIR_SLASH)JavaByteCodeProcessorAdapter.$(O) \
     $(OUTDIR_SLASH)JavaClassAnnotationContainer.$(O) \
     $(OUTDIR_SLASH)JavaClassMemberRef2.$(O) \
--- a/abbrev.stc	Thu Jul 28 09:47:24 2016 +0100
+++ b/abbrev.stc	Fri Jul 29 10:54:57 2016 +0100
@@ -36,8 +36,6 @@
 JavaLocalVariableTable JavaLocalVariableTable stx:libjava 'Languages-Java-Support' 0
 JavaLocalVariableTableEntry JavaLocalVariableTableEntry stx:libjava 'Languages-Java-Support' 0
 JavaLookup JavaLookup stx:libjava 'Languages-Java-Interop' 0
-JavaLookupResolutionAlgorithmTests JavaLookupResolutionAlgorithmTests stx:libjava 'Languages-Java-Tests-Interop' 1
-JavaLookupTests JavaLookupTests stx:libjava 'Languages-Java-Tests-Interop' 1
 JavaMetaclass JavaMetaclass stx:libjava 'Languages-Java-Classes' 0
 JavaMonitor JavaMonitor stx:libjava 'Languages-Java-Support' 0
 JavaNameAndType2 JavaNameAndType2 stx:libjava 'Languages-Java-Reader-Support-new' 0
@@ -80,7 +78,6 @@
 JavaAnnotationPrimitiveValue JavaAnnotationPrimitiveValue stx:libjava 'Languages-Java-Reader-Support' 0
 JavaBehavior JavaBehavior stx:libjava 'Languages-Java-Classes' 0
 JavaByteCodeDisassembler JavaByteCodeDisassembler stx:libjava 'Languages-Java-Bytecode' 0
-JavaByteCodeEnumerator JavaByteCodeEnumerator stx:libjava 'Languages-Java-Support-Decompiling' 0
 JavaByteCodeProcessorAdapter JavaByteCodeProcessorAdapter stx:libjava 'Languages-Java-Bytecode' 0
 JavaClassAnnotationContainer JavaClassAnnotationContainer stx:libjava 'Languages-Java-Annotations' 1
 JavaClassMemberRef2 JavaClassMemberRef2 stx:libjava 'Languages-Java-Reader-Support-new' 0
@@ -157,6 +154,8 @@
 JavaInterfaceMethodRefTests JavaInterfaceMethodRefTests stx:libjava 'Languages-Java-Tests-RuntimeConstantPool' 1
 JavaJUnitTests JavaJUnitTests stx:libjava 'Languages-Java-Tests-Libraries' 1
 JavaLibrariesResource JavaLibrariesResource stx:libjava 'Languages-Java-Tests' 1
+JavaLookupResolutionAlgorithmTests JavaLookupResolutionAlgorithmTests stx:libjava 'Languages-Java-Tests-Interop' 1
+JavaLookupTests JavaLookupTests stx:libjava 'Languages-Java-Tests-Interop' 1
 JavaMethodRefTests JavaMethodRefTests stx:libjava 'Languages-Java-Tests-RuntimeConstantPool' 1
 JavaMonitorsTests JavaMonitorsTests stx:libjava 'Languages-Java-Tests' 1
 JavaNativeMemoryTests JavaNativeMemoryTests stx:libjava 'Languages-Java-Tests' 1
--- a/bc.mak	Thu Jul 28 09:47:24 2016 +0100
+++ b/bc.mak	Fri Jul 29 10:54:57 2016 +0100
@@ -200,7 +200,6 @@
 $(OUTDIR)JavaAnnotationPrimitiveValue.$(O) JavaAnnotationPrimitiveValue.$(C) JavaAnnotationPrimitiveValue.$(H): JavaAnnotationPrimitiveValue.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaAnnotationValue.$(H) $(STCHDR)
 $(OUTDIR)JavaBehavior.$(O) JavaBehavior.$(C) JavaBehavior.$(H): JavaBehavior.st $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaConstants.$(H) $(STCHDR)
 $(OUTDIR)JavaByteCodeDisassembler.$(O) JavaByteCodeDisassembler.$(C) JavaByteCodeDisassembler.$(H): JavaByteCodeDisassembler.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessor.$(H) $(STCHDR)
-$(OUTDIR)JavaByteCodeEnumerator.$(O) JavaByteCodeEnumerator.$(C) JavaByteCodeEnumerator.$(H): JavaByteCodeEnumerator.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaDecompiler.$(H) $(STCHDR)
 $(OUTDIR)JavaByteCodeProcessorAdapter.$(O) JavaByteCodeProcessorAdapter.$(C) JavaByteCodeProcessorAdapter.$(H): JavaByteCodeProcessorAdapter.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessor.$(H) $(STCHDR)
 $(OUTDIR)JavaClassAnnotationContainer.$(O) JavaClassAnnotationContainer.$(C) JavaClassAnnotationContainer.$(H): JavaClassAnnotationContainer.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaAnnotationContainer.$(H) $(STCHDR)
 $(OUTDIR)JavaClassMemberRef2.$(O) JavaClassMemberRef2.$(C) JavaClassMemberRef2.$(H): JavaClassMemberRef2.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(STCHDR)
--- a/experiments/JavaByteCodeInterpreter.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/experiments/JavaByteCodeInterpreter.st	Fri Jul 29 10:54:57 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996-2015 by Claus Gittinger
 
@@ -112,31 +114,31 @@
      index, and value are popped from the operand stack. The reference value is stored as the
      component of the array at index.
 
-     The type of value must be assignment compatible (§2.6.7) with the type of the components
+     The type of value must be assignment compatible (§2.6.7) with the type of the components
      of the array referenced by arrayref. Assignment of a value of reference type S (source)
      to a variable of reference type T (target) is allowed only when the type S supports all
      the operations defined on type T. The detailed rules follow:
 
      If S is a class type, then:
-     If T is a class type, then S must be the same class (§2.8.1) as T, or S must be a subclass of T;
-     If T is an interface type, S must implement (§2.13) interface T.
+     If T is a class type, then S must be the same class (§2.8.1) as T, or S must be a subclass of T;
+     If T is an interface type, S must implement (§2.13) interface T.
      If S is an interface type, then:
-     If T is a class type, then T must be Object (§2.4.7).
-     If T is an interface type, then T must be the same interface as S or a superinterface of S (§2.13.2).
+     If T is a class type, then T must be Object (§2.4.7).
+     If T is an interface type, then T must be the same interface as S or a superinterface of S (§2.13.2).
 
      If S is an array type, namely, the type SC[], that is, an array of components of type SC, then:
-     If T is a class type, then T must be Object (§2.4.7).
+     If T is a class type, then T must be Object (§2.4.7).
      If T is an array type TC[], that is, an array of components of type TC, then one of the following must be true:
-     TC and SC are the same primitive type (§2.4.1).
-     TC and SC are reference types (§2.4.6), and type SC is assignable to TC by these runtime rules.
-     If T is an interface type, T must be one of the interfaces implemented by arrays (§2.15).
+     TC and SC are the same primitive type (§2.4.1).
+     TC and SC are reference types (§2.4.6), and type SC is assignable to TC by these runtime rules.
+     If T is an interface type, T must be one of the interfaces implemented by arrays (§2.15).
 
 
      If arrayref is null, aastore throws a NullPointerException.
      Otherwise, if index is not within the bounds of the array referenced by arrayref,
      the aastore instruction throws an ArrayIndexOutOfBoundsException.
      Otherwise, if arrayref is not null and the actual type of value is not assignment
-     compatible (§2.6.7) with the actual type of the components of the array, aastore
+     compatible (§2.6.7) with the actual type of the components of the array, aastore
      throws an ArrayStoreException."
 
     "Modified: / 22-03-2011 / 12:27:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -179,7 +181,7 @@
 
     "Description
      The index is an unsigned byte that must be an index into the local
-     variable array of the current frame (§3.6). The local variable at
+     variable array of the current frame (§3.6). The local variable at
      index must contain a reference. The objectref in the local variable
      at index is pushed onto the operand stack.
 
@@ -247,12 +249,12 @@
     "
      Description
      The objectref must be of type reference and must refer to an object of a type
-     that is assignment compatible (§2.6.7) with the type represented by the return
-     descriptor (§4.3.3) of the current method. If the current method is a synchronized
+     that is assignment compatible (§2.6.7) with the type represented by the return
+     descriptor (§4.3.3) of the current method. If the current method is a synchronized
      method, the monitor acquired or reentered on invocation of the method is released
      or exited (respectively) as if by execution of a monitorexit instruction. If no
      exception is thrown, objectref is popped from the operand stack of the current
-     frame (§3.6) and pushed onto the operand stack of the frame of the invoker. Any
+     frame (§3.6) and pushed onto the operand stack of the frame of the invoker. Any
      other values on the operand stack of the current method are discarded.
      The interpreter then reinstates the frame of the invoker and returns control to
      the invoker.
@@ -264,7 +266,7 @@
      method contains a monitorexit instruction, but no monitorenter instruction, on the object
      on which the method is synchronized.
      Otherwise, if the virtual machine implementation enforces the rules on structured use
-     of locks described in §8.13 and if the first of those rules is violated during invocation
+     of locks described in §8.13 and if the first of those rules is violated during invocation
      of the current method, then areturn throws an IllegalMonitorStateException."
     "Created: / 14-03-2011 / 13:45:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
@@ -378,10 +380,10 @@
     "
      Description
      The objectref must be of type reference. The unsigned indexbyte1 and indexbyte2 are used to
-     construct an index into the runtime constant pool of the current class (§3.6), where the value
+     construct an index into the runtime constant pool of the current class (§3.6), where the value
      of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at the index
      must be a symbolic reference to a class, array, or interface type. The named class, array,
-     or interface type is resolved (§5.4.3.1).
+     or interface type is resolved (§5.4.3.1).
      If objectref is null or can be cast to the resolved class, array, or interface type, the
      operand stack is unchanged; otherwise, the checkcast instruction throws a ClassCastException.
      The following rules are used to determine whether an objectref that is not null can be cast
@@ -389,21 +391,21 @@
      resolved class, array, or interface type, checkcast determines whether objectref can be cast
      to type T as follows:
      If S is an ordinary (nonarray) class, then:
-     If T is a class type, then S must be the same class (§2.8.1) as T, or a subclass of T.
-     If T is an interface type, then S must implement (§2.13) interface T.
+     If T is a class type, then S must be the same class (§2.8.1) as T, or a subclass of T.
+     If T is an interface type, then S must implement (§2.13) interface T.
      If S is an interface type, then:
-     If T is a class type, then T must be Object (§2.4.7).
+     If T is a class type, then T must be Object (§2.4.7).
      If T is an interface type, then T must be the same interface as S or a superinterface
-     of S (§2.13.2).
+     of S (§2.13.2).
      If S is a class representing the array type SC[], that is, an array of components of
      type SC, then:
-     If T is a class type, then T must be Object (§2.4.7).
+     If T is a class type, then T must be Object (§2.4.7).
      If T is an array type TC[], that is, an array of components of type TC, then one of the
      following must be true:
-     TC and SC are the same primitive type (§2.4.1).
-     TC and SC are reference types (§2.4.6), and type SC can be cast to TC by recursive
+     TC and SC are the same primitive type (§2.4.1).
+     TC and SC are reference types (§2.4.6), and type SC can be cast to TC by recursive
      application of these rules.
-     If T is an interface type, T must be one of the interfaces implemented by arrays (§2.15).
+     If T is an interface type, T must be one of the interfaces implemented by arrays (§2.15).
      Linking Exceptions
      During resolution of the symbolic reference to the class, array, or interface type, any of the
      exceptions documented in Section 5.4.3.1 can be thrown.
@@ -591,7 +593,7 @@
      acquired or reentered on invocation of the method is released or exited
      (respectively) as if by execution of a monitorexit instruction. If no
      exception is thrown, value is popped from the operand stack of the current
-     frame (§3.6) and undergoes value set conversion (§3.8.3), resulting in
+     frame (§3.6) and undergoes value set conversion (§3.8.3), resulting in
      value'. The value' is pushed onto the operand stack of the frame of the
      invoker. Any other values on the operand stack of the current method are
      discarded.
@@ -606,7 +608,7 @@
      instruction, but no monitorenter instruction, on the object on which
      the method is synchronized.
      Otherwise, if the virtual machine implementation enforces the rules
-     on structured use of locks described in §8.13 and if the first of
+     on structured use of locks described in §8.13 and if the first of
      those rules is violated during invocation of the current method,
      then dreturn throws an IllegalMonitorStateException."
     "Created: / 14-03-2011 / 13:33:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -900,13 +902,13 @@
      Description
      The objectref, which must be of type reference, is popped from the operand stack.
      The unsigned indexbyte1 and indexbyte2 are used to construct an index into the
-     runtime constant pool of the current class (§3.6), where the value of the index
+     runtime constant pool of the current class (§3.6), where the value of the index
      is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index
-     must be a symbolic reference to a field (§5.1), which gives the name and
+     must be a symbolic reference to a field (§5.1), which gives the name and
      descriptor of the field as well as a symbolic reference to the class in which
-     the field is to be found. The referenced field is resolved (§5.4.3.2). The value
+     the field is to be found. The referenced field is resolved (§5.4.3.2). The value
      of the referenced field in objectref is fetched and pushed onto the operand stack.
-     The class of objectref must not be an array. If the field is protected (§4.6),
+     The class of objectref must not be an array. If the field is protected (§4.6),
      and it is either a member of the current class or a member of a superclass of
      the current class, then the class of objectref must be either the current class
      or a subclass of the current class.
@@ -1608,7 +1610,7 @@
 
     "
      The index is an unsigned byte that must be an index into the local variable array
-     of the current frame (§3.6). The local variable at index must contain an int.
+     of the current frame (§3.6). The local variable at index must contain an int.
      The value of the local variable at index is pushed onto the operand stack.
 
      Notes
@@ -1718,17 +1720,17 @@
     "
      Description
      The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool
-     of the current class (§3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The
-     runtime constant pool item at that index must be a symbolic reference to a method (§5.1), which gives
-     the name and descriptor (§4.3.3) of the method as well as a symbolic reference to the class in which
-     the method is to be found. The named method is resolved (§5.4.3.3). Finally, if the resolved method
-     is protected (§4.6), and it is either a member of the current class or a member of a superclass of
+     of the current class (§3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The
+     runtime constant pool item at that index must be a symbolic reference to a method (§5.1), which gives
+     the name and descriptor (§4.3.3) of the method as well as a symbolic reference to the class in which
+     the method is to be found. The named method is resolved (§5.4.3.3). Finally, if the resolved method
+     is protected (§4.6), and it is either a member of the current class or a member of a superclass of
      the current class, then the class of objectref must be either the current class or a subclass of the
      current class.
      Next, the resolved method is selected for invocation unless all of the following conditions are true:
      The ACC_SUPER flag (see Table 4.1, Class access and property modifiers) is set for the current class.
      The class of the resolved method is a superclass of the current class.
-     The resolved method is not an instance initialization method (§3.9).
+     The resolved method is not an instance initialization method (§3.9).
      If the above conditions are true, the actual method to be invoked is selected by the following lookup
      procedure. Let C be the direct superclass of the current class:
      If C contains a declaration for an instance method with the same name and descriptor as the resolved
@@ -1746,13 +1748,13 @@
      and the argument values are consecutively made the values of local variables of the new frame, with
      objectref in local variable 0, arg1 in local variable 1 (or, if arg1 is of type long or double, in
      local variables 1 and 2), and so on. Any argument value that is of a floating-point type undergoes
-     value set conversion (§3.8.3) prior to being stored in a local variable. The new frame is then made
+     value set conversion (§3.8.3) prior to being stored in a local variable. The new frame is then made
      current, and the Java virtual machine pc is set to the opcode of the first instruction of the method
      to be invoked. Execution continues with the first instruction of the method.
-     If the method is native and the platform-dependent code that implements it has not yet been bound (§5.6)
+     If the method is native and the platform-dependent code that implements it has not yet been bound (§5.6)
      into the Java virtual machine, that is done. The nargs argument values and objectref are popped from
      the operand stack and are passed as parameters to the code that implements the method. Any argument
-     value that is of a floating-point type undergoes value set conversion (§3.8.3) prior to being passed
+     value that is of a floating-point type undergoes value set conversion (§3.8.3) prior to being passed
      as a parameter. The parameters are passed and the code is invoked in an implementation-dependent
      manner. When the platform-dependent code returns, the following take place:
      If the native method is synchronized, the monitor associated with objectref is released or exited as
@@ -1778,7 +1780,7 @@
      Notes
      The difference between the invokespecial and the invokevirtual instructions is that invokevirtual
      invokes a method based on the class of the object. The invokespecial instruction is used to invoke
-     instance initialization methods (§3.9) as well as private methods and methods of a superclass of
+     instance initialization methods (§3.9) as well as private methods and methods of a superclass of
      the current class.
      The invokespecial instruction was named invokenonvirtual prior to Sun's JDK release 1.0.2.
      The nargs argument values and objectref are not one-to-one with the first nargs + 1 local variables.
@@ -1826,15 +1828,15 @@
     "
      Description
      The unsigned indexbyte1 and indexbyte2 are used to construct an index into the
-     runtime constant pool of the current class (§3.6), where the value of the index is
+     runtime constant pool of the current class (§3.6), where the value of the index is
      (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must
-     be a symbolic reference to a method (§5.1), which gives the name and descriptor (§4.3.3)
+     be a symbolic reference to a method (§5.1), which gives the name and descriptor (§4.3.3)
      of the method as well as a symbolic reference to the class in which the method is to
-     be found. The named method is resolved (§5.4.3.3). The method must not be the class
-     or interface initialization method (§3.9). It must be static, and therefore cannot be
+     be found. The named method is resolved (§5.4.3.3). The method must not be the class
+     or interface initialization method (§3.9). It must be static, and therefore cannot be
      abstract.
      On successful resolution of the method, the class that declared the resolved field is
-     initialized (§5.5) if that class has not already been initialized.
+     initialized (§5.5) if that class has not already been initialized.
      The operand stack must contain nargs argument values, where the number, type, and order
      of the values must be consistent with the descriptor of the resolved method.
      If the method is synchronized, the monitor associated with the resolved class is acquired
@@ -1844,15 +1846,15 @@
      The nargs argument values are consecutively made the values of local variables of the
      new frame, with arg1 in local variable 0 (or, if arg1 is of type long or double, in local
      variables 0 and 1) and so on. Any argument value that is of a floating-point type undergoes
-     value set conversion (§3.8.3) prior to being stored in a local variable. The new frame is
+     value set conversion (§3.8.3) prior to being stored in a local variable. The new frame is
      then made current, and the Java virtual machine pc is set to the opcode of the first
      nstruction of the method to be invoked. Execution continues with the first instruction
      of the method.
      If the method is native and the platform-dependent code that implements it has not yet
-     been bound (§5.6) into the Java virtual machine, that is done. The nargs argument values
+     been bound (§5.6) into the Java virtual machine, that is done. The nargs argument values
      are popped from the operand stack and are passed as parameters to the code that
      implements the method. Any argument value that is of a floating-point type undergoes
-     value set conversion (§3.8.3) prior to being passed as a parameter. The parameters are
+     value set conversion (§3.8.3) prior to being passed as a parameter. The parameters are
      passed and the code is invoked in an implementation-dependent manner. When the
      platform-dependent code returns, the following take place:
      If the native method is synchronized, the monitor associated with the resolved class
@@ -1920,13 +1922,13 @@
     "
      Description
      The unsigned indexbyte1 and indexbyte2 are used to construct an index into the
-     runtime constant pool of the current class (§3.6), where the value of the index
+     runtime constant pool of the current class (§3.6), where the value of the index
      is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index
-     must be a symbolic reference to a method (§5.1), which gives the name and descriptor
-     (§4.3.3) of the method as well as a symbolic reference to the class in which the
-     method is to be found. The named method is resolved (§5.4.3.3). The method must
-     not be an instance initialization method (§3.9) or the class or interface
-     initialization method (§3.9). Finally, if the resolved method is protected (§4.6),
+     must be a symbolic reference to a method (§5.1), which gives the name and descriptor
+     (§4.3.3) of the method as well as a symbolic reference to the class in which the
+     method is to be found. The named method is resolved (§5.4.3.3). The method must
+     not be an instance initialization method (§3.9) or the class or interface
+     initialization method (§3.9). Finally, if the resolved method is protected (§4.6),
      and it is either a member of the current class or a member of a superclass of the
      current class, then the class of objectref must be either the current class or a
      subclass of the current class.
@@ -1950,15 +1952,15 @@
      the values of local variables of the new frame, with objectref in local variable 0,
      arg1 in local variable 1 (or, if arg1 is of type long or double, in local variables 1
      and 2), and so on. Any argument value that is of a floating-point type undergoes
-     value set conversion (§3.8.3) prior to being stored in a local variable. The new
+     value set conversion (§3.8.3) prior to being stored in a local variable. The new
      frame is then made current, and the Java virtual machine pc is set to the opcode
      of the first instruction of the method to be invoked. Execution continues with the
      first instruction of the method.
      If the method is native and the platform-dependent code that implements it has not
-     yet been bound (§5.6) into the Java virtual machine, that is done. The nargs argument
+     yet been bound (§5.6) into the Java virtual machine, that is done. The nargs argument
      values and objectref are popped from the operand stack and are passed as parameters
      to the code that implements the method. Any argument value that is of a floating-point
-     type undergoes value set conversion (§3.8.3) prior to being passed as a parameter. The
+     type undergoes value set conversion (§3.8.3) prior to being passed as a parameter. The
      parameters are passed and the code is invoked in an implementation-dependent manner.
      When the platform-dependent code returns, the following take place:
      If the native method is synchronized, the monitor associated with objectref is released
@@ -2054,7 +2056,7 @@
      invocation of the method is released or exited (respectively) as
      if by execution of a monitorexit instruction. If no exception is
      thrown, value is popped from the operand stack of the current frame
-     (§3.6) and pushed onto the operand stack of the frame of the invoker.
+     (§3.6) and pushed onto the operand stack of the frame of the invoker.
      Any other values on the operand stack of the current method are discarded.
      The interpreter then returns control to the invoker of the method,
      reinstating the frame of the invoker.
@@ -2133,7 +2135,7 @@
     "
      Description
      The index is an unsigned byte that must be an index into the local variable
-     array of the current frame (§3.6). The value on the top of the operand stack
+     array of the current frame (§3.6). The value on the top of the operand stack
      must be of type int. It is popped from the operand stack, and the value of
      the local variable at index is set to value.
 
@@ -2298,99 +2300,223 @@
 !
 
 ldc1
-    "
-     Push item from runtime constant pool
-     stack: nothing -> value
-     args: index"
-
     | constantOrRef |
 
     constantOrRef := constantPool at: self fetchIndex.
     (constantOrRef isNumber or:[ constantOrRef isJavaObject"java.lang.String"]) ifFalse:[ 
         constantOrRef := constantOrRef resolve.
     ].
-    self pushRef: constantOrRef.
-
+    self pushRef: constantOrRef.       
 
     "
-     Description
-     The index is an unsigned byte that must be a valid index into the runtime constant
-     pool of the current class (3.6). The runtime constant pool entry at index either
-     must be a runtime constant of type int or float, or must be a symbolic reference
-     to a string literal (5.1).
-     If the runtime constant pool entry is a runtime constant of type int or float, the
-     numeric value of that runtime constant is pushed onto the operand stack as an int
-     or float, respectively.
-     Otherwise, the runtime constant pool entry must be a reference to an instance of
-     class String representing a string literal (5.1). A reference to that instance,
-     value, is pushed onto the operand stack.
-
-     Notes
-     The ldc instruction can only be used to push a value of type float taken from the float value set (3.3.2) because a constant of type float in the constant pool (4.4.4) must be taken from the float value set."
-
-    "Modified: / 14-03-2011 / 16:04:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-    "Modified: / 15-03-2016 / 23:53:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    Operation
+
+       Push item from run-time constant pool
+
+    Format
+
+       ldc
+       index
+
+    Forms
+
+       ldc = 18 (0x12)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The index is an unsigned byte that must be a valid index into
+       the run-time constant pool of the current class ([384]§2.6).
+       The run-time constant pool entry at index either must be a
+       run-time constant of type int or float, or a reference to a
+       string literal, or a symbolic reference to a class, method
+       type, or method handle ([385]§5.1).
+
+       If the run-time constant pool entry is a run-time constant of
+       type int or float, the numeric value of that run-time constant
+       is pushed onto the operand stack as an int or float,
+       respectively.
+
+       Otherwise, if the run-time constant pool entry is a reference
+       to an instance of class String representing a string literal
+       ([386]§5.1), then a reference to that instance, value, is
+       pushed onto the operand stack.
+
+       Otherwise, if the run-time constant pool entry is a symbolic
+       reference to a class ([387]§5.1), then the named class is
+       resolved ([388]§5.4.3.1) and a reference to the Class object
+       representing that class, value, is pushed onto the operand
+       stack.
+
+       Otherwise, the run-time constant pool entry must be a symbolic
+       reference to a method type or a method handle ([389]§5.1). The
+       method type or method handle is resolved ([390]§5.4.3.5) and a
+       reference to the resulting instance of
+       java.lang.invoke.MethodType or java.lang.invoke.MethodHandle,
+       value, is pushed onto the operand stack.
+
+    Linking Exceptions
+
+       During resolution of a symbolic reference to a class, any of
+       the exceptions pertaining to class resolution ([391]§5.4.3.1)
+       can be thrown.
+
+       During resolution of a symbolic reference to a method type or
+       method handle, any of the exception pertaining to method type
+       or method handle resolution ([392]§5.4.3.5) can be thrown.
+
+    Notes
+
+       The ldc instruction can only be used to push a value of type
+       float taken from the float value set ([393]§2.3.2) because a
+       constant of type float in the constant pool ([394]§4.4.4) must
+       be taken from the float value set.
+    "
+
+    "Created: / 29-07-2016 / 09:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 ldc2
-    "
-     push item from runtime constant pool (wide index)
-     stack: .. -> value
-     args: indexByte1 indexByte2"
-    
-    self pushRef: (constantPool at: self fetchIndex2).
+    self pushRef: (constantPool at: self fetchIndex2).  
 
     "
-     Description
-     The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit
-     index into the runtime constant pool of the current class (3.6), where the
-     value of the index is calculated as (indexbyte1 << 8) | indexbyte2. The index
-     must be a valid index into the runtime constant pool of the current class.
-     The runtime constant pool entry at the index either must be a runtime constant
-     of type int or float, or must be a symbolic reference to a string literal (5.1).
-     If the runtime constant pool entry is a runtime constant of type int or float,
-     the numeric value of that runtime constant is pushed onto the operand stack as
-     an int or float, respectively.
-     Otherwise, the runtime constant pool entry must be a reference to an instance
-     of class String representing a string literal (5.1). A reference to that
-     instance, value, is pushed onto the operand stack.
-
-     Notes
-     The ldc_w instruction is identical to the ldc instruction except for its wider
-     runtime constant pool index.
-     The ldc_w instruction can only be used to push a value of type float taken from
-     the float value set (3.3.2) because a constant of type float in the constant
-     pool (4.4.4) must be taken from the float value set."
-
-    "Modified: / 28-03-2011 / 18:04:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    ldc_w
+
+    Operation
+
+       Push item from run-time constant pool (wide index)
+
+    Format
+
+       ldc_w
+       indexbyte1
+       indexbyte2
+
+    Forms
+
+       ldc_w = 19 (0x13)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The unsigned indexbyte1 and indexbyte2 are assembled into an
+       unsigned 16-bit index into the run-time constant pool of the
+       current class ([395]§2.6), where the value of the index is
+       calculated as (indexbyte1 << 8) | indexbyte2. The index must be
+       a valid index into the run-time constant pool of the current
+       class. The run-time constant pool entry at the index either
+       must be a run-time constant of type int or float, or a
+       reference to a string literal, or a symbolic reference to a
+       class, method type, or method handle ([396]§5.1).
+
+       If the run-time constant pool entry is a run-time constant of
+       type int or float, the numeric value of that run-time constant
+       is pushed onto the operand stack as an int or float,
+       respectively.
+
+       Otherwise, if the run-time constant pool entry is a reference
+       to an instance of class String representing a string literal
+       ([397]§5.1), then a reference to that instance, value, is
+       pushed onto the operand stack.
+
+       Otherwise, if the run-time constant pool entry is a symbolic
+       reference to a class ([398]§4.4.1). The named class is resolved
+       ([399]§5.4.3.1) and a reference to the Class object
+       representing that class, value, is pushed onto the operand
+       stack.
+
+       Otherwise, the run-time constant pool entry must be a symbolic
+       reference to a method type or a method handle ([400]§5.1). The
+       method type or method handle is resolved ([401]§5.4.3.5) and a
+       reference to the resulting instance of
+       java.lang.invoke.MethodType or java.lang.invoke.MethodHandle,
+       value, is pushed onto the operand stack.
+
+    Linking Exceptions
+
+       During resolution of the symbolic reference to a class, any of
+       the exceptions pertaining to class resolution ([402]§5.4.3.1)
+       can be thrown.
+
+       During resolution of a symbolic reference to a method type or
+       method handle, any of the exception pertaining to method type
+       or method handle resolution ([403]§5.4.3.5) can be thrown.
+
+    Notes
+
+       The ldc_w instruction is identical to the ldc instruction
+       ([404]§ldc) except for its wider run-time constant pool index.
+
+       The ldc_w instruction can only be used to push a value of type
+       float taken from the float value set ([405]§2.3.2) because a
+       constant of type float in the constant pool ([406]§4.4.4) must
+       be taken from the float value set.
+    "
+
+    "Created: / 29-07-2016 / 09:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 ldc2w
-"
-Push long or double from runtime constant pool (wide index)
-stack: .. -> value
-args: indexByte1 indexByte2
-"
-self ldc2.
-"
-Description
-The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit index 
-into the runtime constant pool of the current class (3.6), where the value of the 
-index is calculated as (indexbyte1 << 8) | indexbyte2. The index must be a valid 
-index into the runtime constant pool of the current class. The runtime constant pool 
-entry at the index must be a runtime constant of type long or double (5.1). The 
-numeric value of that runtime constant is pushed onto the operand stack as a long 
-or double, respectively.
-
-Notes
-Only a wide-index version of the ldc2_w instruction exists; there is no ldc2 instruction 
-that pushes a long or double with a single-byte index.
-The ldc2_w instruction can only be used to push a value of type double taken from the 
-double value set (3.3.2) because a constant of type double in the constant pool (4.4.5) 
-must be taken from the double value set.
-"
-
-    "Modified: / 27-03-2011 / 21:12:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    self pushDouble: (constantPool at: self fetchIndex2).     
+
+    "
+    ldc2_w
+
+    Operation
+
+       Push long or double from run-time constant pool (wide index)
+
+    Format
+
+       ldc2_w
+       indexbyte1
+       indexbyte2
+
+    Forms
+
+       ldc2_w = 20 (0x14)
+
+    Operand Stack
+
+       ... →
+
+       ..., value
+
+    Description
+
+       The unsigned indexbyte1 and indexbyte2 are assembled into an
+       unsigned 16-bit index into the run-time constant pool of the
+       current class ([407]§2.6), where the value of the index is
+       calculated as (indexbyte1 << 8) | indexbyte2. The index must be
+       a valid index into the run-time constant pool of the current
+       class. The run-time constant pool entry at the index must be a
+       run-time constant of type long or double ([408]§5.1). The
+       numeric value of that run-time constant is pushed onto the
+       operand stack as a long or double, respectively.
+
+    Notes
+
+       Only a wide-index version of the ldc2_w instruction exists;
+       there is no ldc2 instruction that pushes a long or double with
+       a single-byte index.
+
+       The ldc2_w instruction can only be used to push a value of type
+       double taken from the double value set ([409]§2.3.2) because a
+       constant of type double in the constant pool ([410]§4.4.5) must
+       be taken from the double value set.
+    "
+
+    "Created: / 29-07-2016 / 09:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 ldiv
@@ -2523,7 +2649,7 @@
      long. If the current method is a synchronized method, the monitor acquired
      or reentered on invocation of the method is released or exited (respectively)
      as if by execution of a monitorexit instruction. If no exception is thrown,
-     value is popped from the operand stack of the current frame (§3.6) and pushed
+     value is popped from the operand stack of the current frame (§3.6) and pushed
      onto the operand stack of the frame of the invoker. Any other values on the
      operand stack of the current method are discarded.
      The interpreter then returns control to the invoker of the method, reinstating
@@ -2768,26 +2894,26 @@
 
     "Description
      The unsigned indexbyte1 and indexbyte2 are used to construct an index
-     into the runtime constant pool of the current class (§3.6), where the value
+     into the runtime constant pool of the current class (§3.6), where the value
      of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool
-     item at that index must be a symbolic reference to a field (§5.1), which
+     item at that index must be a symbolic reference to a field (§5.1), which
      gives the name and descriptor of the field as well as a symbolic reference
      to the class in which the field is to be found. The class of objectref must
-     not be an array. If the field is protected (§4.6), and it is either a member
+     not be an array. If the field is protected (§4.6), and it is either a member
      of the current class or a member of a superclass of the current class, then
      the class of objectref must be either the current class or a subclass of
      the current class.
-         The referenced field is resolved (§5.4.3.2). The type of a value stored
+         The referenced field is resolved (§5.4.3.2). The type of a value stored
      by a putfield instruction must be compatible with the descriptor of the
-     referenced field (§4.3.2). If the field descriptor type is boolean, byte,
+     referenced field (§4.3.2). If the field descriptor type is boolean, byte,
      char, short, or int, then the value must be an int. If the field descriptor
      type is float, long, or double, then the value must be a float, long, or
      double, respectively. If the field descriptor type is a reference type, then
-     the value must be of a type that is assignment compatible (§2.6.7) with the
+     the value must be of a type that is assignment compatible (§2.6.7) with the
      field descriptor type. If the field is final, it should be declared in the
      current class. Otherwise, an IllegalAccessError is thrown.
          The value and objectref are popped from the operand stack. The objectref
-     must be of type reference. The value undergoes value set conversion (§3.8.3),
+     must be of type reference. The value undergoes value set conversion (§3.8.3),
      resulting in value', and the referenced field in objectref is set to value'.
 
          Linking Exceptions
@@ -2822,25 +2948,25 @@
     "
      Description
      The unsigned indexbyte1 and indexbyte2 are used to construct an index into
-     the runtime constant pool of the current class (§3.6), where the value of
+     the runtime constant pool of the current class (§3.6), where the value of
      the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool
-     item at that index must be a symbolic reference to a field (§5.1), which
+     item at that index must be a symbolic reference to a field (§5.1), which
      gives the name and descriptor of the field as well as a symbolic reference
      to the class or interface in which the field is to be found. The referenced
-     field is resolved (§5.4.3.2).
+     field is resolved (§5.4.3.2).
      On successful resolution of the field the class or interface that declared
-     the resolved field is initialized (§5.5) if that class or interface has not
+     the resolved field is initialized (§5.5) if that class or interface has not
      already been initialized.
      The type of a value stored by a putstatic instruction must be compatible with
-     the descriptor of the referenced field (§4.3.2). If the field descriptor type
+     the descriptor of the referenced field (§4.3.2). If the field descriptor type
      is boolean, byte, char, short, or int, then the value must be an int. If the
      field descriptor type is float, long, or double, then the value must be a float,
      long, or double, respectively. If the field descriptor type is a reference type,
-     then the value must be of a type that is assignment compatible (§2.6.7) with
+     then the value must be of a type that is assignment compatible (§2.6.7) with
      the field descriptor type. If the field is final, it should be declared in
      the current class. Otherwise, an IllegalAccessError is thrown.
      The value is popped from the operand stack and undergoes value set conversion
-     (§3.8.3), resulting in value'. The class field is set to value'.
+     (§3.8.3), resulting in value'. The class field is set to value'.
 
      Linking Exceptions
      During resolution of the symbolic reference to the class or interface field,
@@ -2860,7 +2986,7 @@
      A putstatic instruction may be used only to set the value of an interface field
      on the initialization of that field. Interface fields may be assigned to only
      once, on execution of an interface variable initialization expression when the
-     interface is initialized (§2.17.4)."
+     interface is initialized (§2.17.4)."
 
     "Created: / 24-02-2011 / 23:21:16 / Marcel Hlopko <hlopik@gmail.com>"
     "Modified: / 08-12-2011 / 19:24:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -2891,7 +3017,7 @@
      The current method must have return type void. If the current method is a synchronized
      method, the monitor acquired or reentered on invocation of the method is released or
      exited (respectively) as if by execution of a monitorexit instruction. If no exception
-     is thrown, any values on the operand stack of the current frame (§3.6) are discarded.
+     is thrown, any values on the operand stack of the current frame (§3.6) are discarded.
      The interpreter then returns control to the invoker of the method, reinstating the
      frame of the invoker.
 
--- a/libInit.cc	Thu Jul 28 09:47:24 2016 +0100
+++ b/libInit.cc	Fri Jul 29 10:54:57 2016 +0100
@@ -93,7 +93,6 @@
 extern void _JavaAnnotationPrimitiveValue_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _JavaBehavior_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _JavaByteCodeDisassembler_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
-extern void _JavaByteCodeEnumerator_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _JavaByteCodeProcessorAdapter_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _JavaClassAnnotationContainer_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _JavaClassMemberRef2_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
@@ -245,7 +244,6 @@
     _JavaAnnotationPrimitiveValue_Init(pass,__pRT__,snd);
     _JavaBehavior_Init(pass,__pRT__,snd);
     _JavaByteCodeDisassembler_Init(pass,__pRT__,snd);
-    _JavaByteCodeEnumerator_Init(pass,__pRT__,snd);
     _JavaByteCodeProcessorAdapter_Init(pass,__pRT__,snd);
     _JavaClassAnnotationContainer_Init(pass,__pRT__,snd);
     _JavaClassMemberRef2_Init(pass,__pRT__,snd);
--- a/stx_libjava.st	Thu Jul 28 09:47:24 2016 +0100
+++ b/stx_libjava.st	Fri Jul 29 10:54:57 2016 +0100
@@ -334,8 +334,6 @@
         JavaLocalVariableTable
         JavaLocalVariableTableEntry
         JavaLookup
-        (JavaLookupResolutionAlgorithmTests autoload)
-        (JavaLookupTests autoload)
         JavaMetaclass
         JavaMonitor
         JavaNameAndType2
@@ -378,7 +376,6 @@
         JavaAnnotationPrimitiveValue
         JavaBehavior
         JavaByteCodeDisassembler
-        JavaByteCodeEnumerator
         JavaByteCodeProcessorAdapter
         JavaClassAnnotationContainer
         JavaClassMemberRef2
@@ -455,6 +452,8 @@
         (JavaInterfaceMethodRefTests autoload)
         (JavaJUnitTests autoload)
         (JavaLibrariesResource autoload)
+        (JavaLookupResolutionAlgorithmTests autoload)
+        (JavaLookupTests autoload)
         (JavaMethodRefTests autoload)
         (JavaMonitorsTests autoload)
         (JavaNativeMemoryTests autoload)