⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frame.h

📁 This is a java virtual machine implement in c
💻 H
字号:
/*0001*//*
/*0002./ * Copyright (c) 1998-2001 Sun Microsystems, Inc. All Rights Reserved.
/*0003./ *
/*0004./ * This software is the confidential and proprietary information of Sun
/*0005./ * Microsystems, Inc. ("Confidential Information").  You shall not
/*0006./ * disclose such Confidential Information and shall use it only in
/*0007./ * accordance with the terms of the license agreement you entered into
/*0008./ * with Sun.
/*0009./ *
/*0010./ * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
/*0011./ * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
/*0012./ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
/*0013./ * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
/*0014./ * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
/*0015./ * THIS SOFTWARE OR ITS DERIVATIVES.
/*0016./ *
/*0017./ */
/*0018*/
/*0019*//*=========================================================================
/*0020./ * SYSTEM:    KVM
/*0021./ * SUBSYSTEM: Interpreter stack frames
/*0022./ * FILE:      frame.h
/*0023./ * OVERVIEW:  Definitions for execution frame & exception handling
/*0024./ *            manipulation.
/*0025./ * AUTHOR:    Antero Taivalsaari, Sun Labs
/*0026./ *            Edited by Doug Simon 11/1998 (exception handling)
/*0027./ *            Sheng Liang (chunky stacks), Frank Yellin
/*0028./ *=======================================================================*/
/*0029*/
/*0030*//*=========================================================================
/*0031./ * COMMENTS:
/*0032./ * This file defines the VM-specific internal runtime structures for
/*0033./ * manipulating stack frames and performing the necessary exception
/*0034./ * handling operations.
/*0035./ *=======================================================================*/
/*0036*/
/*0037*//*=========================================================================
/*0038./ * Include files
/*0039./ *=======================================================================*/
/*0040*/
/*0041*//*=========================================================================
/*0042./ * Global variables and definitions
/*0043./ *=======================================================================*/
/*0044*/
/*0045*//*
/*0046./ * Number of cells reserved for native methods. Native method must push
/*0047./ * a new frame when they use more than 3 stack slots.
/*0048./ */
/*0049*/#define RESERVEDFORNATIVE 3
/*0050*/
/*0051*//* frame pointer => pointer to locals */
/*0052*/#define FRAMELOCALS(fp) ((cell*)(fp) - fp->thisMethod->frameSize)
/*0053*/
/*0054*//* Maximum number of stack and locals that a method can have. 
/*0055./ * This limit is enforced by the loader 
/*0056./ */
/*0057*/#define MAXIMUM_STACK_AND_LOCALS 512
/*0058*/
/*0059*//*=========================================================================
/*0060./ * Chunky stack operations
/*0061./ *=======================================================================*/
/*0062*/
/*0063*//*
/*0064./ * KVM execution stacks can grow and shrink dynamically as 
/*0065./ * necessary.  This allows us to create a large number of
/*0066./ * Java threads even with very limited heap space. 
/*0067./ *
/*0068./ * The data structure for chunky stacks is defined below.
/*0069./ * The physical Java execution stack consists of a linked
/*0070./ * list of these structures.  This way, we don't have to 
/*0071./ * allocate a huge contiguous memory area for each execution
/*0072./ * stack.  Initially, each thread has just one stack chunk.
/*0073./ * More chunks are created as necessary.
/*0074./ */
/*0075*//*  STACK */
/*0076*/struct stackStruct {
/*0077*/    STACK    next; //\\STACK

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -