/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "memory/oopFactory.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "utilities/xmlstream.hpp"
if (a == b) return 0;
// follow the natural address order:
}
extern "C" {
return compare_symbol(a, b);
}
}
#ifndef PRODUCT
static const char* vm_symbol_enum_names =
"\0";
}
return string;
}
#endif //PRODUCT
// Put all the VM symbol strings in one place.
// Makes for a more compact libjvm.
assert(vmIntrinsics::FLAG_LIMIT <= (1 << vmIntrinsics::log2_FLAG_LIMIT), "must fit in this bitfield");
if (!UseSharedSpaces) {
}
// no single signatures for T_OBJECT or T_ARRAY
}
#ifdef ASSERT
// Check for duplicates:
}
}
}
#endif //ASSERT
// Create an index for find_id:
{
}
}
#ifdef ASSERT
{
// Spot-check correspondence between strings, symbols, and enums:
// Make sure find_sid produces the right answer in each case.
// Note: If there are duplicates, this assert will fail.
// A "Duplicate VM symbol" message will have already been printed.
}
// The string "format" happens (at the moment) not to be a vmSymbol,
// though it is a method name in java.lang.String.
str = "format";
}
#endif
}
#ifndef PRODUCT
return "NO_SID";
return string;
}
return "BAD_SID";
}
#endif
}
for (int i = 0; i < T_VOID+1; i++) {
f->do_symbol(&_type_signatures[i]);
}
}
}
if (s == _type_signatures[i]) {
return (BasicType)i;
}
}
return T_OBJECT;
}
#ifndef PRODUCT
// (Typical counts are calls=7000 and probes=17000.)
#endif
// Handle the majority of misses by a bounds check.
// Then, use a binary search over the index.
// Expected trip count is less than log2_SID_LIMIT, about eight.
// This is slow but acceptable, given that calls are not
// dynamically common. (methodOop::intrinsic_id has a cache.)
int cmp1;
if (cmp1 <= 0) { // before the first
} else {
if (cmp1 >= 0) { // after the last
} else {
// After checking the extremes, do a binary search.
if (cmp1 == 0) {
break;
}
if (cmp1 < 0)
else
// Pick a new probe point:
}
}
}
#ifdef ASSERT
// Perform the exhaustive self-check the first 1000 calls,
// and every 100 calls thereafter.
if (find_sid_check_count > 0) find_sid_check_count = 0;
// Make sure this is the right answer, using linear search.
// (We have already proven that there are no duplicates in the list.)
break;
}
}
// Unless it's a duplicate, assert that the sids are the same.
}
}
#endif //ASSERT
return sid;
}
}
}
return vmIntrinsics::_none;
}
return wrapper_intrinsic(type, false);
}
return wrapper_intrinsic(type, true);
}
}
return vmIntrinsics::_none;
}
static const char* vm_intrinsic_name_bodies =
}
}
else
return "(unknown intrinsic)";
}
// These are flag-matching functions:
const int req = 0;
}
}
}
}
}
}
// These are for forming case labels:
// Let the C compiler build the decision tree.
return id;
}
return vmIntrinsics::_none;
}
#ifndef PRODUCT
}
#endif //PRODUCT
return str;
}
// These are to get information about intrinsics.
0
};
}
int shift = 2*vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT);
}
int shift = vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT);
}
}
}
#ifndef PRODUCT
// verify_method performs an extra check on a matched intrinsic method
return (m->name() == n &&
m->signature() == s);
}
if (mk == k) { \
if (match_method(m, n, s)) \
return vmIntrinsics::id; \
} }
return vmIntrinsics::_none;
}
// Here are a few special cases in StrictMath not declared in vmSymbols.hpp.
switch (actual_id) {
case _min:
case _max:
case _dsqrt:
break;
}
}
m = NULL;
}
}
}
#endif //PRODUCT