摘要 |
A batching mechanism is provided that batches multiple Java Native Interface calls together such that the batch crosses the Java Native Interface boundary in a single transition. The batching mechanism operates by identifying a sequence of Java Native Interface calls to be made by native code, by encapsulating the identified sequence of Java Native Interface calls into a batch, and by communicating the batch as a single transition across the Java Native Interface boundary. In this manner, each call of the batch is encapsulated by iteratively performing for each call to be made, processes including identifying the Java Native Interface function to call, identifying the arguments to pass into the Java Native Interface function, dispatching to the Java Native Interface function and capturing the return value. |