jniFastGetField.cpp revision 0:a61af66fc99e
1132718Skan/* 2132718Skan * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. 3169689Skan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4132718Skan * 5132718Skan * This code is free software; you can redistribute it and/or modify it 6132718Skan * under the terms of the GNU General Public License version 2 only, as 7132718Skan * published by the Free Software Foundation. 8132718Skan * 9132718Skan * This code is distributed in the hope that it will be useful, but WITHOUT 10132718Skan * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11132718Skan * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12132718Skan * version 2 for more details (a copy is included in the LICENSE file that 13132718Skan * accompanied this code). 14132718Skan * 15132718Skan * You should have received a copy of the GNU General Public License version 16132718Skan * 2 along with this work; if not, write to the Free Software Foundation, 17132718Skan * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18132718Skan * 19132718Skan * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 20169689Skan * CA 95054 USA or visit www.sun.com if you need additional information or 21169689Skan * have any questions. 22132718Skan * 23132718Skan */ 24132718Skan 25132718Skan# include "incls/_precompiled.incl" 26132718Skan# include "incls/_jniFastGetField.cpp.incl" 27132718Skan 28169689Skanaddress JNI_FastGetField::speculative_load_pclist [LIST_CAPACITY]; 29132718Skanaddress JNI_FastGetField::slowcase_entry_pclist [LIST_CAPACITY]; 30132718Skanint JNI_FastGetField::count = 0; 31132718Skan 32132718Skanaddress JNI_FastGetField::find_slowcase_pc(address pc) { 33132718Skan for (int i=0; i<count; i++) { 34132718Skan if (speculative_load_pclist[i] == pc) { 35169689Skan return slowcase_entry_pclist[i]; 36169689Skan } 37132718Skan } 38132718Skan return (address)-1; 39132718Skan} 40132718Skan