src/JavaByteCodePreresolver.st
author hlopkmar
Mon, 13 Feb 2012 14:51:10 +0000
branchjk_new_structure
changeset 1362 6bd3666e865a
child 1379 74910191206d
permissions -rw-r--r--
forgotten preresolver classes :)

"
 COPYRIGHT (c) 1996-2011 by Claus Gittinger

 New code and modifications done at SWING Research Group [1]:

 COPYRIGHT (c) 2010-2011 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' }"

JavaByteCodeProcessorAdapter subclass:#JavaByteCodePreresolver
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Java-Bytecode'
!

!JavaByteCodePreresolver class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1996-2011 by Claus Gittinger

 New code and modifications done at SWING Research Group [1]:

 COPYRIGHT (c) 2010-2011 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

"
! !

!JavaByteCodePreresolver methodsFor:'instructions'!

anewarray
    (constantPool at: self fetchIndex2) resolve:false.

    "Modified: / 09-02-2012 / 23:06:29 / mh <hlopik@gmail.com>"
!

checkcast
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:06:34 / mh <hlopik@gmail.com>"
!

getfield
    (constantPool at: self fetchIndex2) resolve:false.

    "Modified: / 09-02-2012 / 23:06:45 / mh <hlopik@gmail.com>"
!

getstatic
    (constantPool at: self fetchIndex2) resolve:false.

    "Modified: / 09-02-2012 / 23:06:49 / mh <hlopik@gmail.com>"
!

instanceof
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:06:55 / mh <hlopik@gmail.com>"
!

invinterface
    (constantPool at: self fetchIndex2) resolve: false.
    self fetchBytes2.

    "Modified: / 09-02-2012 / 23:07:03 / mh <hlopik@gmail.com>"
!

invnonvirt
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:07:10 / mh <hlopik@gmail.com>"
!

invstatic
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:07:15 / mh <hlopik@gmail.com>"
!

invvirt
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:07:20 / mh <hlopik@gmail.com>"
!

multianewarray
    (constantPool at: self fetchIndex2) resolve: false.
    self fetchByte.

    "Modified: / 09-02-2012 / 23:07:24 / mh <hlopik@gmail.com>"
!

new
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:07:29 / mh <hlopik@gmail.com>"
!

putfield
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:07:33 / mh <hlopik@gmail.com>"
!

putstatic
    (constantPool at: self fetchIndex2) resolve: false.

    "Modified: / 09-02-2012 / 23:07:38 / mh <hlopik@gmail.com>"
! !

!JavaByteCodePreresolver methodsFor:'processing'!

enterProcessingLoop

            [ pc < byteCode size ] whileTrue: [
                instrPointer := pc.
                op := byteCode at: pc.
                pc := pc + 1.
                self switch: op.
            ].

    "Created: / 09-02-2012 / 22:44:13 / mh <hlopik@gmail.com>"
!

preresolve: aJavaMethod 
|size argArray|
size := aJavaMethod javaNumArgs.
    argArray := Array new: size.    
   self 
        process: aJavaMethod
        receiver: aJavaMethod javaClass
           arguments: argArray.

    "Created: / 09-02-2012 / 22:37:02 / mh <hlopik@gmail.com>"
! !

!JavaByteCodePreresolver class methodsFor:'documentation'!

version_SVN
    ^ '$Id$'
! !