Mercurial > hg > truffle
diff src/share/vm/ci/ciEnv.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | c38f13903fdf 137868b7aa6f |
children | 2cb439954abf |
line wrap: on
line diff
--- a/src/share/vm/ci/ciEnv.hpp Mon Nov 12 18:11:17 2012 +0100 +++ b/src/share/vm/ci/ciEnv.hpp Mon Nov 12 23:14:12 2012 +0100 @@ -45,7 +45,9 @@ friend class CompileBroker; friend class Dependencies; // for get_object, during logging - +#ifdef GRAAL + friend class CodeInstaller; +#endif private: Arena* _arena; // Alias for _ciEnv_arena except in init_shared_objects() Arena _ciEnv_arena; @@ -78,11 +80,6 @@ // Distinguished instances of certain ciObjects.. static ciObject* _null_object_instance; - static ciMethodKlass* _method_klass_instance; - static ciKlassKlass* _klass_klass_instance; - static ciInstanceKlassKlass* _instance_klass_klass_instance; - static ciTypeArrayKlassKlass* _type_array_klass_klass_instance; - static ciObjArrayKlassKlass* _obj_array_klass_klass_instance; #define WK_KLASS_DECL(name, ignore_s, ignore_o) static ciInstanceKlass* _##name; WK_KLASSES_DO(WK_KLASS_DECL) @@ -159,9 +156,9 @@ // Helper methods bool check_klass_accessibility(ciKlass* accessing_klass, - klassOop resolved_klassOop); - methodOop lookup_method(instanceKlass* accessor, - instanceKlass* holder, + Klass* resolved_klass); + Method* lookup_method(InstanceKlass* accessor, + InstanceKlass* holder, Symbol* name, Symbol* sig, Bytecodes::Code bc); @@ -187,7 +184,44 @@ } } - ciMethod* get_method_from_handle(jobject method); + ciMetadata* get_metadata(Metadata* o) { + if (o == NULL) { + return NULL; + } else { + return _factory->get_metadata(o); + } + } + + ciInstance* get_instance(oop o) { + if (o == NULL) return NULL; + return get_object(o)->as_instance(); + } + ciObjArrayKlass* get_obj_array_klass(Klass* o) { + if (o == NULL) return NULL; + return get_metadata(o)->as_obj_array_klass(); + } + ciTypeArrayKlass* get_type_array_klass(Klass* o) { + if (o == NULL) return NULL; + return get_metadata(o)->as_type_array_klass(); + } + ciKlass* get_klass(Klass* o) { + if (o == NULL) return NULL; + return get_metadata(o)->as_klass(); + } + ciInstanceKlass* get_instance_klass(Klass* o) { + if (o == NULL) return NULL; + return get_metadata(o)->as_instance_klass(); + } + ciMethod* get_method(Method* o) { + if (o == NULL) return NULL; + return get_metadata(o)->as_method(); + } + ciMethodData* get_method_data(MethodData* o) { + if (o == NULL) return NULL; + return get_metadata(o)->as_method_data(); + } + + ciMethod* get_method_from_handle(Method* method); ciInstance* get_or_create_exception(jobject& handle, Symbol* name); @@ -336,7 +370,8 @@ ImplicitExceptionTable* inc_table, AbstractCompiler* compiler, int comp_level, - bool has_unsafe_access); + bool has_unsafe_access, + bool has_wide_vectors); // Access to certain well known ciObjects. @@ -378,10 +413,6 @@ // Note: To find a class from its name string, use ciSymbol::make, // but consider adding to vmSymbols.hpp instead. - // Use this to make a holder for non-perm compile time constants. - // The resulting array is guaranteed to satisfy "can_be_constant". - ciArray* make_system_array(GrowableArray<ciObject*>* objects); - // converts the ciKlass* representing the holder of a method into a // ciInstanceKlass*. This is needed since the holder of a method in // the bytecodes could be an array type. Basically this converts @@ -422,6 +453,9 @@ void record_failure(const char* reason); void record_method_not_compilable(const char* reason, bool all_tiers = true); void record_out_of_memory_failure(); + + // RedefineClasses support + void metadata_do(void f(Metadata*)) { _factory->metadata_do(f); } }; #endif // SHARE_VM_CI_CIENV_HPP