KR100936401B1 - Java bytecode translating method - Google Patents

Java bytecode translating method Download PDF

Info

Publication number
KR100936401B1
KR100936401B1 KR1020070104479A KR20070104479A KR100936401B1 KR 100936401 B1 KR100936401 B1 KR 100936401B1 KR 1020070104479 A KR1020070104479 A KR 1020070104479A KR 20070104479 A KR20070104479 A KR 20070104479A KR 100936401 B1 KR100936401 B1 KR 100936401B1
Authority
KR
South Korea
Prior art keywords
field
address
stored
bytecode
field address
Prior art date
Application number
KR1020070104479A
Other languages
Korean (ko)
Other versions
KR20090039067A (en
Inventor
이종성
오형철
김현규
김관영
Original Assignee
주식회사 에이디칩스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 에이디칩스 filed Critical 주식회사 에이디칩스
Priority to KR1020070104479A priority Critical patent/KR100936401B1/en
Priority to PCT/KR2008/004796 priority patent/WO2009051335A1/en
Priority to JP2010529844A priority patent/JP2011501286A/en
Priority to US12/514,430 priority patent/US8291391B2/en
Publication of KR20090039067A publication Critical patent/KR20090039067A/en
Application granted granted Critical
Publication of KR100936401B1 publication Critical patent/KR100936401B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/3017Runtime instruction translation, e.g. macros
    • G06F9/30174Runtime instruction translation, e.g. macros for non-native instruction set, e.g. Javabyte, legacy code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/24Loading of the microprogram
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

본 발명의 자바 바이트코드 변환방법은 자바 클래스 파일로부터 자바 바이트코드를 패치하는 바이트코드 패치단계(S110)와, 패치된 자바 바이트코드의 연산코드가 정적 필드에 접근하기 위한 정적 필드 접근 바이트코드인 경우에, 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋과 기정해진 값인 정적필드주소를 합하여 제1필드주소(FA1)를 검출하고, 제1필드주소(FA1)에 따라 필드(130)에 접근하여 데이터를 처리하는 정적필드주소검출 및 데이터처리단계(S140)와, 정적필드주소검출 및 데이터처리단계(S140)에서 검출된 제1필드주소(FA1)의 비트들 중 상위비트들로 구성된 제1상위필드주소(FAU1)를 제1저장부(110)에 저장하고, 제1필드주소(FA1)의 비트들 중 제1상위필드주소(FAU1)를 제외한 나머지 하위비트들로 구성된 제1하위필드주소(FAD1)를 피연산자필드(120b)에 저장하는 정적필드주소 저장단계(S150)와, 연산코드필드(120a)에 저장된 연산코드를 사용자에 의해 기설정된 새로운 정적 필드 접근을 위한 연산코드(NOPA)로 변환하는 정적연산코드 변환단계(S160)와, 바이트코드 패치단계(S110)에서 패치된 자바 바이트코드가 정적연산코드 변환단계(S160)에서 변환된 연산코드(NOPA)를 갖는 자바 바이트코드이면 제1저장부(110)에 저장된 제1상위필드주소(FAU1)와 패치된 자바 바이트코드의 피연산자필드(120b)에 저장된 제1하위필드주소(FAD1)를 연결하여 제2필드주소(FA2)를 생성하는 제1필드주소 생성단계(S240)와, 제2필드주소(FA2)에 따라 필드(130)에 접근하여 데이터를 처리하는 제1데이터처리단계(S250)로 구성된 다.Java bytecode conversion method of the present invention is a bytecode patch step (S110) for patching a Java bytecode from a Java class file, and the operation code of the patched Java bytecode is a static field access bytecode for accessing a static field The first field address FA1 is detected by adding the static field address, which is a predetermined value, by combining the field offset of the object to be accessed by the operand of the patched bytecode. Accordingly, among the bits of the first field address FA1 detected in the static field address detection and data processing step S140 and the static field address detection and data processing step S140 that access the field 130 to process data. The first upper field address FAU1 composed of upper bits is stored in the first storage unit 110, and the remaining lower bits except for the first upper field address FAU1 among the bits of the first field address FA1. Consist of A static field address storing step (S150) for storing the first subfield address FAD1 in the operand field 120b, and an operation for accessing a new static field preset by the user in the operation code stored in the operation code field 120a. Java having a static operation code conversion step (S160) for converting to a code (NOPA), and the operation code (NOPA) converted in the static operation code conversion step (S160) the Java byte code patched in the byte code patch step (S110) If the byte code is a second field address (FAU1) stored in the first storage unit 110 and the first lower field address (FAD1) stored in the operand field (120b) of the patched Java byte code A first field address generation step S240 for generating FA2) and a first data processing step S250 for accessing the field 130 and processing data according to the second field address FA2.

자바 바이트코드, 원시코드, 정적 필드, 객체 필드, 필드주소 Java Bytecode, Source Code, Static Fields, Object Fields, Field Addresses

Description

자바 바이트코드 변환방법{Java bytecode translating method}Java bytecode translating method}

본 발명은 자바 바이트코드 변환방법에 관한 것으로, 특히 자바 바이트코드 중 필드 접근 바이트코드의 수행시 상수 풀(Constant Pool)의 해석과정의 진행 없이 필드 접근 바이트코드를 변환시켜 원시코드(native code)의 수를 현저히 줄일 수 있어 자바 가상 머신의 성능을 향상시킬 수 있는 자바 바이트코드 변환방법에 관한 것이다. The present invention relates to a method for converting Java bytecode, and in particular, when performing field access bytecode in Java bytecode, the field access bytecode is converted without proceeding to interpret the constant pool. The present invention relates to a Java bytecode conversion method that can significantly reduce the number and improve the performance of the Java virtual machine.

자바는 흔히 자바 가상 머신(Java Virtual Machine)이 해석(interpret)할 수 있는 JVML(Java Virtual Machine Language)이라는 중간 언어로 컴파일(compile)되고, 컴파일된 결과를 클래스 파일(class file)이라 하며, 클래스 파일은 바이트코드(bytecode)들로 구성된다.Java is often compiled into an intermediate language called Java Virtual Machine Language (JVM), which can be interpreted by the Java Virtual Machine, and the compiled result is called a class file. The file consists of bytecodes.

자바 가상 머신은 스택 연산(Stack Operation)을 기본으로 하기 때문에 모든 피연산자는 사용되기 전에 스택(Stack)에 저장되고, 연산의 결과도 스택에 저장됨으로써, 자바 가상 머신이 설치된 기반 프로세서(Host Processor)의 레지스터(register)의 개수와 무관하게 작성된 자바 응용프로그램(Java Application)을 수행할 수 있다. Because Java virtual machines are based on stack operations, all operands are stored on the stack before they are used, and the results of the operations are stored on the stack so that the host processor of the Java virtual machine is installed. It is possible to execute a written Java application regardless of the number of registers.

자바 프로그래밍 언어는 C나 C++와 같은 언어로 작성된 코드에 비래 수행 속도가 느리다는 단점이 있으나, 이를 극복하기 위하여 소프트웨어 해석(software interpretation) 방식, JIT(Just-In-Time) 컴파일(compilation) 방식, AOT(Ahead-Of-Time) 컴파일(compilation) 방식 및 하드웨어(hardware) 구현 방식을 사용하고 있다.The Java programming language has the disadvantage of slow performance compared to code written in languages such as C and C ++. However, in order to overcome this problem, a software interpretation method, a just-in-time compilation method, AOT (Ahead-Of-Time) compilation method and hardware implementation method are used.

소프트웨어 해석 방식은 자원의 제약이 심한 경우에 많이 사용되지만 바이트코드의 해석이 소프트웨어(software)로 수행되기 때문에 수행 속도가 느리며, JIT 컴파일 방식과 AOT 컴파일 방식은 모두 큰 메모리를 요구하는 단점을 가지고 있다.The software interpretation method is often used when resource constraints are severe, but the execution speed is slow because the interpretation of bytecode is performed by software. Both the JIT compilation method and the AOT compilation method require a large memory. .

하드웨어 구현(hardware implementation) 방식은 다른 방식들과 달리 바이트코드의 해석을 하드웨어가 수행함으로써 수행 속도를 높일 수 있고, 많은 메모리를 필요로 하지 않기 때문에 내장형 시스템(Embedded System)에 적합하다.The hardware implementation method is suitable for an embedded system because, unlike other methods, hardware can perform bytecode interpretation and speed up execution, and does not require much memory.

소프트웨어 해석기(software interpreter)와 하드웨어 해석기(hardware interpreter)를 통칭하여 자바 해석기(Java interpreter)라 하며, 자바 해석기는 각 바이트코드에 대하여 자바 가상 머신이 실행해야 할 코드인 원시코드(native code)를 가지고 있다. 자바 해석기는 바이트코드를 순차적으로 수행하며, 하나의 바이트코드가 패치(fetch)되면 이를 디코딩(decoding)하여 해당 바이트코드와 같은 동작을 수행하는 한 개 혹은 여러 개의 원시코드로써 바이트 코드를 수행한다. 다만 하드웨어 해석기는 실행해야 할 코드를 미리 메모리에 가지고 있다가 이 코드의 위치를 하드웨어적으로 맵핑(mapping) 함으로써 소프트웨어로 매핑 과정을 수행하는 하는 것보다 빠르다.The software interpreter and the hardware interpreter are collectively called the Java interpreter. The Java interpreter has native code, which is the code that the Java virtual machine should execute for each bytecode. have. The Java interpreter executes bytecodes sequentially, and when one bytecode is fetched, it decodes and executes the bytecode as one or several source codes that perform the same operation as the corresponding bytecode. The hardware interpreter, however, is faster than having the code to execute in memory and then mapping the location of the code to hardware to perform the mapping process in software.

바이트코드는 수행 동작을 규정하는 연산코드(opcode)와 이에 종속되어 해당 연산코드를 수행할 때 사용되는 피연산자(operand)로 구분된다. 연산코드와 피연산자는 모두 한 바이트로 구성되기 때문에 가능한 연산코드는 총 256개이지만 자바 가상 머신 명세(Java Virtual Machine Specification)에 따르면 연산코드는 202개를 규정하고 있으며 나머지에 대해서는 자바 가상 머신에서 새로운 바이트코드를 정의하여 사용할 수 있도록 한다. 이는 특정 바이트코드를 수행하는 과정에서 해당 연산코드를 자바 가상 머신 명세에 정의되어있지 않은 새로운 연산코드로 변환시킴으로써 정의될 수 있다. 또한, 피연산자 역시 사용자가 원하는 데이터로 변환시켜 줄 수 있다. The bytecode is divided into an opcode that defines an execution operation and an operand used to perform the opcode. Since both the opcode and the operand are composed of one byte, there are 256 possible opcodes, but according to the Java Virtual Machine Specification, 202 opcodes are specified, and the rest are new bytes in the Java virtual machine. Define the code so that it can be used. This can be defined by converting the opcode into a new opcode that is not defined in the Java virtual machine specification during the execution of a particular bytecode. In addition, the operands can also be converted into data desired by the user.

자바 응용프로그램을 컴파일하면 각 연산코드의 뒤에 피연산자를 두고 피연산자 뒤에 다음의 연산코드를 두는 방식으로 클래스 파일(class file)이 생성된다. 이때 각 연산코드는 피연산자를 여러 개 갖거나, 갖지 않는 경우도 있다.When compiling a Java application, a class file is created by placing an operand after each operation code and the following operation code after the operand. Each operation code may or may not have multiple operands.

자바 응용프로그램을 수행 시 필드에 접근하는 일이 빈번하게 발생하며, 필드 접근과 관련한 바이트코드는 정적 필드 접근과 객체 필드 접근이 있으며, 각각의 경우에 대해 필드에 쓰기와 읽기를 수행하는 바이트코드가 두 가지씩 존재한다. 정적 필드 접근을 위한 바이트코드는 'getstatic'과 'putstatic'으로 정의되고 있으며, 객체 필드 접근을 위한 바이트코드는 'getfield'와 'putfield'로 정의되며, 이들은 모두 두 개의 피연산자를 갖는다.Fields are frequently accessed when executing Java applications. The bytecodes related to field access are static field access and object field access. In each case, bytecodes for writing and reading fields are used. There are two things. The bytecodes for accessing static fields are defined as 'getstatic' and 'putstatic', and the bytecodes for accessing object fields are defined as 'getfield' and 'putfield', both of which have two operands.

도 1은 종래의 필드 접근 바이트코드의 처리과정을 나타내는 순서도이다.1 is a flowchart illustrating a process of a conventional field access bytecode.

도 1에 도시된 바와 같이 종래의 필드 접근 바이트코드의 처리과정은 클래스 파일로부터 바이트코드를 패치하는 바이트코드 패치단계(S1)와, 바이트코드 패치단계(S1)에서 패치된 바이트코드의 연산코드에 의해 패치된 바이트코드가 필드 접근을 위한 바이트코드인지를 판별하는 필드접근 판별단계(S2)와, 필드접근 판별단계(S2)에서 패치된 바이트코드가 필드 접근을 위한 바이트코드가 아니면 해당 바이트코드의 연산코드에 대응하는 핸들러로 점프하여 해당 바이트코드를 수행하는 실행단계(S3)와, 필드접근 판별단계(S2)에서 패치된 바이트코드가 필드 접근을 위한 바이트코드이면 패치된 바이트코드가 정적 필드 접근인지 객체 필드 접근을 위한 바이트코드인지를 판별하는 필드판별단계(S4)와, 필드판별단계(S4)에서 패치된 바이트코드가 정적 필드 접근(getstatic, putstatic)이면 기정해진 자바 가상 머신의 정적필드의 처음 주소인 정적필드주소를 추출하는 정적필드주소 검출단계(S5)와, 필드판별단계(S4)에서 패치된 바이트코드가 객체 필드 접근(getfield, putfield)이면 스택의 최상위에 저장된 객체 참조 데이터에 의해 객체필드의 처음 주소인 객체필드주소를 검출하는 객체필드주소 검출단계(S6)와, 패치된 바이트코드의 피연산자에 의해 상수 풀(Constant Pool)을 해석하여 접근하고자 하는 객체의 필드오프셋(offset)을 검출하는 오프셋 검출단계(S7)와, 오프셋 검출단계(S7)에서 검출된 필드오프셋과 상기 객체필드주소나 정적필드주소를 합하여 최종 필드주소를 산출하는 필드주소 산출단계(S8)와, 필드주소 산출단계(S8)에서 산출된 필드주소에 의한 필드에 접근하여 데이터를 처리하는 데이터 처리단계(S9)로 구성된다.As shown in FIG. 1, the conventional process of field access bytecode is applied to the bytecode patch step S1 for patching the bytecode from the class file, and the operation code of the bytecode patched in the bytecode patch step S1. The field access determination step (S2) for determining whether the bytecode patched by the byte code is for accessing the field and the bytecode patched in the field access determination step (S2) are not the bytecode for the field access. The execution step (S3) of jumping to the handler corresponding to the operation code to perform the corresponding bytecode, and if the bytecode patched in the field access determination step (S2) is the bytecode for the field access, the patched bytecode accesses the static field. A field discrimination step (S4) for determining whether a bytecode is for accessing a recognized object field and a bytecode patched at the field discrimination step (S4) are static fields. If getstatic or putstatic, the static field address detection step (S5) extracting the static field address, which is the first address of the static field of the specified Java virtual machine, and the bytecode patched in the field discrimination step (S4) access the object field. (getfield, putfield), the object field address detection step (S6) of detecting the object field address which is the first address of the object field by the object reference data stored on the top of the stack, and the constant pool (Constant) by the operand of the patched bytecode. An offset detection step (S7) for detecting a field offset of an object to be accessed by analyzing a pool, and a final field by adding the field offset detected in the offset detection step (S7) and the object field address or static field address. A field address calculating step (S8) for calculating an address, and a data processing step (S9) for processing data by accessing a field by the field address calculated in the field address calculating step (S8). It is made.

데이터 처리단계(S9)는 패치된 바이트코드가 getstatic 또는 getfield이면 해당 필드주소의 필드에 저장된 데이터를 스택의 최상위에 저장하거나, 패치된 바 이트코드가 putstatic 또는 putfield이면 스택의 최상위 바로 밑에 저장된 데이터를 해당 필드주소의 필드에 저장한다. The data processing step S9 stores the data stored in the field of the field address at the top of the stack if the patched bytecode is getstatic or getfield, or the data stored just below the top of the stack if the patched bytecode is putstatic or putfield. Store in the field of the field address.

도 1에 도시된 바와 같이 패치된 바이트코드가 필드 접근과 관련한 바이트코드인 경우 반드시 오프셋 검출단계(S7)에서 상수 풀(Constant Pool)을 해석하여 접근하고자 하는 객체의 필드오프셋(offset)을 검출하여야 하며, 이때 상수 풀을 해석하는 과정에서만 통상 수천 개의 원시코드(native code)가 요구되므로 자바 응용프로그램을 수행시키는데 있어 성능 저하가 발생된다.As shown in FIG. 1, when the patched bytecode is a bytecode related to field access, a constant pool must be interpreted in an offset detection step S7 to detect a field offset of an object to be accessed. In this case, since thousands of native codes are generally required only during the interpretation of the constant pool, performance degradation occurs in executing a Java application.

도 2a 및 도 2b는 도 1의 자바 응용프로그램의 수행시 성능저하를 방지하기 위해 개선된 종래의 자바 바이트코드 변환방법을 나타낸 순서도이고, 도 3은 도 2의 종래의 자바 바이트코드 변환방법에 있어 객체 필드 접근의 getfield를 설명하기 위한 블럭도이다.2A and 2B are flowcharts illustrating a conventional Java bytecode conversion method improved to prevent performance degradation when the Java application program of FIG. 1 is executed, and FIG. 3 is a view illustrating the conventional Java bytecode conversion method of FIG. A block diagram illustrating getfield for object field access.

도 2a 내지 도 3에 도시된 종래의 자바 바이트코드 변환방법은 필드 접근 바이트코드인 경우 원시코드의 수를 줄이기 위해 SUN Microsystem 사에서 제안된 것으로, 패치된 바이트코드가 필드 접근을 위한 바이트코드인 경우 이들을 새로운 바이트코드(예컨대, 'x_quick', 여기서 x는 getstatic, putstatic, getfield 또는 putfield들 중 하나이다)로 변환시켜 필드 접근을 위한 바이트코드를 처리한다.The conventional Java bytecode conversion method shown in FIGS. 2A to 3 is proposed by SUN Microsystem in order to reduce the number of source codes in the case of field access bytecode, and the patched bytecode is bytecode for field access. These are converted to a new bytecode (eg 'x_quick', where x is one of getstatic, putstatic, getfield or putfield) to process the bytecode for field access.

즉, 도 2a에 도시된 바와 같이 특정 프로그램 카운터(Program Conter)에서 패치된 바이트코드가 필드 접근을 위한 바이트코드이면(S11), 도 1에 도시된 바와 같이 필드 접근을 위한 바이트코드 처리 과정과 동일하게 바이트코드의 피연산자(operand)로부터 이에 해당하는 상수 풀을 해석하고, 상수 풀 해석에 의해 필드 오프셋(FO)을 검출하여 필드주소(FA) 및 데이터를 처리하고(S13), 필드오프셋(FO)을 바이트코드의 피연산자(1b)의 위치에 저장하고(S15), 바이트코드의 연산코드(OP)를 새로운 연산코드인 'x_quick'으로 변환시킨다(S17). 여기서 x는 getstatic, putstatic, getfield 또는 putfield들 중 하나이다. 이후 변환된 연산코드는 자바 가상 머신에서 'x_quick'으로 인식한다.That is, as shown in FIG. 2A, if the bytecode patched in a specific program counter is a bytecode for accessing a field (S11), the same process as the bytecode processing for accessing a field as shown in FIG. 1. Correspondingly, the corresponding constant pool is interpreted from the operand of the bytecode, and the field offset (FO) is detected by the constant pool analysis to process the field address (FA) and data (S13), and the field offset (FO). Is stored in the position of the operand 1b of the byte code (S15), and the operation code OP of the byte code is converted into 'x_quick', which is a new operation code (S17). Where x is one of getstatic, putstatic, getfield, or putfield. The converted opcode is then recognized as 'x_quick' by the Java virtual machine.

도 2b 및 도 3에 도시된 바와 같이 종래의 자바 바이트코드 변환방법은 다음과 같다.As shown in FIG. 2B and FIG. 3, the conventional Java bytecode conversion method is as follows.

변환된 바이트코드 검출단계(S20)는 패치된 바이트코드(1)의 연산코드(OP)(1a)가 새로 변환된 필드 접근을 위한 바이트코드의 연산코드(1a)인 'x_quick'인지를 검출한다. 변환된 바이트코드 검출단계(S20)에서 바이트코드가 새로 변환된 필드 접근을 위한 바이트코드이면, 필드판별단계(S30)는 패치된 바이트코드가 정적 필드 접근인지 객체 필드 접근을 위한 바이트코드인지를 판별한다. 정적필드주소 검출단계(S40)는 필드판별단계(S30)에서 패치된 바이트코드가 정적 필드 접근(getstatic_quick, putstatic_quick)이면 기정해진 자바 가상 머신의 정적필드의 주소를 추출한다. 객체필드주소 검출단계(S50)는 필드판별단계(S30)에서 패치된 바이트코드가 객체 필드 접근(getfield_quick, putfield_quick)이면 스택(3)의 최상위에 저장된 객체 참조 데이터(OD)에 의해 객체필드주소(5)를 검출한다. 필드주소 산출단계(S60)는 패치된 바이트코드의 피연산자(1b)에 저장된 필드오프셋(FO)과 상기 객체필드주소나 정적필드주소를 합하여 필드주소(FA)를 산출한다. 데이터 처리단계(S70)는 산출된 필드주소(FA)에 의한 필드(7)에 접근하여 필드데이 터(FD)를 처리한다.The converted bytecode detection step S20 detects whether the operation code (OP) 1a of the patched bytecode 1 is 'x_quick', which is the operation code 1a of the bytecode for accessing the newly converted field. . If the bytecode is a bytecode for accessing the newly converted field in the converted bytecode detection step (S20), the field discrimination step (S30) determines whether the patched bytecode is a bytefield for accessing a static field or an object field. do. In the static field address detection step S40, if the bytecode patched in the field discrimination step S30 is a static field access (getstatic_quick, putstatic_quick), the static field address of the predetermined Java virtual machine is extracted. In the object field address detection step S50, if the bytecode patched in the field discrimination step S30 is the object field access (getfield_quick, putfield_quick), the object field address (OD) is stored by the object reference data OD stored at the top of the stack 3. 5) is detected. The field address calculation step S60 calculates the field address FA by adding the field offset FO stored in the operand 1b of the patched bytecode with the object field address or the static field address. The data processing step S70 accesses the field 7 by the calculated field address FA and processes the field data FD.

도 2a 내지 도 3에 도시된 종래의 자바 바이트코드 변환방법은 필드 접근을 위한 바이트코드 수행시 새로운 바이트코드로 변환된 바이트코드인 경우에는 필드오프셋을 검출하기 위한 상수 풀 해석을 할 필요가 없으므로 도 1에 비해 원시코드의 수를 현저히 줄일 수 있는 장점은 있으나, 종래의 자바 바이트코드 변환방법은 객체 필드 접근을 위한 바이트코드인 경우 스택의 최상위에 위치한 객체 참조 데이터로부터 객체필드주소를 검출하여야 하고, 필드주소를 산출하기 위해 새로이 변환된 바이트코드의 피연산자에 저장된 필드오프셋과 객체필드주소를 합하거나 또는 필드오프셋과 정적필드주소를 합해주어야 하므로 이들의 과정을 수행하기 위해 많은 원시코드가 필요하며, 이로 인해 여전히 자바 응용프로그램의 수행시 성능 저하가 발생되는 문제점을 가지고 있다.In the conventional Java bytecode conversion method shown in FIGS. 2A to 3, in the case of bytecode converted to a new bytecode when performing bytecode for field access, there is no need to perform constant pool analysis to detect a field offset. Compared to 1, the number of source codes can be significantly reduced, but the conventional Java bytecode conversion method should detect the object field address from the object reference data located at the top of the stack in the case of the byte code for accessing the object field. In order to calculate the field address, a lot of source code is required to perform the process because the field offset and the object field address or the field offset and the static field address stored in the operand of the newly converted bytecode must be added. Will still cause performance degradation when running Java applications. It has a point.

