Dalvik VM 如何访问 I/O?
我最近对 Dalvik VM 产生了兴趣。从维基百科和一些幻灯片中我了解了有关 Dalvik VM 的基本信息。还有一些事情我不知道,并且我无法轻松找到文档,例如:
Dalvik VM 如何访问 I/O?
我没有看到任何调用本机方法的操作码。那些以前缀“OP_INVOKE”命名的操作码似乎都调用了 .dex 文件(Dalvik 可执行文件)中的方法。也许我检查了错误的操作码描述版本?)
顺便说一句,Android 上是否有任何用户友好的 Forth 实现?
我尝试过AndroidForth,它不支持dup
!
I have recently become interested in the Dalvik VM. From Wikipedia and some slides I got know basic information about Dalvik VM. There's still things I don't know, and I can't find documents easily, like:
How does Dalvik VM get access to I/O?
I don't see any opcode that calls a native method. Those opcodes which are named with a prefix, "OP_INVOKE", seems they are all invoke a method that in .dex files (Dalvik Executable files). Maybe I checked the wrong version of opcodes describe?)
BTW, is there any user friendly Forth implementation on Android?
I have tried AndroidForth which does not support dup
!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您提到的标准“调用”操作码可用于调用本机方法 - 它不在乎。
从这个意义上说,本地方法是java类中用“native”说明符标记的方法,并在本地库中实现,遵循java的标准JNI模型。
以下是有关 dalvik/Android 中 JNI 的更多详细信息: http://developer.android .com/guide/practices/design/jni.html
The standard "invoke" opcodes you mention can be used to invoke a native method - it doesn't care.
In this sense, a native method is a method in a java class that has been marked with the "native" specifier, and is implemented in a native library, following the standard JNI model for java.
Here are some more details on JNI in dalvik/Android: http://developer.android.com/guide/practices/design/jni.html