守株待兔的图片:翻译高手进来,帮帮小弟!谢谢了

来源:百度文库 编辑:中科新闻网 时间:2024/04/29 22:10:10
由于指令系统的简单性,使得虚拟机执行的过程十分简单,从而有利于提高执行的效率。指令中操作数的数量和大小是由操作符决定的。如果操作数比一个字节大,那么它存储的顺序是高位字节优先。
每个Java方法使用一个固定大小的局部变量集。它们按照与vars寄存器的字偏移量来寻址。局部变量都是32位的。长整数和双精度浮点数占据了两个局部变量的空间,却按照第一个局部变量的索引来寻址。(例如,一个具有索引n的局部变量,如果是一个双精度浮点数,那么它实际占据了索引n和n+1所代表的存储空间。)虚拟机规范并不要求在局部变量中的64位的值是64位对齐的。虚拟机提供了把局部变量中的值装载到操作数栈的指令,也提供了把操作数栈中的值写入局部变量的指令。
运行环境包括对指向当前类和当前方法的解释器符号表的指针,用于支持方法代码的动态链接。方法的class文件代码在引用要调用的方法和要访问的变量时使用符号。动态链接把符号形式的方法调用翻译成实际方法调用,装载必要的类以解释还没有定义的符号,并把变量访问翻译成与这些变量运行时的存储结构相应的偏移地址。动态链接方法和变量使得方法中使用的其它类的变化不会影响到本程序的代码。
如果当前方法正常地结束了,在执行了一条具有正确类型的返回指令时,调用的方法会得到一个返回值。执行环境在正常返回的情况下用于恢复调用者的寄存器,并把调用者的程序计数器增加一个恰当的数值,以跳过已执行过的方法调用指令,然后在调用者的执行环境中继续执行下去。
与异常相匹配的catch子句应该符合下面的条件:造成异常的指令在其指令范围之内,发生的异常类型是其能处理的异常类型的子类型。如果找到了匹配的catch子句,那么系统转移到指定的异常处理块处执行;如果没有找到异常处理块,重复寻找匹配的catch子句的过程,直到当前方法的所有嵌套的catch子句都被检查过
每个原始数据类型都有专门的指令对它们进行必须的操作。每个操作数在栈中需要一个存储位置,除了long和double型,它们需要两个位置。操作数只能被适用于其类型的操作符所操作。例如,压入两个int类型的数,如果把它们当作是一个long类型的数则是非法的。在Sun的虚拟机实现中,这个限制由字节码验证器强制实行。但是,有少数操作(操作符dupe和swap),用于对运行时数据区进行操作时是不考虑类型的。

As a simple system of commands, making the process very simple virtual machine implementation, thus help to improve the implementation efficiency. Instruction in the number and size of the operation a few operating at the decision. If more than a few megabytes big operation, it is high byte storage order of priority. Each Java method uses a fixed size local variables sets. Vars register with them in accordance with the words changed to the volume Xinzhi. Local variables are 32. Long integer and double-precision Fudianshuo occupy the space of two local variables, but the first local variables according to the index Xinzhi. (For example, an index of n local variables, if it is a double-precision Fudianshuo, it actually occupied index n and n+1 represent storage space. ) virtual machine standard does not require the 64 spaces in local variables is the value of the 64 spaces out. Virtual machine provided to the value of local variables to operate a few stores carrying the instructions provided to operate several stores in the value of local variables instructions. Pointing to the current operating environment, including the interpretation of and the current methods by symbols table guide, methods used to support the dynamic link code. Methods used to transfer class document code in the methods and the use of symbols to be visited variables. Dynamic links to the symbols forms translated into practical ways to use available methods, loading necessary to explain the type has not been defined symbols, and the variables with these visits translated into operational variables, memory structure corresponding low addresses. Dynamic links methods and the use of other methods of variables make such changes would not affect the procedure code. If normal end of the current methods in the implementation of a directive, with the right type of return, the method will be required to return a value. Implementation of environmental circumstances in the normal return for the resumption of the execution resources, and to increase the use of the procedures laid an appropriate value to the over-riding approach has been applied transfer instructions, and then use the implementation environment continuation. Match with the catch phrase should be very compatible with the following conditions : create unusual instructions in the scope of its instructions, the unusual occurrence of its type to handle unusual types son type. If found matching the catch phrase, then transferred to the system to deal with unusual pieces designated Office; If not unusual to find pieces address, the catch phrase repeated find matching process until all the current methods of the nests were checked catch phrase Each type of raw data have specialized instructions for them to the operation. Each operation in a few stores in need of a storage location, in addition to long and double type, and they need two locations. Several types of operation can only be applicable to their operation at the operation. For example, two 103-116 pressurised into several types, as if they were a few long type is illegal. Sun achieved in the virtual machine, the limitation imposed by the byte code verification devices. However, a small number of operations (operating sites dupe and transaction) for the areas of operation, the data is not considered the type of operation.

你的问题问的好猛
在下佩服 也希望你能找到答案