Mercurial > hg > truffle
diff src/share/vm/classfile/javaClasses.cpp @ 3461:81d815b05abb
7056328: JSR 292 invocation sometimes fails in adapters for types not on boot class path
Reviewed-by: never
author | jrose |
---|---|
date | Thu, 23 Jun 2011 17:14:06 -0700 |
parents | 167b70ff3abc |
children | b16582d6c7db |
line wrap: on
line diff
--- a/src/share/vm/classfile/javaClasses.cpp Thu Jun 23 22:43:28 2011 -0700 +++ b/src/share/vm/classfile/javaClasses.cpp Thu Jun 23 17:14:06 2011 -0700 @@ -2574,6 +2574,18 @@ return name; } +bool java_lang_invoke_MethodType::equals(oop mt1, oop mt2) { + if (rtype(mt1) != rtype(mt2)) + return false; + if (ptype_count(mt1) != ptype_count(mt2)) + return false; + for (int i = ptype_count(mt1) - 1; i >= 0; i--) { + if (ptype(mt1, i) != ptype(mt2, i)) + return false; + } + return true; +} + oop java_lang_invoke_MethodType::rtype(oop mt) { assert(is_instance(mt), "must be a MethodType"); return mt->obj_field(_rtype_offset);