Jni magic implemented on a hybrid stack