553N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A // This workaround is because JVMTI doesn't have distinct entry points 131N/A // for methods that use static jfieldIDs and instance jfieldIDs. 0N/A // The workaround is to steal a low-order bit: 0N/A // a 1 means the jfieldID is an instance jfieldID, 0N/A // and the rest of the word is the offset of the field. 0N/A // a 0 means the jfieldID is a static jfieldID, 0N/A // and the rest of the word is the JNIid*. 0N/A // Another low-order bit is used to mark if an instance field 0N/A // is accompanied by an indication of which class it applies to. 0N/A // Bit-format of a jfieldID (most significant first): 0N/A // address:30 instance=0:1 checked=0:1 0N/A // offset:30 instance=1:1 checked=0:1 0N/A // klass:23 offset:7 instance=1:1 checked=1:1 0N/A // If the offset does not fit in 7 bits, or if the fieldID is 0N/A // not checked, then the checked bit is zero and the rest of 0N/A // the word (30 bits) contains only the offset. 0N/A // These values are too big for Win64 0N/A // always verify in debug mode; switchable in anything else 0N/A // always verify in debug mode; switchable in anything else 0N/A "to_JNIid, but not static jfieldID");
0N/A#
endif // SHARE_VM_RUNTIME_JFIELDIDWORKAROUND_HPP