本文整理汇总了C++中methodOop::name方法的典型用法代码示例。如果您正苦于以下问题:C++ methodOop::name方法的具体用法?C++ methodOop::name怎么用?C++ methodOop::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类methodOop
的用法示例。
在下文中一共展示了methodOop::name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: adjust_method_entry
// RedefineClasses() API support:
// If this constantPoolCacheEntry refers to old_method then update it
// to refer to new_method.
bool ConstantPoolCacheEntry::adjust_method_entry(methodOop old_method,
methodOop new_method, bool * trace_name_printed) {
if (is_vfinal()) {
// virtual and final so _f2 contains method ptr instead of vtable index
if (f2_as_vfinal_method() == old_method) {
// match old_method so need an update
// NOTE: can't use set_f2_as_vfinal_method as it asserts on different values
_f2 = (intptr_t)new_method;
if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) {
if (!(*trace_name_printed)) {
// RC_TRACE_MESG macro has an embedded ResourceMark
RC_TRACE_MESG(("adjust: name=%s",
Klass::cast(old_method->method_holder())->external_name()));
*trace_name_printed = true;
}
// RC_TRACE macro has an embedded ResourceMark
RC_TRACE(0x00400000, ("cpc vf-entry update: %s(%s)",
new_method->name()->as_C_string(),
new_method->signature()->as_C_string()));
}
return true;
}
// f1() is not used with virtual entries so bail out
return false;
}
if ((oop)_f1 == NULL) {
// NULL f1() means this is a virtual entry so bail out
// We are assuming that the vtable index does not need change.
return false;
}
if ((oop)_f1 == old_method) {
_f1 = new_method;
if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) {
if (!(*trace_name_printed)) {
// RC_TRACE_MESG macro has an embedded ResourceMark
RC_TRACE_MESG(("adjust: name=%s",
Klass::cast(old_method->method_holder())->external_name()));
*trace_name_printed = true;
}
// RC_TRACE macro has an embedded ResourceMark
RC_TRACE(0x00400000, ("cpc entry update: %s(%s)",
new_method->name()->as_C_string(),
new_method->signature()->as_C_string()));
}
return true;
}
return false;
}
示例2: methods_EMCP
bool MethodComparator::methods_EMCP(methodOop old_method, methodOop new_method) {
if (old_method->code_size() != new_method->code_size())
return false;
if (check_stack_and_locals_size(old_method, new_method) != 0) {
// RC_TRACE macro has an embedded ResourceMark
RC_TRACE(0x00800000, ("Methods %s non-comparable with diagnosis %d",
old_method->name()->as_C_string(),
check_stack_and_locals_size(old_method, new_method)));
return false;
}
_old_cp = old_method->constants();
_new_cp = new_method->constants();
BytecodeStream s_old(old_method);
BytecodeStream s_new(new_method);
_s_old = &s_old;
_s_new = &s_new;
_switchable_test = false;
Bytecodes::Code c_old, c_new;
while ((c_old = s_old.next()) >= 0) {
if ((c_new = s_new.next()) < 0 || c_old != c_new)
return false;
if (! args_same(c_old, c_new))
return false;
}
return true;
}
示例3: match_method
static bool match_method(methodOop m, Symbol* n, Symbol* s) {
return (m->name() == n &&
m->signature() == s);
}