本文整理汇总了C++中typeArrayOop类的典型用法代码示例。如果您正苦于以下问题:C++ typeArrayOop类的具体用法?C++ typeArrayOop怎么用?C++ typeArrayOop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了typeArrayOop类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: return
bool G1StringDedupTable::equals(typeArrayOop value1, typeArrayOop value2) {
return (value1 == value2 ||
(value1->length() == value2->length() &&
(!memcmp(value1->base(T_BYTE),
value2->base(T_BYTE),
value1->length() * sizeof(jbyte)))));
}
开发者ID:campolake,项目名称:openjdk9,代码行数:7,代码来源:g1StringDedupTable.cpp
示例2:
unsigned int G1StringDedupTable::hash_code(typeArrayOop value) {
unsigned int hash;
int length = value->length();
const jchar* data = (jchar*)value->base(T_CHAR);
if (use_java_hash()) {
hash = java_lang_String::hash_code(data, length);
} else {
hash = AltHashing::murmur3_32(_table->_hash_seed, data, length);
}
return hash;
}
开发者ID:MyProgrammingStyle,项目名称:hotspot,代码行数:13,代码来源:g1StringDedupTable.cpp
示例3: insert_hole_at
// Create a new array, copying the src array but adding a hole at
// the specified location
static typeArrayOop insert_hole_at(
size_t where, int hole_sz, typeArrayOop src) {
Thread* THREAD = Thread::current();
Handle src_hnd(THREAD, src);
typeArrayOop dst =
oopFactory::new_permanent_byteArray(src->length() + hole_sz, CHECK_NULL);
src = (typeArrayOop)src_hnd();
address src_addr = (address)src->byte_at_addr(0);
address dst_addr = (address)dst->byte_at_addr(0);
memcpy(dst_addr, src_addr, where);
memcpy(dst_addr + where + hole_sz,
src_addr + where, src->length() - where);
return dst;
}
开发者ID:AllenWeb,项目名称:jdk7u-hotspot,代码行数:18,代码来源:relocator.cpp
示例4: sizeof
unsigned int G1StringDedupTable::hash_code(typeArrayOop value, bool latin1) {
unsigned int hash;
int length = value->length();
if (latin1) {
const jbyte* data = (jbyte*)value->base(T_BYTE);
if (use_java_hash()) {
hash = java_lang_String::hash_code(data, length);
} else {
hash = AltHashing::murmur3_32(_table->_hash_seed, data, length);
}
} else {
length /= sizeof(jchar) / sizeof(jbyte); // Convert number of bytes to number of chars
const jchar* data = (jchar*)value->base(T_CHAR);
if (use_java_hash()) {
hash = java_lang_String::hash_code(data, length);
} else {
hash = AltHashing::murmur3_32(_table->_hash_seed, data, length);
}
}
return hash;
}
开发者ID:campolake,项目名称:openjdk9,代码行数:22,代码来源:g1StringDedupTable.cpp
示例5: print_long_array
static void print_long_array(typeArrayOop ta, int print_len, outputStream* st) {
for (int index = 0; index < print_len; index++) {
jlong v = ta->long_at(index);
st->print_cr(" - %3d: 0x%x 0x%x", index, high(v), low(v));
}
}
开发者ID:GudzonskiyYastreb,项目名称:openjdk-fontfix,代码行数:6,代码来源:typeArrayKlass.cpp
示例6: print_int_array
static void print_int_array(typeArrayOop ta, int print_len, outputStream* st) {
for (int index = 0; index < print_len; index++) {
jint v = ta->int_at(index);
st->print_cr(" - %3d: 0x%x %d", index, v, v);
}
}
开发者ID:GudzonskiyYastreb,项目名称:openjdk-fontfix,代码行数:6,代码来源:typeArrayKlass.cpp
示例7: print_byte_array
static void print_byte_array(typeArrayOop ta, int print_len, outputStream* st) {
for (int index = 0; index < print_len; index++) {
jbyte c = ta->byte_at(index);
st->print_cr(" - %3d: %x %c", index, c, isprint(c) ? c : ' ');
}
}
开发者ID:GudzonskiyYastreb,项目名称:openjdk-fontfix,代码行数:6,代码来源:typeArrayKlass.cpp
示例8: print_double_array
static void print_double_array(typeArrayOop ta, int print_len, outputStream* st) {
for (int index = 0; index < print_len; index++) {
st->print_cr(" - %3d: %g", index, ta->double_at(index));
}
}
开发者ID:GudzonskiyYastreb,项目名称:openjdk-fontfix,代码行数:5,代码来源:typeArrayKlass.cpp
示例9: print_boolean_array
static void print_boolean_array(typeArrayOop ta, int print_len, outputStream* st) {
for (int index = 0; index < print_len; index++) {
st->print_cr(" - %3d: %s", index, (ta->bool_at(index) == 0) ? "false" : "true");
}
}
开发者ID:GudzonskiyYastreb,项目名称:openjdk-fontfix,代码行数:5,代码来源:typeArrayKlass.cpp
注:本文中的typeArrayOop类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论