摘要 |
A method number deciding unit 143 sets method numbers for methods in each class into the base method number table so that each method number within one class is different. A method table generating unit 144 generates a method table for each method, the method table including a pointer that is an offset form a first position of an executable program to an area where information relating to the method is stored, and additionally writes the generated method table at the first position of the class file. A method call instruction converting unit 145 replaces, when an instruction "invokevirtual" exists in a class file, a constant pool entry number written in an operand of the instruction with a method number, and deletes a constant pool entry indicated by the constant pool entry number. On receiving the instruction "invokevirtual", the method call unit 174 calculates an address by summing a first address of an executable program and a content of an operand of the instruction, and calls a method stored at the position indicated by the calculated address.
|