본 발명의 목적은 필드 접근을 위한 바이트코드에 대해서 산출된 필드주소를 바이트코드의 피연산자와 저장부에 나누어 저장한 후 해당 바이트코드의 연산코드를 기설정된 연산코드로 변환시키고, 기설정된 연산코드에 대응되는 필드 접근을 위한 바이트코드가 패치되면 피연산자와 저장부에 저장된 데이터에 의한 필드주소에 의해 필드에 접근하여 데이터를 처리하여 정적 필드 접근 및 객체 필드 접근을 위한 필드주소를 신속히 산출할 수 있고, 필드주소 산출시 요구되는 원시코드의 수를 적게 하여 자바 응용프로그램의 수행시 성능 향상을 이룰 수 있는 자바 바이트코드 변환방법을 제공하는 데 있다. An object of the present invention is to divide and store the field address calculated for the byte code for the field access divided into the operand and the storage of the byte code, and to convert the operation code of the byte code into a predetermined operation code, When the bytecode for the corresponding field access is patched, the field address is processed by processing the data by accessing the field by the field address by the operand and the data stored in the storage, and the field address for the static field access and the object field access can be quickly calculated. The purpose of the present invention is to provide a Java bytecode conversion method that can improve the performance of a Java application by reducing the number of source codes required for field address calculation.

상기의 목적을 달성하기 위하여 본 발명의 자바 바이트코드 변환방법은 자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치하는 바이트코드 패치단계; 상기 바이트코드 패치단계에서 패치된 자바 바이트코드의 연산코드가 정적 필드에 접근하기 위한 정적 필드 접근 바이트코드인 경우에, 상기 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋과 기정해진 값인 정적필드주소를 합하여 제1필드주소를 검출하고, 상기 제1필드주소에 따라 필드에 접근하여 데이터를 처리하는 정적필드주소검출 및 데이터처리단계; 상기 정적필드주소검출 및 데이터처리단계에서 검출된 상기 제1필드주소의 비트들 중 상위비트들로 구성된 제1상위필드주소를 제1저장수단에 저장하고, 상기 제1필드주소의 비트들 중 제1상위필드주소를 제외한 나머지 하위비트들로 구성된 제1하위필드주소를 상기 피연산자필드에 저장하는 정적필드주소 저장단계; 상기 연산코드필드에 저장된 연산코드를 사용자에 의해 기설정된 새로운 정적 필드 접근을 위한 연산코드로 변환하는 정적연산코드 변환단계; 상기 바이트코드 패치단계에서 패치된 자바 바이트코드가 상기 정적연산코드 변환단계에서 변환된 연산코드를 갖는 자바 바이트코드이면 상기 제1저장수단에 저장된 제1상위필드주소와 패치된 자바 바이트코드의 피연산자필드에 저장된 제1하위필드주소를 연결하여 제2필드주소를 생성하는 제1필드주소 생성단계; 및 상기 제2필드주소에 따라 필드에 접근하여 데이터를 처리하는 제1데이터처리단계를 구비한 것을 특징으로 한다.In order to achieve the above object, the Java bytecode conversion method of the present invention comprises: a bytecode patch step of patching a Java bytecode consisting of an operation code field in which an operation code is stored and an operand field in which an operand is stored from a Java class file; If the operation code of the Java bytecode patched in the bytecode patch step is a static field access bytecode for accessing a static field, the field of an object to be accessed by interpreting a constant pool by an operand of the patched bytecode A static field address detection and data processing step of detecting a first field address by adding an offset and a static field address which is a predetermined value, and accessing a field according to the first field address to process data; A first upper field address composed of upper bits among the bits of the first field address detected in the static field address detection and data processing step is stored in a first storage means, and the first of the bits of the first field address is stored. A static field address storing step of storing a first lower field address consisting of remaining lower bits except for a first upper field address in the operand field; A static operation code conversion step of converting an operation code stored in the operation code field into an operation code for accessing a new static field preset by a user; If the Java bytecode patched in the bytecode patch step is a Java bytecode having an operation code converted in the static operation code converting step, an operand field of the first higher field address stored in the first storage means and the patched Java bytecode A first field address generation step of generating a second field address by concatenating the first lower field addresses stored in the second field address; And a first data processing step of processing data by accessing a field according to the second field address.

상기의 목적을 달성하기 위하여 본 발명의 자바 바이트코드 변환방법은 자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치하는 바이트코드 패치단계; 상기 바이트코드 패치단계에서 패치된 자바 바이트코드의 연산코드가 객체 필드에 접근하기 위한 객체 필드 접근 바이트코드인 경우에, 상기 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋과 스택의 최상위에 저장된 제1객체참조데이터에 의한 객체필드주소를 합하여 제3필드주소를 검출하고, 상기 제3필드주소에 따라 필드에 접근하여 데이터를 처리하는 객체필드주소검출 및 데이터처리단계; 상기 제1객체참조데이터와 상기 필드오프셋을 제2저장수단에 저장하는 필드오프셋 및 객체참조데이터 저장단계; 상기 객체필드주소검출 및 데이 터처리단계에서 검출된 상기 제3필드주소의 비트들 중 상위비트들로 구성된 제2상위필드주소를 제3저장수단에 저장하고, 상기 제3필드주소의 비트들 중 제2상위필드주소를 제외한 나머지 하위비트들로 구성된 제2하위필드주소를 상기 피연산자필드에 저장하는 제2필드주소 저장단계; 상기 연산코드필드에 저장된 연산코드를 사용자에 의해 기설정된 새로운 객체 필드 접근을 위한 연산코드로 변환하는 객체연산코드 변환단계; 상기 바이트코드 패치단계에서 패치된 자바 바이트코드가 상기 객체연산코드 변환단계에서 변환된 연산코드를 갖는 자바 바이트코드이면 상기 제2저장수단에 저장된 제1객체참조데이터와 스택의 최상위에 저장된 현재의 객체참조데이터가 동일한지를 비교하는 비교단계; 상기 비교단계에서 상기 제1객체참조데이터와 스택의 최상위에 저장된 현재의 객체참조데이터가 동일하면, 상기 제3저장수단에 저장된 제2상위필드주소와 패치된 자바 바이트코드의 피연산자필드에 저장된 제2하위필드주소를 연결하여 제4필드주소를 생성하는 제2필드주소 생성단계; 상기 제4필드주소에 따라 필드에 접근하여 데이터를 처리하는 제2데이터처리단계; 상기 비교단계에서 상기 제1객체참조데이터와 스택의 최상위에 저장된 현재의 객체참조데이터가 동일하지 않으면, 상기 스택의 최상위에 저장된 현재의 객체참조데이터로부터 객체필드주소를 검출하고, 검출된 객체필드주소와 상기 제2저장수단에 저장된 필드오프셋을 합하여 제5필드주소를 생성하는 제3필드주소 생성단계; 및 상기 제5필드주소에 따라 필드에 접근하여 데이터를 처리하는 제3데이터처리단계를 구비한 것을 특징으로 한다.In order to achieve the above object, the Java bytecode conversion method of the present invention comprises: a bytecode patch step of patching a Java bytecode consisting of an operation code field in which an operation code is stored and an operand field in which an operand is stored from a Java class file; If the operation code of the Java bytecode patched in the bytecode patch step is an object field access bytecode for accessing an object field, the field of an object to be accessed by interpreting a constant pool by an operand of the patched bytecode Object field address detection and data processing step of detecting the third field address by combining the offset and the object field address by the first object reference data stored at the top of the stack, and accessing the field according to the third field address to process the data. ; A field offset and object reference data storing step of storing the first object reference data and the field offset in a second storage means; Storing, in a third storage means, a second upper field address composed of upper bits among the bits of the third field address detected in the object field address detection and data processing step, and among the bits of the third field address. A second field address storing step of storing, in the operand field, a second lower field address composed of remaining lower bits except a second upper field address; An object operation code conversion step of converting an operation code stored in the operation code field into an operation code for accessing a new object field preset by a user; If the Java bytecode patched in the bytecode patch step is a Java bytecode having an operation code converted in the object operation code conversion step, the first object reference data stored in the second storage means and the current object stored on the top of the stack. A comparison step of comparing whether the reference data is the same; In the comparing step, if the first object reference data and the current object reference data stored at the top of the stack are the same, the second higher field address stored in the third storage means and the second stored in the operand field of the patched Java byte code Generating a fourth field address by concatenating lower field addresses; A second data processing step of processing data by accessing a field according to the fourth field address; In the comparing step, if the first object reference data and the current object reference data stored at the top of the stack are not the same, an object field address is detected from the current object reference data stored at the top of the stack, and the detected object field address is detected. And a third field address generation step of generating a fifth field address by adding the field offset stored in the second storage means. And a third data processing step of processing data by accessing a field according to the fifth field address.

본 발명의 자바 바이트코드 변환방법은 정적 필드 접근 및 객체 필드 접근을 위한 바이트코드에 대해서 산출된 필드주소를 바이트코드의 피연산자와 저장부에 나누어 저장한 후 해당 바이트코드의 연산코드를 기설정된 연산코드로 변환시키고, 기설정된 연산코드에 대응되는 필드 접근을 위한 바이트코드가 패치되면 피연산자와 저장부에 저장된 데이터에 의한 필드주소에 의해 필드에 접근하여 데이터를 처리하여 정적 필드 접근 및 객체 필드 접근을 위한 필드주소를 신속히 산출할 수 있고, 필드주소 산출시 요구되는 원시코드의 수를 적게 하여 자바 응용프로그램의 수행시 성능을 향상시킬 수 있다.In the Java bytecode conversion method of the present invention, a field address calculated for bytecodes for static field access and object field access is divided and stored in the operand and storage of the bytecode, and the operation code of the corresponding bytecode is preset. When the bytecode for the field access corresponding to the preset operation code is patched, the data is accessed and processed by the field address by the operand and the data stored in the storage to access the static field and the object field. The field address can be calculated quickly and the performance of the Java application can be improved by reducing the number of source codes required when calculating the field address.

이하, 첨부된 도면을 참조하여 본 발명의 자바 바이트코드 변환방법을 상세히 설명하고자 한다.Hereinafter, a Java bytecode conversion method of the present invention will be described in detail with reference to the accompanying drawings.

도 4a 및 도 4b는 발명의 정적 필드 접근을 위한 자바 바이트코드 변환방법과 이를 처리하는 과정의 순서도이고, 도 5a 및 도 5b는 본 발명의 정적 필드 접근을 위한 자바 바이트코드 변환방법을 설명하기 위한 블럭도이다. 4A and 4B are flowcharts illustrating a Java bytecode conversion method for processing static fields and a process of processing the same, and FIGS. 5A and 5B illustrate a Java bytecode conversion method for accessing a static field of the present invention. It is a block diagram.

도 4a 내지 도 5b에 도시된 바와 같이 본 발명의 자바 바이트코드 변환방법은 자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치하는 바이트코드 패치단계(S110)와, 바이트코드 패치단계(S110)에서 패치된 자바 바이트코드의 연산코드가 정적 필드에 접근하기 위한 정적 필드 접근 바이트코드인 경우에, 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋과 기정해진 값인 정적필드주소를 합하여 제1필드주소(FA1)를 검출하고, 제1필드주소(FA1)에 따라 필드(130)에 접근하여 데이터를 처리하는 정적필드주소검출 및 데이터처리단계(S140)와, 정적필드주소검출 및 데이터처리단계(S140)에서 검출된 제1필드주소(FA1)의 비트들 중 상위비트들로 구성된 제1상위필드주소(FAU1)를 제1저장부(110)에 저장하고, 제1필드주소(FA1)의 비트들 중 제1상위필드주소(FAU1)를 제외한 나머지 하위비트들로 구성된 제1하위필드주소(FAD1)를 피연산자필드(120b)에 저장하는 정적필드주소 저장단계(S150)와, 연산코드필드(120a)에 저장된 연산코드를 사용자에 의해 기설정된 새로운 정적 필드 접근을 위한 연산코드(NOPA)로 변환하는 정적연산코드 변환단계(S160)와, 바이트코드 패치단계(S110)에서 패치된 자바 바이트코드가 정적연산코드 변환단계(S160)에서 변환된 연산코드(NOPA)를 갖는 자바 바이트코드이면 제1저장부(110)에 저장된 제1상위필드주소(FAU1)와 패치된 자바 바이트코드의 피연산자필드(120b)에 저장된 제1하위필드주소(FAD1)를 연결하여 제2필드주소(FA2)를 생성하는 제1필드주소 생성단계(S240)와, 제2필드주소(FA2)에 따라 필드(130)에 접근하여 데이터를 처리하는 제1데이터처리단계(S250)로 구성된다.As shown in Figure 4a to 5b Java byte code conversion method of the present invention is a byte code patch step for patching the Java byte code consisting of the operation code field and the operand field stored operand from the Java class file (S110) And, if the opcode of the Java bytecode fetched in the bytecode patch step (S110) is a static field access bytecode for accessing the static field, to interpret and access the constant pool by the operands of the patched bytecode. Detecting the first field address FA1 by combining the field offset of the object and the static field address which is a predetermined value, and detecting the static field address for accessing the field 130 and processing data according to the first field address FA1. Higher order bits of the bits of the first field address FA1 detected in the data processing step S140 and the static field address detection and data processing step S140 A first upper field address FAU1 configured to be stored in the first storage unit 110, and a first lower field bit consisting of remaining bits except for the first upper field address FAU1 among the bits of the first field address FA1 The static field address storing step (S150) of storing the lower field address FAD1 in the operand field 120b, and the operation code for accessing a new static field preset by the user with the operation code stored in the operation code field 120a ( NOPA) Java bytecode that has a static operation code conversion step (S160) to convert to, and the byte code patch step (S110) has an operation code (NOPA) converted in the static operation code conversion step (S160) The second field address FA2 is formed by connecting the first upper field address FAU1 stored in the first storage unit 110 with the first lower field address FAD1 stored in the operand field 120b of the patched Java byte code. According to the first field address generation step (S240) and the second field address (FA2) for generating a Access to fields 130 and consists of a first data processing step (S250) to process the data.

