是什么mterp意思? [英] What does mterp mean?

查看:144
本文介绍了是什么mterp意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个名为 mterp 中的Dalvik源$ C ​​$ C文件夹中。其路径为 / VM / mterp
我想知道这个词是什么 mterp 是什么意思?

There is a folder named mterp in the dalvik source code. Its path is /vm/mterp.
I want to know what does the word mterp mean?

推荐答案

在M代表模块化 - mterp是模块化跨preTER

The 'm' stands for "modular" -- mterp is the modular interpreter.

这是previous执行情况的演变,这实际上是一个怪物开关语句。 :正如mterp 自述注意

It was an evolution of the previous implementation, which was effectively a monster switch statement. As noted in the mterp README:

这是源$ C ​​$ C为Dalvik的跨preTER。的核心   原始版本被实现为单个C函数,但要   提高性能,我们在组装重写了它。为了使这一点,   未来装配端口更容易,更容易出错,我们采用了模块化   方法,使特定于平台的code一根运code ++开发   在时间

This is the source code for the Dalvik interpreter. The core of the original version was implemented as a single C function, but to improve performance we rewrote it in assembly. To make this and future assembly ports easier and less error-prone, we used a modular approach that allows development of platform-specific code one opcode at a time.

要在OP code粒度交换工具的能力是非常有价值的,因为它使我们C语言和汇编实现之间交换一个快速变化的配置文件 - 很方便,如果你怀疑的东西在装配版本不工作很正确。当我们想增加浮点支持,我们只是写了新的运算code片,创造了一个新的配置文件是取代了浮动相关的指令。

The ability to switch implementations at opcode granularity was extremely valuable, because it allowed us to swap between C and assembly implementations with a quick change to a config file -- very handy if you suspected that something in the assembly version wasn't working quite right. When we wanted to add floating point support, we just wrote new opcode pieces and created a new config file that replaced the float-dependent instructions.

结构也使得移植跨preTER 以全新的平台要容易得多,因为你可以从便携式跨preTER演变为一个快跨preTER在一口大小的块。

The structure also makes porting the interpreter to entirely new platforms much easier, because you can evolve from the "portable" interpreter to a "fast" interpreter in bite-sized pieces.

这篇关于是什么mterp意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