Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalCompiler.cpp @ 6950:41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
fixed issue when intrinsifying Class.getModifiers() for primitive classes
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 14 Nov 2012 11:28:02 +0100 |
parents | e522a00b91aa |
children | 9ba90252ce08 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.cpp Mon Nov 12 23:37:12 2012 +0100 +++ b/src/share/vm/graal/graalCompiler.cpp Wed Nov 14 11:28:02 2012 +0100 @@ -241,12 +241,17 @@ } } -Handle GraalCompiler::get_JavaTypeFromClass(Handle javaClassHandle, TRAPS) { - if (java_lang_Class::is_primitive(javaClassHandle())) { - BasicType basicType = java_lang_Class::primitive_type(javaClassHandle()); +Handle GraalCompiler::get_JavaTypeFromClass(Handle java_class, TRAPS) { + oop graal_mirror = java_lang_Class::graal_mirror(java_class()); + if (graal_mirror != NULL) { + return graal_mirror; + } + + if (java_lang_Class::is_primitive(java_class())) { + BasicType basicType = java_lang_Class::primitive_type(java_class()); return VMToCompiler::createPrimitiveJavaType((int) basicType, THREAD); } else { - KlassHandle klass = java_lang_Class::as_Klass(javaClassHandle()); + KlassHandle klass = java_lang_Class::as_Klass(java_class()); Handle name = java_lang_String::create_from_symbol(klass->name(), CHECK_NULL); return GraalCompiler::createHotSpotResolvedJavaType(klass, name, CHECK_NULL); }