제1필드주소(FA1)가 32비트인 경우 제1상위필드주소(FAU1)는 상위 16비트들로 이루어진 데이터이고, 제1하위필드주소(FAD1)는 하위 16비트들로 이루어진 데이터이다.When the first field address FA1 is 32 bits, the first upper field address FAU1 is data consisting of upper 16 bits, and the first lower field address FAD1 is data consisting of lower 16 bits.

제1저장부(110)는 임시저장메모리, 메모리 또는 레지스터들 중 어느 하나로 구성된다.The first storage unit 110 is composed of any one of a temporary storage memory, a memory, or registers.

도 6a 및 도 6b는 발명의 객체 필드 접근을 위한 자바 바이트코드 변환방법 과 이를 처리하는 과정의 순서도이고, 도 7a 및 도 7b는 본 발명의 객체 필드 접근을 위한 자바 바이트코드 변환방법을 설명하기 위한 블럭도이다. 6A and 6B are flowcharts illustrating a Java bytecode conversion method for accessing an object field and a process of processing the same, and FIGS. 7A and 7B are views illustrating a Java bytecode conversion method for accessing an object field of the present invention. It is a block diagram.

도 6a 내지 도 7b에 도시된 바와 같이 본 발명의 자바 바이트코드 변환방법은 자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치하는 바이트코드 패치단계(S310)와, 바이트코드 패치단계(S310)에서 패치된 자바 바이트코드의 연산코드가 객체 필드에 접근하기 위한 객체 필드 접근 바이트코드인 경우에, 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋(FOi)과 스택(240)의 최상위에 저장된 제1객체참조데이터(ODi)에 의한 객체필드주소를 합하여 제3필드주소(FA3)를 검출하고, 제3필드주소(FA3)에 따라 필드(230)에 접근하여 데이터를 처리하는 객체필드주소검출 및 데이터처리단계(S340)와, 제1객체참조데이터(ODi)와 필드오프셋(FOi)을 제2저장부(210a)에 저장하는 필드오프셋 및 객체참조데이터 저장단계(S350)와, 객체필드주소검출 및 데이터처리단계(S340)에서 검출된 제3필드주소(FA3)의 비트들 중 상위비트들로 구성된 제2상위필드주소(FAU2)를 제3저장부(210b)에 저장하고, 제3필드주소(FA3)의 비트들 중 제2상위필드주소(FAU2)를 제외한 나머지 하위비트들로 구성된 제2하위필드주소(FAD2)를 피연산자필드(220b)에 저장하는 제2필드주소 저장단계(S360)와, 연산코드필드(220a)에 저장된 연산코드를 사용자에 의해 기설정된 새로운 객체 필드 접근을 위한 연산코드(NOPB)로 변환하는 객체연산코드 변환단계(S390)와, 바이트코드 패치단계(S310)에서 패치된 자바 바이트코드가 객체연산코드 변환단계(S390)에서 변환된 연산코드(NOPB)를 갖는 자바 바이트코드이면 제2저장부(210a)에 저장된 제1객체참조데이터(ODi)와 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)가 동일한지를 비교하는 비교단계(S440)와, 비교단계(S440)에서 제1객체참조데이터(ODi)와 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)가 동일하면, 제3저장부(210b)에 저장된 제2상위필드주소(FAU2)와 패치된 자바 바이트코드의 피연산자필드(220b) 저장된 제2하위필드주소(FAD2)를 연결하여 제4필드주소(FA4)를 생성하는 제2필드주소 생성단계(S450)와, 제4필드주소(FA4)에 따라 필드(230)에 접근하여 데이터를 처리하는 제2데이터처리단계(S460)와, 비교단계(S440)에서 제1객체참조데이터(ODi)와 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)가 동일하지 않으면, 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)로부터 객체필드주소를 검출하고 검출된 객체필드주소와 제2저장부(210a)에 저장된 필드오프셋(FOi)을 합하여 제5필드주소(FA5)를 생성하는 제3필드주소 생성단계(S470)와, 제5필드주소(FA5)에 따라 필드(230)에 접근하여 데이터를 처리하는 제3데이터처리단계(S480)로 구성된다.6A to 7B, the Java bytecode conversion method of the present invention is a bytecode patch step of patching a Java bytecode consisting of an operation code field in which an operation code is stored and an operand field in which an operand is stored from a Java class file (S310). And, if the operation code of the Java bytecode patched in the bytecode patch step (S310) is an object field access bytecode for accessing the object field, the constant pool is interpreted and accessed by the operands of the patched bytecode. The third field address FA3 is detected by adding the field offset FOi of the object to the object field address based on the first object reference data ODI stored at the top of the stack 240, and the third field address FA3. According to the object field address detection and data processing step (S340) for accessing the field 230 to process the data, the first object reference data (ODi) and the field offset (FOi) The field offset and object reference data storing step (S350) stored in the book 210a, and the upper bits of the bits of the third field address FA3 detected in the object field address detection and data processing step S340 are configured. The second lower field address FAU2 is stored in the third storage unit 210b, and the second lower field consisting of remaining lower bits except for the second upper field address FAU2 among the bits of the third field address FA3. A second field address storage step S360 for storing the field address FAD2 in the operand field 220b, and an operation code for accessing a new object field preset by the user with the operation code stored in the operation code field 220a. Java bytecode having an object operation code conversion step (S390) for converting to NOPB) and an operation code (NOPB) converted from the object operation code conversion step (S390) to the Java bytecode patched at byte code patching step (S310). The first object reference data ODI stored in the second storage unit 210a A comparison step (S440) for comparing whether the current object reference data (COD) stored at the top of the tag 240 is the same, and at the top of the stack 240 and the first object reference data (ODi) in the comparison step (S440) If the current stored object reference data COD is the same, the second higher field address FAU2 stored in the third storage unit 210b and the operand field 220b of the patched Java byte code are stored in the second lower field address FAD2. Second field address generation step S450 of generating a fourth field address FA4 by connecting the second field address FA4, and a second data processing step of accessing the field 230 according to the fourth field address FA4 to process data; If the current object reference data COD stored at the top of the first object reference data ODI and the stack 240 is not the same at S460 and the comparison step S440, the current stored at the top of the stack 240 is not the same. Detects the object field address from the object reference data (COD) of the object and stores the detected object field address in the second storage unit 210a. A third field address generation step S470 of generating the fifth field address FA5 by summing the field offsets FOi, and a method of accessing the field 230 according to the fifth field address FA5 to process data; It consists of three data processing steps (S480).

상기 도 6a 내지 도 7b에 도시된 본 발명의 자바 바이트코드 변환방법은, 제1객체참조데이터(ODi)와 필드오프셋(FOi)을 제2저장부(210a)의 특정위치에 저장시키고 제2저장부(210a)의 특정위치에 저장된 제1객체참조데이터(ODi)와 필드오프셋(FOi)을 선택하기 위한 제1선택데이터(S1)를 피연산자필드(220b)에 저장하는 제1선택데이터 저장단계(S370)와 제2상위필드주소(FAU2)를 제3저장부(210b)의 특정위치에 저장시키고 제3저장부(210b)의 특정위치에 저장된 제2상위필드주소(FAU2)를 선택하기 위한 제2선택데이터(S2)를 피연산자필드(220b)에 저장하는 제2선택데이터 저장단계(S380)를 더 구비할 수 있다.6A to 7B, the Java byte code conversion method of the present invention stores the first object reference data (ODi) and the field offset (FOi) in a specific location of the second storage unit 210a and stores the second data. A first selection data storage step of storing the first object reference data ODI and the first selection data S1 for selecting the field offset FOi stored in a specific position of the unit 210a in the operand field 220b. S370 and the second upper field address FAU2 for storing the second upper field address FAU2 stored in a specific position of the third storage unit 210b and stored in the specific position of the third storage unit 210b. A second selection data storage step S380 for storing the second selection data S2 in the operand field 220b may be further provided.

제3필드주소(FA3)가 32비트인 경우 제2상위필드주소(FAU2)는 상위 16비트들로 이루어진 데이터이고, 제2하위필드주소(FAD2)는 하위 16비트들로 이루어진 데이터로 구성될 수 있고, 또는 제3필드주소(FA3)가 32비트인 경우 제2상위필드주소(FAU2)는 상위 21비트들로 이루어진 데이터이고, 제2하위필드주소(FAD2)는 하위 11비트들로 이루어진 데이터이고, 제1선택데이터(S1)는 3비트들로 이루어진 데이터이고, 제2선택데이터(S2)는 2비트로 이루어진 데이터로 구성될 수 있다.When the third field address FA3 is 32 bits, the second upper field address FAU2 is data consisting of upper 16 bits, and the second lower field address FAD2 may be composed of data consisting of lower 16 bits. Or, if the third field address FA3 is 32 bits, the second upper field address FAU2 is data of upper 21 bits, and the second lower field address FAD2 is data of lower 11 bits. The first selection data S1 may be three bits of data, and the second selection data S2 may be two bits of data.

제2,제3저장부(210a,210b)는 임시저장메모리, 메모리 또는 레지스터들 중 어느 하나로 구성될 수 있다.The second and third storage units 210a and 210b may be configured of any one of a temporary storage memory, a memory, or a register.

상기의 구성에 따른 본 발명인 자바 바이트코드 변환방법의 동작은 다음과 같다. Operation of the Java byte code conversion method of the present invention according to the above configuration is as follows.

자바 필드 접근과 관련한 바이트코드는 정적 필드 접근을 위한 바이트코드와 객체 필드 접근을 위한 바이트코드가 있으며, 정적 필드 접근을 위한 바이트코드는 'getstatic'과 'putstatic'이 있으며, 객체 필드 접근을 위한 바이트코드는 'getfield'와 'putfield'가 있다.The bytecodes related to Java field access are bytecodes for accessing static fields and bytecodes for accessing object fields. The bytecodes for accessing static fields are 'getstatic' and 'putstatic'. The code is 'getfield' and 'putfield'.

도 4a 내지 도 5b는 본 발명의 정적 필드 접근을 위한 자바 바이트코드 변환방법에 관한 것으로, 본 발명의 정적 필드 접근을 위한 자바 바이트코드 변환방법의 동작은 다음과 같다.4A to 5B illustrate a Java bytecode conversion method for accessing a static field of the present invention. The operation of the Java bytecode conversion method for accessing a static field of the present invention is as follows.

도 4a 및 도 5b에 도시된 바와 같이 바이트코드 패치단계(S110)는 자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치한다.As shown in FIGS. 4A and 5B, the byte code patching step S110 patches a Java byte code including an operation code field storing an operation code and an operand field storing an operand from a Java class file.

