The Prior Art Database and Publishing service will be updated on Sunday, February 25th, from 1-3pm ET. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method and Apparatus for Terse Method Signature Encoding of Essential Parameter Attributes for Rapid Signature Interpretation

IP.com Disclosure Number: IPCOM000010134D
Original Publication Date: 2002-Oct-24
Included in the Prior Art Database: 2002-Oct-24
Document File: 2 page(s) / 41K

Publishing Venue


This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 50% of the total text.

Page 1 of 2

  Method and Apparatus for Terse Method Signature Encoding of Essential Parameter Attributes for Rapid Signature Interpretation

   A mechanism is disclosed which allows fast and efficient switching between Java Virtual Machine (JVM) calling conventions and native (non-JVM) calling conventions.

This solution creates a terse method signature that encodes information about a method's parameters. The terse method signature is created for each method when a Java class is first loaded. The encoding for each method parameter type is as follows (note that the numeric values are binary):

00 - boolean, char, byte, short, int, object 01 - long
10 - float
11 - double

Here is the layout (as it would appear in memory) of the terse method signature:

Using this particular ordering of values for parameter types has two distinct advantages:

1) The left bit of the two bit pair, determines if the value is fixed point value or a floating point value.

2) The JVM is a stack-based 32-bit virtual machine. Therefore, Java long and double data types (each 64-bits in size) occupy two adjacent 32-bit slots on the Java stack (or in the Java locals storage area). All other Java data types occupy a single slot. Thus when copying parameters, it can be determined how many slots the argument occupies to ensure that the stack pointer is moved ahead the correct number of bytes for the next argument copy. By inspecting the lower bit (the rightmost bit when reading from left to right) of the encoded parameter type, it can be determined if the parameter occupies one slot (if the bit is zero) or two slots (if the bit is one).

Although parsing the terse method signature is quite efficient, it still requires a fair number of instructions to inspect each encoded parameter and do the appropriate copy.

[This page contains 2 pictures or other non-text objects]

Page 2 of 2

Many Java methods do not have...