The local variables occupy words of the stack frame , just like the method parameters 同方法变量一样,本地变量占用堆栈结构中的字。
Frame objects represent execution frames . they may occur in traceback objects ( see below ) 堆栈结构对象描述了可执行结构.它们会在跟踪回溯对象中出现(下述)
In terms of bytecode , each parameter occupies one or more words of the stack frame in use when the method is executed 对于字节码,在方法执行的时候,每个参数占用堆栈结构的一个或者两个字。
Parameter for a virtual method is always at position 0 in the stack frame , followed by the parameters explicitly defined in the method declaration 指针通常在堆栈结构中的0位置,接着是方法声明中明确定义的参数。
Parameters occupy different numbers of frame slots depending on the size of the parameter value compared to the standard word size 不同的参数占用不同数量的堆栈结构位置,这取决于参数值类型的大小与标准字大小的比较。
Pascal calling convention is the reverse of c calling convention . it passes parameters from left to right and the callee is responsible for the stack balancing after the call Pascal调用约定时完全相反于c调用约定,它从左到右传递参数并且由被调用者负责在调用后平衡堆栈结构
To minimize the amount of stack frame space required for a method , the same words of the stack frame may be used for different local variables at different points in the bytecode , as long as the active ranges for the variables don t overlap 在字节码中,为了使方法所需要的堆栈空间最小化,不同位置的不同本地变量可能会使用堆栈结构中的同一个字,只要变量的有效范围不重叠。