정적필드주소검출 및 데이터처리단계(S140)는 바이트코드 패치단계(S110)에서 패치된 자바 바이트코드의 연산코드가 정적 필드에 접근하기 위한 정적 필드 접근 바이트코드인 경우에, 즉, 연산코드가 'getstatic' 또는 'putstatic'이면, 종래와 동일하게 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋과 기정해진 값인 정적필드주소를 합하여 제1필드주소(FA1)를 산출한다. 정적 필드 접근을 위한 바이트코드가 패치되는 프로그램 카운터가 같다면 산출되는 정적 필드 접근을 위한 필드주소는 항상 동일한 값을 갖는다. 산출된 제1필드주소(FA1)에 따라 필드(130)에 접근하여 'getstatic' 또는 'putstatic'의 연산코드에 따라 제1필드주소(FA1)에 해당하는 필드(130)에 저장된 필드데이터(FD)를 스택(140)의 최상위에 저장하거나, 스택(140)의 최상위 아래에 저장된 데이터를 제1필드주소(FA1)에 해당하는 주소의 필드(130)에 저장한다.The static field address detection and data processing step S140 is performed when the operation code of the Java bytecode patched in the bytecode patch step S110 is a static field access bytecode for accessing the static field, that is, the operation code is' getstatic 'or' putstatic ', the first field address FA1 is calculated by adding the field offset of the object to be accessed and the static field address, which is a predetermined value, by analyzing the constant pool using operands of the bytecode patched as in the prior art. do. If the program counters to which the bytecodes for static field access are fetched are the same, the calculated field address for static field access always has the same value. The field data FD stored in the field 130 corresponding to the first field address FA1 is accessed according to the operation code of 'getstatic' or 'putstatic' according to the calculated first field address FA1. ) Is stored at the top of the stack 140, or data stored at the bottom of the stack 140 is stored in the field 130 of an address corresponding to the first field address FA1.

정적필드주소 저장단계(S150)는 제1필드주소(FA1)의 비트들 중 상위 16비트들인 제1상위필드주소(FAU1)를 임시저장메모리, 메모리 또는 레지스터들 중 어느 하나로 구성된 제1저장부(110)에 저장하고, 제1필드주소(FA1)의 나머지 하위 16비트들인 제1하위필드주소(FAD1)를 피연산자필드(120b)에 저장한다. 즉, 정적 필드 접근을 위한 최종 필드주소는 32비트이므로 이를 16비트인 피연산자필드에 저장할 수 없으므로 제1저장부(110)에는 제1필드주소(FA1)의 상위 16비트인 제1상위필드주 소(FAU1)를 저장하고, 제1필드주소(FA1)의 하위 16비트인 제1하위필드주소(FAD1)는 패치된 바이트코드(120)의 피연산자필드(120b)에 저장한다.The static field address storing step S150 may include a first storage unit configured to form the first upper field address FAU1, which is the upper 16 bits among the bits of the first field address FA1, by any one of a temporary storage memory, a memory, or registers. 110, and the first lower field address FAD1, which is the remaining lower 16 bits of the first field address FA1, is stored in the operand field 120b. That is, since the final field address for accessing the static field is 32 bits, it cannot be stored in the 16-bit operand field, so the first storage unit 110 stores the first upper field address, which is the upper 16 bits of the first field address FA1. (FAU1) is stored, and the first lower field address FAD1, which is the lower 16 bits of the first field address FA1, is stored in the operand field 120b of the patched bytecode 120.

정적연산코드 변환단계(S160)는 연산코드필드(120a)에 저장된 'getstatic' 또는 'putstatic'의 연산코드를 사용자에 의해 기설정된 새로운 정적 필드 접근을 위한 연산코드(NOPA)인 'getstatic_new' 또는 'putstatic_new'로 변환시킨다.Static operation code conversion step (S160) is a 'getstatic_new' or 'operation code (NOPA) for accessing a new static field preset by the user to the operation code of' getstatic 'or' putstatic 'stored in the operation code field (120a) putstatic_new '.

제1필드주소 생성단계(S240)는 바이트코드 패치단계(S110)에서 패치된 자바 바이트코드가 정적연산코드 변환단계(S160)에서 변환된 연산코드(NOPA)를 갖는 자바 바이트코드이면 제1저장부(110)에 저장된 제1상위필드주소(FAU1)와 패치된 자바 바이트코드의 피연산자필드(120b)에 저장된 제1하위필드주소(FAD1)를 연결하여 제2필드주소(FA2)를 생성하고, 제1데이터처리단계(S250)는 제2필드주소(FA2)에 따라 필드(130)에 접근하여 데이터를 처리한다.The first field address generation step S240 is a first storage unit if the Java bytecode patched in the bytecode patch step S110 is a Java bytecode having an operation code NOPA converted in the static operation code conversion step S160. A second field address FA2 is generated by connecting the first upper field address FAU1 stored in 110 with the first lower field address FAD1 stored in the operand field 120b of the patched Java byte code, and The first data processing step S250 approaches the field 130 according to the second field address FA2 and processes the data.

따라서 본 발명의 정적 필드 접근을 위한 바이트코드가 바이트코드 패치단계(S110)에서 처음에 패치되면 종래와 같은 방법으로 상수 풀 해석을 통해 제1필드주소(FA1)를 산출하여 데이터 처리한 후 제1필드주소(FA1)를 제1저장부(110)와 패치된 바이트코드의 피연산자필드에 나누어 저장하고, 연산코드필드를 새로운 연산코드로 변환시킨 후 바이트코드 패치단계(S110)에서 새로운 연산코드로 변환된 바이트코드가 패치되면 제1저장부(110)에 저장된 제1상위필드주소(FAU1)와 패치된 바이트코드의 피연산자필드(120b)의 피연산자인 제1하위필드주소(FAD1)를 연결(concatenation)하여 제2필드주소(FA2)를 생성하고, 생성된 제2필드주소(FA2)에 따라 필드(130)에 접근하여 데이터를 처리함으로써 종래와는 달리 필드주소를 신속 히 산출할 수 있다. 즉, 도 2a 및 도 2b에 도시된 바와 같이 종래의 경우 상수 풀 해석을 통해 산출된 필드오프셋과 검출된 정적필드주소를 합하여 최종 필드주소를 산출하였으나, 본 발명의 경우 바이트코드가 패치되는 프로그램 카운터가 같다면 산출되는 정적 필드 접근을 위한 필드주소는 동일하므로, 동일한 필드주소인 제1필드주소(FA1)의 상위 16비트를 제1저장부(110)에 저장하고, 하위 16비트를 피연산자필드(120b)에 저장하고 필요시 이를 연결하여 신속하게 최종필드주소인 제2필드주소(FA2)를 산출할 수 있다. Therefore, when the bytecode for accessing the static field of the present invention is first patched in the bytecode patching step S110, the first field address FA1 is calculated through the constant pool analysis in the same manner as in the prior art, and the data is processed. The field address FA1 is divided and stored in the operand field of the first storage unit 110 and the patched byte code, the operation code field is converted into a new operation code, and then converted into a new operation code in the byte code patching step S110. When the patched bytecode is patched, the first higher field address FAU1 stored in the first storage unit 110 is concatenated with the first lowerfield address FAD1, which is an operand of the operand field 120b of the patched bytecode. By generating the second field address FA2 and processing the data by accessing the field 130 according to the generated second field address FA2, the field address can be quickly calculated. That is, as shown in FIGS. 2A and 2B, in the conventional case, the final field address was calculated by adding the field offset calculated through the constant pool analysis and the detected static field address. However, in the present invention, the program counter is patched with the bytecode. If is equal to the calculated field address for the static field access is the same, the upper 16 bits of the first field address (FA1) that is the same field address is stored in the first storage unit 110, and the lower 16 bits of the operand field ( The second field address FA2, which is the final field address, can be quickly calculated by storing the information stored in the terminal 120b).

하드웨어 해석기가 프로그램 카운터의 갱신을 관장하는 경우, 도 5b에 도시된 'getstatic_new'의 바이트코드 명령을 수행하기 위해 제2필드주소(FA2)로부터 필드(130)에 저장된 필드데이터(FD)를 읽고 스택(140)의 최상위에 필드데이터(FD)를 저장하고, 스택 포인터(stack pointer)를 갱신하는 3개의 원시코드(native code)가 요구되며, 만약 하드웨어 해석기가 스택 포인터의 갱신까지도 관장할 경우에는 2개의 원시코드가 요구되므로, 종래에 비해 바이트코드 명령 수행을 위해 요구되는 원시코드의 수를 줄일 수 있으므로 자바 응용프로그램의 수행시 성능을 향상시킬 수 있다. If the hardware interpreter is responsible for updating the program counter, the field data FD stored in the field 130 is read and stacked from the second field address FA2 to execute the bytecode instruction of 'getstatic_new' shown in Fig. 5B. Three native codes are required to store the field data (FD) at the top of (140) and update the stack pointer, or 2 if the hardware interpreter is also responsible for updating the stack pointer. Since three source codes are required, the number of source codes required to execute bytecode instructions can be reduced, compared to the conventional ones, thereby improving performance when executing Java applications.

도 6a 내지 도 7b는 본 발명의 객체 필드 접근을 위한 자바 바이트코드 변환방법에 관한 것으로, 본 발명의 객체 필드 접근을 위한 자바 바이트코드 변환방법의 동작은 다음과 같다.6A to 7B illustrate a Java bytecode conversion method for accessing an object field of the present invention. The operation of the Java bytecode conversion method for accessing an object field of the present invention is as follows.

동적 필드 접근을 위한 바이트코드인 'getfield' 및 'putfield'는 패치되는 프로그램 카운터가 동일하더라도 스택(240)의 최상위에 존재하는 객체참조데이 터(object reference data)가 달라질 수 있기 때문에 정적 필드 접근을 위한 바이트코드와는 다르게 처리하여야 한다. The bytecodes 'getfield' and 'putfield' for dynamic field access use static field access because object reference data at the top of stack 240 may vary even if the program counters being patched are identical. It should be handled differently than the bytecode for.

도 6a 및 도 7a에 도시된 바와 같이 바이트코드 패치단계(S310)는 자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치한다. 객체필드주소검출 및 데이터처리단계(S340)는 바이트코드 패치단계(S310)에서 패치된 자바 바이트코드의 연산코드가 객체 필드에 접근하기 위한 객체 필드 접근 바이트코드인 'getfield' 또는 'putfield'이면, 종래의 방법과 동일하게 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋(FOi)과 스택(240)의 최상위에 저장된 제1객체참조데이터(ODi)에 의한 객체필드주소를 합하여 제3필드주소(FA3)를 검출하고, 제3필드주소(FA3)에 따라 필드(230)에 접근하여 데이터를 처리한다.As shown in FIGS. 6A and 7A, the byte code patching step S310 patches a Java byte code including an operation code field in which an operation code is stored and an operand field in which an operand is stored, from a Java class file. In the object field address detection and data processing step S340, when the operation code of the Java byte code patched in the byte code patch step S310 is 'getfield' or 'putfield', which is an object field access byte code for accessing an object field, In the same way as in the conventional method, an object field based on a field offset (FOi) of an object to be accessed by analyzing a constant pool by an operand of a patched bytecode and a first object reference data (ODi) stored at the top of the stack 240. The sum of the addresses detects the third field address FA3, and accesses the field 230 according to the third field address FA3 to process data.

필드오프셋 및 객체참조데이터 저장단계(S350)는 제1객체참조데이터(ODi)와 필드오프셋(FOi)을 제2저장부(210a)에 저장하고, 제2필드주소 저장단계(S360)는 객체필드주소검출 및 데이터처리단계(S340)에서 검출된 제3필드주소(FA3)의 비트들 중 상위비트들로 구성된 제2상위필드주소(FAU2)를 제3저장부(210b)에 저장하고, 제3필드주소(FA3)의 비트들 중 제2상위필드주소(FAU2)를 제외한 나머지 하위비트들로 구성된 제2하위필드주소(FAD2)를 피연산자필드(220b)에 저장한다. The field offset and object reference data storing step (S350) stores the first object reference data (ODi) and the field offset (FOi) in the second storage unit 210a, and the second field address storing step (S360) is an object field. The second upper field address FAU2 including upper bits among the bits of the third field address FA3 detected in the address detection and data processing step S340 is stored in the third storage unit 210b, and the third storage unit 210b stores the third upper field address FAU2. The second lower field address FAD2 including the remaining lower bits except the second upper field address FAU2 among the bits of the field address FA3 is stored in the operand field 220b.

제3필드주소(FA3)가 32비트인 경우 정적 필드 접근과 동일하게 제2상위필드주소(FAU2)는 상위 16비트들로 이루어진 데이터이고, 제2하위필드주소(FAD2)는 하 위 16비트들로 이루어진 데이터로 구성될 수도 있고, 또는 제2저장부(210a)와 제3저장부(210b)에 각각 저장되는 제1객체참조데이터(ODi)와 필드오프셋(FOi)과 제2상위필드주소(FAU2)들의 수에 따라 제2상위필드주소(FAU2)와 제2하위필드주소(FAD2)의 비트들의 크기는 상이하다. 예를 들어 도 6a에 도시된 바와 같이 제2저장부(210a)에 저장될 수 있는 엔트리(entry)의 수를 8개로 설정하고, 제3저장부(210b)에 저장될 수 있는 엔트리의 수를 4개로 설정할 경우에는, 물론 이러한 엔트리의 수는 사용자에 의해 결정되는 값으로, 제2저장부(210a)로 저장되는 필드오프셋(FOi)과 제1객체참조데이터(ODi)는 각각 8개씩 저장될 수 있으며, 저장되는 위치의 엔트리를 결정하기 위해서 3비트들로 구성된 제1선택데이터(S1)가 필요하고, 제3저장부(210b)로 저장되는 제2상위필드주소(FAU2)가 3개일 경우에는 저장되는 위치의 엔트리를 결정하기 위해서 2비트들로 구성된 제2선택데이터(S2)가 필요하며, 이경우에는 피연산자필드(120b)에 제1,제2선택데이터(S1,S2)를 저장하여야 하므로 피연산자필드(120b)에는 5비트들인 제1,제2선택데이터(S1,S2)를 제외한 11비트들만 저장될 수 있으므로 제2하위필드주소(FAD2)는 제3필드주소(FA3)의 하위 11비트들로 구성된 데이터이고, 제2상위필드주소(FAU2)는 상위 21비트들로 이루어진 데이터로 구성된다.If the third field address FA3 is 32 bits, the second upper field address FAU2 is data consisting of the upper 16 bits, and the second lower field address FAD2 is the lower 16 bits, similar to the static field access. The first object reference data (ODi), the field offset (FOi), and the second upper field address (1) stored in the second storage unit 210a and the third storage unit 210b, respectively. According to the number of FAU2), the sizes of the bits of the second upper field address FAU2 and the second lower field address FAD2 are different. For example, as shown in FIG. 6A, the number of entries that can be stored in the second storage 210a is set to eight, and the number of entries that can be stored in the third storage 210b is set. In the case of setting the number to four, the number of these entries is, of course, a value determined by the user, and eight field offsets FOi and one first object reference data ODi stored in the second storage 210a are stored. In order to determine the entry of the stored location, the first selection data S1 composed of 3 bits is required, and the third upper field address FAU2 stored in the third storage unit 210b is three. Requires second selection data S2 consisting of two bits to determine the entry of the location to be stored. In this case, the first and second selection data S1 and S2 must be stored in the operand field 120b. In the operand field 120b, only 11 bits are excluded except the first and second selection data S1 and S2 which are 5 bits. Can to be stored second sub-field address (FAD2) is a third field, and address data composed of the lower 11 bits of the (FA3), the second field is the top address (FAU2) is made up of data consisting of the upper 21 bits.

제1선택데이터 저장단계(S370)는 제1객체참조데이터(ODi)와 필드오프셋(FOi)을 제2저장부(210a)의 특정위치에 저장하고, 제2저장부(210a)의 특정위치에 저장된 제1객체참조데이터(ODi)와 필드오프셋(FOi)을 선택하기 위한 제1선택데이터(S1)를 피연산자필드(220b)에 저장하고, 제2선택데이터 저장단계(S380)는 제2상위필드주 소(FAU2)를 제3저장부(210b)의 특정위치에 저장하고, 제3저장부(210b)의 특정위치에 저장된 제2상위필드주소(FAU2)를 선택하기 위한 제2선택데이터(S2)를 피연산자필드(220b)에 저장한다.The first selection data storing step S370 stores the first object reference data ODI and the field offset FOi at a specific position of the second storage unit 210a, and stores the first object reference data ODI and the field offset FOi at a specific position of the second storage unit 210a. The first selection data S1 for selecting the stored first object reference data ODI and the field offset FOi is stored in the operand field 220b, and the second selection data storing step S380 is performed in the second upper field. Second selection data S2 for storing the address FAU2 at a specific location of the third storage unit 210b and for selecting a second higher field address FAU2 stored at the specific location of the third storage unit 210b. ) Is stored in the operand field 220b.

객체연산코드 변환단계(S390)는 연산코드필드(220a)에 저장된 연산코드인 'getfield' 또는 'putfield'는 사용자에 의해 기설정된 새로운 객체 필드 접근을 위한 연산코드(NOPB)인 'getfield_new' 또는 'putfield_new'로 변환시킨다.Object operation code conversion step (S390) is the operation code 'getfield' or 'putfield' stored in the operation code field 220a 'getfield_new' or 'operation code (NOPB) for accessing a new object field preset by the user convert it to putfield_new '.

도 6b 및 도 7b에 도시된 바와 같이 비교단계(S440)는 바이트코드 패치단계(S310)에서 패치된 자바 바이트코드가 객체연산코드 변환단계(S390)에서 변환된 연산코드(NOPB)를 갖는 자바 바이트코드이면(S420), 즉 앞서 객체연산코드 변환단계(S390)에서 변환된 연산코드(NOPB)를 갖는 프로그램 카운터와 동일한 프로그램 카운터를 패치하는 경우, 제2저장부(210a)에 저장된 제1객체참조데이터(ODi)와 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)가 동일한지를 비교한다.As shown in FIGS. 6B and 7B, the comparing step S440 is a Java byte having the operation code NOPB converted in the object operation code conversion step S390 of the Java bytecode patched in the byte code patch step S310. If it is a code (S420), that is, when patching the same program counter as the program counter having the operation code (NOPB) converted in the object operation code conversion step (S390), the first object reference stored in the second storage unit (210a) The data ODI and the current object reference data COD stored at the top of the stack 240 are compared with each other.

바이트코드 패치단계(S310)에서 패치된 자바 바이트코드가 객체연산코드 변환단계(S390)에서 변환된 연산코드(NOPB)를 갖는 자바 바이트코드가 아니면, 종래의 바이트코드 변환방법과 동일한 방법에 따라 수행한다(S430). If the Java bytecode patched in the bytecode patch step S310 is not the Java bytecode having the operation code NOPB converted in the object operation code conversion step S390, the Java bytecode is performed according to the same method as the conventional bytecode conversion method. (S430).

비교단계(S440)에서 제1객체참조데이터(ODi)와 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)가 동일하면, 최종 필드주소는 객체필드주소검출 및 데이터처리단계(S340)에서 검출된 제3필드주소(FA3)와 동일하므로, 제2필드주소 생성단계(S450)는 제3저장부(210b)에 저장된 21비트들로 구성된 제2상위필드주소(FAU2)와 패치된 자바 바이트코드의 피연산자필드(220b) 저장된 11비트들로 구성된 제2하 위필드주소(FAD2)를 연결하여 제4필드주소(FA4)를 생성하고, 제2데이터처리단계(S460)는 제4필드주소(FA4)에 따라 필드(230)에 접근하여 데이터를 처리한다. 즉, 비교단계(S440)에서 제1객체참조데이터(ODi)와 현재의 객체참조데이터(COD)가 동일하면 도 4a의 정적 필드 접근을 위한 자바 바이트코드 변환방법과 동일하게 저장부에 저장된 상위필드주소와 피연산자필드에 저장된 하위필드주소와 연결하여 필드 접근을 위한 최종 필드주소를 생성한다. If the first object reference data (ODi) and the current object reference data (COD) stored on the top of the stack 240 is the same in the comparison step (S440), the final field address is the object field address detection and data processing step (S340) Since the second field address FA3 is identical to the third field address FA3 detected in the second field address generation step S450, the second higher field address FAU2 composed of 21 bits stored in the third storage unit 210b and the patched Java field. An operand field 220b of the bytecode is connected to the second subfield address FAD2 having 11 bits stored therein to generate a fourth field address FA4, and the second data processing step S460 generates a fourth field address. According to FA4, the field 230 is approached to process data. That is, if the first object reference data (ODi) and the current object reference data (COD) are the same in the comparison step (S440), the upper field stored in the storage unit in the same manner as the Java byte code conversion method for accessing the static field of FIG. The final field address for field access is created by linking with the subfield address stored in the address and operand fields.

