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

📄 dll_md.c

📁 JamVM是一个新的Java 虚拟机, 符合JVM规范第二版本。它虽然小但支持完整的规范, 包括支持对象的收尾器调用, 对象的次、弱、虚引用, 类卸载, java 本地接口(JNI)与反射API。Ja
💻 C
字号:
/* * Copyright (C) 2008 Robert Lougher <rob@lougher.org.uk>. * * This file is part of JamVM. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2, * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */#include "../../../jam.h"#ifndef USE_FFI#include <stdio.h>int nativeExtraArg(MethodBlock *mb) {    char *sig = mb->type;    int stack_space;    int iargs = 0;    int fargs = 0;    while(*++sig != ')')        switch(*sig) {            case 'D':            case 'F':                fargs++;                break;            default:                iargs++;                if(*sig == '[')                    while(*++sig == '[');                if(*sig == 'L')                    while(*++sig != ';');                break;        }    stack_space = ((iargs > 4 ? iargs - 4 : 0) +                   (fargs > 8 ? fargs - 8 : 0)) << 3;    /* Ensure the stack remains 16 byte aligned.  As       callJNIMethod pushes an even number of registers       the extra space must also be even. */    return (stack_space + 15) & ~15;}#endif

⌨️ 快捷键说明

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