제3필드주소 생성단계(S470)는 비교단계(S440)에서 제2저장부(210a)에 저장된 제1객체참조데이터(ODi)와 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)가 동일하지 않으면, 객체필드주소검출 및 데이터처리단계(S340)에서 검출된 제3필드주소(FA3)와 객체 필드 접근을 위한 패치된 변환된 연산코드를 갖는 바이트코드의 최종 필드 주소는 상이하므로, 최종 필드 주소인 제5필드주소(FA5)를 생성하기 위해 스택(240)의 최상위에 저장된 현재의 객체참조데이터(COD)로부터 객체필드주소를 검출하고, 검출된 객체필드주소와 제2저장부(210a)에 저장된 필드오프셋(FOi)을 합하여 제5필드주소(FA5)를 생성한다.In the third field address generation step S470, the first object reference data ODI stored in the second storage unit 210a and the current object reference data COD stored at the top of the stack 240 may be compared in operation S440. If is not the same, the last field address of the bytecode having the patched converted opcode for accessing the object field and the third field address FA3 detected in the object field address detection and data processing step S340 is different. In order to generate the fifth field address FA5, which is the final field address, the object field address is detected from the current object reference data COD stored at the top of the stack 240, and the detected object field address and the second storage unit ( The fifth field address FA5 is generated by adding the field offsets FOi stored in 210a.

제3데이터처리단계(S480)는 제5필드주소(FA5)에 따라 필드(230)에 접근하여 데이터를 처리한다.The third data processing step S480 approaches the field 230 according to the fifth field address FA5 to process data.

비교단계(S440)와 제3필드주소 생성단계(S470)에서 각각 제2저장부(210a)에 저장된 제1객체참조데이터(ODi)와 필드오프셋(FDi)를 제2저장부(210a)로부터 꺼내올 경우에는 패치된 바이트코드의 피연산자필드(220b)에 저장된 제1선택데이터(S1)의 데이터의 논리값에 따라 결정된다. 즉, 제1선택데이터의 논리값이 011이면 제2 저장부(210a)로부터 제2저장부(210a)의 4번째의 엔트리에 저장된 제1객체참조데이터(OD4)와 필드오프셋(FD4)을 꺼내서 처리한다. In the comparison step S440 and the third field address generation step S470, the first object reference data ODI and the field offset FDi stored in the second storage unit 210a are taken out from the second storage unit 210a, respectively. In this case, it is determined according to the logical value of the data of the first selection data S1 stored in the operand field 220b of the patched bytecode. That is, when the logical value of the first selection data is 011, the first object reference data OD4 and the field offset FD4 stored in the fourth entry of the second storage unit 210a are extracted from the second storage unit 210a. Process.

상기와 동일하게 제2필드주소 저장단계(S360)에서 제3저장부(210b)에 저장된 제3필드주소(FA3)의 제2상위필드주소(FAU2)를 제3저장부(210b)로부터 가져올 때에는 제2선택데이터(S2)의 데이터 논리값에 따라 결정되는 엔트리의 위치에 저장된 제2상위필드주소(FAU2)를 가져온다. 예를 들어 제2선택데이터(S2)가 10이면 제3저장부(210b)의 3번째 엔트리에 저장된 제2상위필드주소(FAU2b)를 가져와서 피연산필드(220b)에 저장된 제2하위필드주소(FAD2)와 연결하여 최종 필드주소인 제4필드주소(FA4)를 생성한다.As described above, when the second upper field address FAU2 of the third field address FA3 stored in the third storage unit 210b is retrieved from the third storage unit 210b in the second field address storage step S360. The second higher field address FAU2 stored in the position of the entry determined according to the data logical value of the second selection data S2 is obtained. For example, if the second selection data S2 is 10, the second lower field address stored in the operand field 220b is obtained by obtaining the second higher field address FAU2b stored in the third entry of the third storage unit 210b. In connection with FAD2, a fourth field address FA4, which is the final field address, is generated.

제2저장부(210a) 및 제3저장부(210b)는 임시저장메모리, 메모리 또는 레지스터들 중 어느 하나로 구성될 수 있다.The second storage unit 210a and the third storage unit 210b may be configured of any one of a temporary storage memory, a memory, or a register.

따라서, 도 6a 내지 도 7b에 도시된 본 발명의 객체 필드 접근을 위한 자바 바이트코드 변환방법은 특정 프로그램 카운터에서 패치된 객체 필드 접근을 위한 바이트코드의 처리시 스택(240)의 최상위에 존재하는 현재의 객체참조데이터(COD)와 필드오프셋 및 객체참조데이터 저장단계(S350)에서 제2저장부(210a)에 저장된 제1객체참조데이터(ODi)가 동일할 경우에는 패치된 피연산자필드에 저장된 제2하위필드주소(FAD2)와 제3저장부(210b)에 저장된 제2상위필드주소(FAU2)를 연결하여 필드 접근을 위한 최종 필드주소인 제4필드주소(FA4)를 신속하게 생성할 수 있고, 이에 요구되는 원시코드의 수를 줄일 수 있고, 현재의 객체참조데이터(COD)와 제1객체참조데이터(ODi)가 동일하지 않을 경우에는 제2저장부(210a)에 저장된 필드오프 셋(FDi)을 현재의 객체참조데이터(COD)로부터 검출된 객체필드주소를 합하여 필드 접근을 위한 최종 필드주소인 제5필드주소(FA5)를 용이하게 생성할 수 있다.Accordingly, the Java bytecode conversion method for accessing the object field of the present invention shown in FIGS. 6A to 7B is presently present at the top of the stack 240 when processing the bytecode for accessing the object field fetched from a specific program counter. If the object reference data (COD) and the first object reference data (ODi) stored in the second storage unit 210a is the same in the field offset and object reference data storage step (S350) of the second stored in the patched operand field By connecting the lower field address FAD2 and the second upper field address FAU2 stored in the third storage unit 210b, the fourth field address FA4, which is the final field address for field access, can be quickly generated. If the number of source codes required for this can be reduced, and the current object reference data (COD) and the first object reference data (ODi) are not the same, the field offset set (FDi) stored in the second storage unit 210a. To the current object reference data (COD) Combining the detected object field emitter address can easily generate the final address field of a fifth address field (FA5) for field access.

본 발명의 자바 바이트코드 변환방법은 도 4a 및 도 4b의 정적 필드 접근을 위한 자바 바이트코드 변환방법과 도 6a 및 도 6b의 객체 필드 접근을 위한 자바 바이트코드 변환방법을 함께 구현할 수도 있으며, 이를 위해서는 바이트코드 패치단계(S110, S210, S310, S410)에서 바이트코드를 패치한 후 도 1 및 도 2b에 도시된 바와 같이 패치된 바이트코드가 객체 필드 접근인지 정적 필드 접근에 관한 것인지를 판별하는 필드판별단계가 더 필요하다. 또한, 이 경우 제1저장부(110)와 제2저장부(210a)를 별도로 구성할 필요가 없이 하나의 저장부로 구성할 수도 있다. The Java bytecode conversion method of the present invention may be implemented with the Java bytecode conversion method for accessing the static field of FIGS. 4A and 4B and the Java bytecode conversion method for accessing the object field of FIGS. 6A and 6B. Field discrimination to determine whether the patched bytecode is for object field access or static field access as shown in FIGS. 1 and 2B after patching the bytecode in the bytecode patching step (S110, S210, S310, S410) More steps are needed. In this case, the first storage unit 110 and the second storage unit 210a do not need to be configured separately, but may be configured as one storage unit.

도 2a 및 도 2b에 의한 종래의 자바 바이트코드 변환방법과 본 발명에 의한 자바 바이트코드 변환방법을 기반 프로세서에 하드웨어 해석기를 내장시키고, 이를 보조하는 소프트웨어 해석기로 휴대용 기기를 타겟으로 만들어진 와바 가상 머신(Waba Virtual Machine)을 사용한 경우에 대해서 각각 요구되는 원시코드의 수를 비교하면 다음과 같다. A wava virtual machine made by targeting a portable device with a hardware interpreter embedded in a processor based on the conventional Java bytecode conversion method according to FIGS. 2A and 2B and the Java bytecode conversion method according to the present invention. In case of using Waba Virtual Machine, the number of required source codes is compared as follows.

바이트코드 Bytecode getstatic의 경우 요구되는 원시코드의 수getstatic, the number of source codes required putstatic의 경우 요구되는 원시코드의 수the number of source codes required for putstatic getfield의 경우 요구되는 원시코드의 수For getfield, the number of source codes required putfield의 경우 요구되는 원시코드의 수For putfield, the number of source codes required 종래의 경우Conventional case 3737 3838 5959 6161 본 발명의 경우In the case of the present invention 33 33 2323 2626

상기 표 1에서 객체 필드 접근을 위한 'getfield' 및 'putfield'의 바이트코드를 수행하기 위해서는 제2저장부(210a)에 접근하여 제1객체참조데이터(ODi)와 스택(240)의 최상위의 현재의 객체참조데이터(COD)가 동일한지를 비교하여야 하므로 정적 필드 접근을 위한 'getstatic' 및 'putstatic'의 바이트코드를 수행하는 경우에 비해 많은 원시코드가 필요하다는 것을 알 수 있으며, 본 발명의 자바 바이트코드 변환방법에 의한 바이트코드 수행시 종래의 경우에 비해 요구되는 원시코드의 수는 현저하게 줄어들었음을 알 수 있다.In Table 1, in order to execute the byte codes of 'getfield' and 'putfield' for accessing the object field, the second storage unit 210a is accessed to present the first object reference data ODI and the top of the stack 240. It is necessary to compare whether the object reference data (COD) of is the same, it can be seen that a lot of source code is required compared to the case of performing 'getstatic' and 'putstatic' bytecode for accessing the static field, Java byte of the present invention It can be seen that the number of source codes required is significantly reduced compared to the conventional case when performing bytecode by the code conversion method.

따라서 본 발명의 자바 바이트코드 변환방법은 정적 필드 접근 및 객체 필드 접근을 위한 필드주소를 생성하기 위해 요구되는 원시코드의 수를 적게 할 수 있고, 이로 인해 자바 응용프로그램의 수행시 성능을 향상시킬 수 있다.Therefore, the Java bytecode conversion method of the present invention can reduce the number of source codes required to generate field addresses for static field access and object field access, thereby improving performance when executing a Java application. have.

도 1은 종래의 필드 접근을 자바 바이트코드의 처리과정을 나타내는 순서도,1 is a flowchart illustrating a process of processing Java bytecode in a conventional field access method.

도 2a 및 도 2b는 종래의 필드 접근을 위한 자바 바이트코드 변환방법을 나타낸 순서도,2A and 2B are flowcharts illustrating a Java bytecode conversion method for accessing a conventional field;

도 3은 도 2a 및 도 2b의 종래의 자바 바이트코드 변환방법을 설명하기 위한 구성도, 3 is a block diagram illustrating a conventional Java bytecode conversion method of FIGS. 2A and 2B;

도 4a 및 도 4b는 동적 필드 접근을 위한 본 발명의 자바 바이트코드 변환방법과 이를 처리하는 과정의 순서도,4A and 4B are flowcharts illustrating a Java bytecode conversion method and a process of processing the same according to the present invention for dynamic field access;

도 5a 및 도 5b는 동적 필드 접근을 위한 본 발명의 자바 바이트코드 변환방법을 설명하기 위한 구성도,5A and 5B are diagrams for describing a Java bytecode conversion method of the present invention for dynamic field access;

도 6a 및 도 6b는 객체 필드 접근을 위한 본 발명의 자바 바이트코드 변환방법과 이를 처리하는 과정의 순서도,6A and 6B are flowcharts illustrating a method of processing Java bytecode conversion and processing the same for accessing an object field;

도 7a 및 도 7b는 객체 필드 접근을 위한 본 발명의 자바 바이트코드 변환방법을 설명하기 위한 구성도이다. 7A and 7B are diagrams illustrating a Java bytecode conversion method of the present invention for accessing an object field.

Claims (9)

자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치하는 바이트코드 패치단계(S110);A bytecode patch step (S110) of patching a Java bytecode composed of an operation code field in which an operation code is stored and an operand field in which an operand is stored from a Java class file; 상기 바이트코드 패치단계에서 패치된 자바 바이트코드의 연산코드가 정적 필드에 접근하기 위한 정적 필드 접근 바이트코드인 경우에, 상기 패치된 바이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋과 기정해진 값인 정적필드주소를 합하여 제1필드주소를 검출하고, 상기 제1필드주소에 따라 필드에 접근하여 데이터를 처리하는 정적필드주소검출 및 데이터처리단계(S140);If the operation code of the Java bytecode patched in the bytecode patch step is a static field access bytecode for accessing a static field, the field of an object to be accessed by interpreting a constant pool by an operand of the patched bytecode A static field address detection and data processing step of detecting a first field address by adding an offset and a static field address which is a predetermined value, and accessing a field according to the first field address to process data; 상기 정적필드주소검출 및 데이터처리단계(S140)에서 검출된 상기 제1필드주소의 비트들 중 상위비트들로 구성된 제1상위필드주소를 제1저장수단에 저장하고, 상기 제1필드주소의 비트들 중 제1상위필드주소를 제외한 나머지 하위비트들로 구성된 제1하위필드주소를 상기 피연산자필드에 저장하는 정적필드주소 저장단계(S150);Storing a first upper field address composed of upper bits among the bits of the first field address detected in the static field address detection and data processing step S140 in a first storage means, and storing the bits of the first field address. A static field address storing step (S150) of storing a first lower field address composed of remaining lower bits except for a first upper field address among the operand fields; 상기 연산코드필드에 저장된 연산코드를 사용자에 의해 기설정된 새로운 정적 필드 접근을 위한 연산코드로 변환하는 정적연산코드 변환단계(S160);A static operation code conversion step (S160) of converting an operation code stored in the operation code field into an operation code for accessing a new static field preset by a user; 상기 바이트코드 패치단계에서 패치된 자바 바이트코드가 상기 정적연산코드 변환단계에서 변환된 연산코드를 갖는 자바 바이트코드이면 상기 제1저장수단에 저 장된 제1상위필드주소와 패치된 자바 바이트코드의 피연산자필드에 저장된 제1하위필드주소를 연결하여 제2필드주소를 생성하는 제1필드주소 생성단계(S240); 및 If the Java bytecode patched in the bytecode patch step is a Java bytecode having an operation code converted in the static operation code converting step, an operand of a first higher field address stored in the first storage means and a patched Java bytecode Generating a second field address by concatenating the first subfield address stored in the field (S240); And 상기 제2필드주소에 따라 필드에 접근하여 데이터를 처리하는 제1데이터처리단계(S250)를 구비한 것을 특징으로 하는 자바 바이트코드 변환방법.And a first data processing step (S250) for processing data by accessing a field according to the second field address. 제 1 항에 있어서, 상기 제1필드주소가 32비트인 경우 상기 제1상위필드주소는 상위 16비트들로 이루어진 데이터이고, 상기 제1하위필드주소는 하위 16비트들로 이루어진 데이터인 것을 특징으로 하는 자바 바이트코드 변환방법.The method of claim 1, wherein when the first field address is 32 bits, the first upper field address is data consisting of upper 16 bits, and the first lower field address is data consisting of lower 16 bits. Java bytecode conversion method. 제 1 항에 있어서, 상기 제1저장수단은 임시저장메모리, 메모리 또는 레지스터들 중 어느 하나인 것을 특징으로 하는 자바 바이트코드 변환방법.The method of claim 1, wherein the first storage means is any one of a temporary storage memory, a memory, and registers. 자바 클래스 파일로부터 연산코드가 저장된 연산코드필드와 피연산자가 저장된 피연산자필드로 이루어진 자바 바이트코드를 패치하는 바이트코드 패치단계(S310);A bytecode patch step (S310) of patching a Java bytecode consisting of an operation code field in which an operation code is stored and an operand field in which an operand is stored from a Java class file; 상기 바이트코드 패치단계(S310)에서 패치된 자바 바이트코드의 연산코드가 객체 필드에 접근하기 위한 객체 필드 접근 바이트코드인 경우에, 상기 패치된 바 이트코드의 피연산자에 의해 상수 풀을 해석하여 접근하고자 하는 객체의 필드오프셋과 스택의 최상위에 저장된 제1객체참조데이터에 의한 객체필드주소를 합하여 제3필드주소를 검출하고, 상기 제3필드주소에 따라 필드에 접근하여 데이터를 처리하는 객체필드주소검출 및 데이터처리단계(S340);When the operation code of the Java byte code patched in the byte code patch step S310 is an object field access byte code for accessing an object field, the constant pool is interpreted and accessed by an operand of the patched byte code. Detects the third field address by adding the field offset of the object and the object field address by the first object reference data stored at the top of the stack, and detects the object field address that processes the data by accessing the field according to the third field address. And a data processing step (S340); 상기 제1객체참조데이터와 상기 필드오프셋을 제2저장수단에 저장하는 필드오프셋 및 객체참조데이터 저장단계(S350);A field offset and object reference data storing step of storing the first object reference data and the field offset in a second storage means (S350); 상기 객체필드주소검출 및 데이터처리단계(S340)에서 검출된 상기 제3필드주소의 비트들 중 상위비트들로 구성된 제2상위필드주소를 제3저장수단에 저장하고, 상기 제3필드주소의 비트들 중 제2상위필드주소를 제외한 나머지 하위비트들로 구성된 제2하위필드주소를 상기 피연산자필드에 저장하는 제2필드주소 저장단계(S360);Storing a second upper field address composed of upper bits among the bits of the third field address detected in the object field address detection and data processing step S340, and storing the bits of the third field address. A second field address storing step (S360) of storing a second lower field address including remaining lower bits except for a second upper field address in the operand field; 상기 연산코드필드에 저장된 연산코드를 사용자에 의해 기설정된 새로운 객체 필드 접근을 위한 연산코드로 변환하는 객체연산코드 변환단계(S390);An object operation code conversion step (S390) of converting an operation code stored in the operation code field into an operation code for accessing a new object field preset by a user; 상기 바이트코드 패치단계에서 패치된 자바 바이트코드가 상기 객체연산코드 변환단계(S390)에서 변환된 연산코드를 갖는 자바 바이트코드이면 상기 제2저장수단에 저장된 제1객체참조데이터와 스택의 최상위에 저장된 현재의 객체참조데이터가 동일한지를 비교하는 비교단계(S440);If the Java bytecode patched in the bytecode patch step is a Java bytecode having an operation code converted in the object operation code conversion step (S390), the first object reference data stored in the second storage means and stored on the top of the stack A comparing step S440 of comparing whether current object reference data is the same; 상기 비교단계(S440)에서 상기 제1객체참조데이터와 스택의 최상위에 저장된 현재의 객체참조데이터가 동일하면, 상기 제3저장수단에 저장된 제2상위필드주소와 패치된 자바 바이트코드의 피연산자필드에 저장된 제2하위필드주소를 연결하여 제4 필드주소를 생성하는 제2필드주소 생성단계(S450); If the first object reference data and the current object reference data stored at the top of the stack are the same in the comparison step (S440), the second higher field address stored in the third storage means and the operand field of the patched Java byte code are stored. Generating a fourth field address by concatenating the stored second subfield addresses (S450); 상기 제4필드주소에 따라 필드에 접근하여 데이터를 처리하는 제2데이터처리단계(S460);A second data processing step (S460) of accessing a field according to the fourth field address to process data; 상기 비교단계(S440)에서 상기 제1객체참조데이터와 스택의 최상위에 저장된 현재의 객체참조데이터가 동일하지 않으면, 상기 스택의 최상위에 저장된 현재의 객체참조데이터로부터 객체필드주소를 검출하고, 검출된 객체필드주소와 상기 제2저장수단에 저장된 필드오프셋을 합하여 제5필드주소를 생성하는 제3필드주소 생성단계(S470); 및If the first object reference data and the current object reference data stored at the top of the stack are not the same in the comparison step (S440), an object field address is detected from the current object reference data stored at the top of the stack and detected. A third field address generation step (S470) of generating a fifth field address by adding an object field address and a field offset stored in the second storage means; And 상기 제5필드주소에 따라 필드에 접근하여 데이터를 처리하는 제3데이터처리단계(S480)를 구비한 것을 특징으로 하는 자바 바이트코드 변환방법.And a third data processing step (S480) for processing data by accessing a field according to the fifth field address. 제 4 항에 있어서, 상기 제1객체참조데이터와 필드오프셋을 상기 제2저장수단의 특정위치에 저장시키고, 상기 제2저장수단의 특정위치에 저장된 제1객체참조데이터와 필드오프셋을 선택하기 위한 제1선택데이터를 상기 피연산자필드에 저장하는 제1선택데이터 저장단계(S370)를 더 구비한 것을 특징으로 하는 자바 바이트코드 변환방법.The method of claim 4, wherein the first object reference data and the field offset are stored at a specific position of the second storage means, and the first object reference data and the field offset stored at the specific position of the second storage means are selected. And a first selection data storing step (S370) of storing first selection data in the operand field. 제 5 항에 있어서, 상기 제2상위필드주소를 상기 제3저장수단의 특정위치에 저장시키고, 상기 제3저장수단의 특정위치에 저장된 제2상위필드주소를 선택하기 위한 제2선택데이터를 상기 피연산자필드에 저장하는 제2선택데이터 저장단계(S380)를 더 구비한 것을 특징으로 하는 자바 바이트코드 변환방법.6. The method of claim 5, wherein the second higher field address is stored at a specific position of the third storage means, and the second selection data for selecting the second higher field address stored at the specific position of the third storage means is stored. And a second selection data storage step (S380) for storing in the operand field. 제 4 항에 있어서, 상기 제3필드주소가 32비트인 경우 상기 제2상위필드주소는 상위 16비트들로 이루어진 데이터이고, 상기 제2하위필드주소는 하위 16비트들로 이루어진 데이터인 것을 특징으로 하는 자바 바이트코드 변환방법.The method of claim 4, wherein when the third field address is 32 bits, the second upper field address is data consisting of upper 16 bits, and the second lower field address is data consisting of lower 16 bits. Java bytecode conversion method. 제 6 항에 있어서, 상기 제3필드주소가 32비트인 경우 상기 제2상위필드주소는 상위 21비트들로 이루어진 데이터이고, 상기 제2하위필드주소는 하위 11비트들로 이루어진 데이터이고, 상기 제1선택데이터는 3비트들로 이루어진 데이터이고, 상기 제2선택데이터는 2비트로 이루어진 데이터인 것을 특징으로 하는 자바 바이트코드 변환방법.7. The method of claim 6, wherein when the third field address is 32 bits, the second upper field address is data consisting of upper 21 bits, and the second lower field address is data consisting of lower 11 bits. The first selection data is data consisting of three bits, and the second selection data is data consisting of two bits. 제 4 항에 있어서, 상기 제2,제3저장수단은 임시저장메모리, 메모리 또는 레지스터들 중 어느 하나인 것을 특징으로 하는 자바 바이트코드 변환방법.The method of claim 4, wherein the second and third storage means are any one of a temporary storage memory, a memory, and registers.
KR1020070104479A 2007-10-17 2007-10-17 Java bytecode translating method KR100936401B1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020070104479A KR100936401B1 (en) 2007-10-17 2007-10-17 Java bytecode translating method
PCT/KR2008/004796 WO2009051335A1 (en) 2007-10-17 2008-08-19 Java bytecode translating method
JP2010529844A JP2011501286A (en) 2007-10-17 2008-08-19 Java byte code conversion method
US12/514,430 US8291391B2 (en) 2007-10-17 2008-08-19 Java bytecode translating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070104479A KR100936401B1 (en) 2007-10-17 2007-10-17 Java bytecode translating method

Publications (2)

Publication Number Publication Date
KR20090039067A KR20090039067A (en) 2009-04-22
KR100936401B1 true KR100936401B1 (en) 2010-01-12

Family

ID=40567556

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070104479A KR100936401B1 (en) 2007-10-17 2007-10-17 Java bytecode translating method

Country Status (4)

Country Link
US (1) US8291391B2 (en)
JP (1) JP2011501286A (en)
KR (1) KR100936401B1 (en)
WO (1) WO2009051335A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8819649B2 (en) * 2011-09-09 2014-08-26 Microsoft Corporation Profile guided just-in-time (JIT) compiler and byte code generation
US8997042B2 (en) * 2012-10-15 2015-03-31 Pivotal Software, Inc. Flexible and run-time-modifiable inclusion of functionality in computer code
CN113835620B (en) * 2021-08-13 2024-05-24 北京握奇智能科技有限公司 Method and system for improving execution efficiency of security chip application

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030192037A1 (en) * 2002-04-03 2003-10-09 International Business Machines Corporation Statically detecting externally referenced interfaces of a program
US20050160415A1 (en) * 2004-01-17 2005-07-21 Samsung Electronics Co., Ltd. Method and system for improving performance of Java virtual machine
US20060070049A1 (en) * 2004-09-24 2006-03-30 Samsung Electronics Co., Ltd. Java bytecode translation method and Java interpreter performing the same

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5875336A (en) * 1997-03-31 1999-02-23 International Business Machines Corporation Method and system for translating a non-native bytecode to a set of codes native to a processor within a computer system
US7263722B1 (en) * 1999-05-12 2007-08-28 Fraunhofer Crcg, Inc. Obfuscation of executable code
KR20020028814A (en) * 2000-10-10 2002-04-17 나조미 커뮤니케이션즈, 인코포레이티드 Java hardware accelerator using microcode engine
JP2002215387A (en) * 2001-01-22 2002-08-02 Mitsubishi Electric Corp Data processor provided with instruction translator, and memory interface device
KR100763177B1 (en) * 2005-04-21 2007-10-04 삼성전자주식회사 Method for executing Java virtual machine instructions, and apparatus for the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030192037A1 (en) * 2002-04-03 2003-10-09 International Business Machines Corporation Statically detecting externally referenced interfaces of a program
US20050160415A1 (en) * 2004-01-17 2005-07-21 Samsung Electronics Co., Ltd. Method and system for improving performance of Java virtual machine
US20060070049A1 (en) * 2004-09-24 2006-03-30 Samsung Electronics Co., Ltd. Java bytecode translation method and Java interpreter performing the same
KR100597413B1 (en) 2004-09-24 2006-07-05 삼성전자주식회사 Method for translating Java bytecode and Java interpreter using the same

Also Published As

Publication number Publication date
KR20090039067A (en) 2009-04-22
JP2011501286A (en) 2011-01-06
US8291391B2 (en) 2012-10-16
US20100064276A1 (en) 2010-03-11
WO2009051335A1 (en) 2009-04-23

Similar Documents

Publication Publication Date Title
US11385872B2 (en) Extending a virtual machine instruction set architecture
EP2324424B1 (en) Apparatus and method for handling page protection faults in a computing system
US6965984B2 (en) Data processing using multiple instruction sets
TWI541661B (en) Method and apparatus to represent a processor context with fewer bits
EP4002097B1 (en) Load module compiler
US9336125B2 (en) Systems and methods for hardware-assisted type checking
US7823140B2 (en) Java bytecode translation method and Java interpreter performing the same
US20050160415A1 (en) Method and system for improving performance of Java virtual machine
US7996833B2 (en) Method and system for replacing instructions and instruction blocks in computer code
US7089539B2 (en) Program instruction interpretation
KR100936401B1 (en) Java bytecode translating method
US7032230B2 (en) Efficient virtual function calls for compiled/interpreted environments
US20060026387A1 (en) Method and system for recognizing instructions and instruction blocks in computer code
JP2004538556A (en) Non-processing operation processing in multiple instruction set systems
US20070156386A1 (en) Linearization of page based memory for increased performance in a software emulated central processing unit
US6934726B2 (en) Storing and retrieving of field descriptors in Java computing environments
US8839274B2 (en) Accelerated class check
KR20040044655A (en) Method of generating bytecodes for loop in java virtual machine and processing the bytecodes
EP1451681B1 (en) System and method for low overhead boundary checking of java arrays
US7606997B1 (en) Method and system for using one or more address bits and an instruction to increase an instruction set
Kim et al. Accelerating Java Interpretation in Low-Cost Embedded Processors
CN115803721A (en) Apparatus and method
WO2002048864A2 (en) System registers for an object-oriented processor

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee