Mercurial > hg > truffle
diff src/share/vm/ci/ciEnv.hpp @ 1339:09ac706c2623
Merge
author | asaha |
---|---|
date | Wed, 24 Mar 2010 17:16:33 -0700 |
parents | 6deeaebad47a |
children | b4776199210f |
line wrap: on
line diff
--- a/src/share/vm/ci/ciEnv.hpp Mon Mar 15 15:51:36 2010 -0400 +++ b/src/share/vm/ci/ciEnv.hpp Wed Mar 24 17:16:33 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -57,7 +57,7 @@ bool _jvmti_can_hotswap_or_post_breakpoint; bool _jvmti_can_examine_or_deopt_anywhere; bool _jvmti_can_access_local_variables; - bool _jvmti_can_post_exceptions; + bool _jvmti_can_post_on_exceptions; // Cache DTrace flags bool _dtrace_extended_probes; @@ -74,14 +74,9 @@ static ciTypeArrayKlassKlass* _type_array_klass_klass_instance; static ciObjArrayKlassKlass* _obj_array_klass_klass_instance; - static ciInstanceKlass* _ArrayStoreException; - static ciInstanceKlass* _Class; - static ciInstanceKlass* _ClassCastException; - static ciInstanceKlass* _Object; - static ciInstanceKlass* _Throwable; - static ciInstanceKlass* _Thread; - static ciInstanceKlass* _OutOfMemoryError; - static ciInstanceKlass* _String; +#define WK_KLASS_DECL(name, ignore_s, ignore_o) static ciInstanceKlass* _##name; + WK_KLASSES_DO(WK_KLASS_DECL) +#undef WK_KLASS_DECL static ciSymbol* _unloaded_cisymbol; static ciInstanceKlass* _unloaded_ciinstance_klass; @@ -97,6 +92,9 @@ ciInstance* _ArrayStoreException_instance; ciInstance* _ClassCastException_instance; + ciInstance* _the_null_string; // The Java string "null" + ciInstance* _the_min_jint_string; // The Java string "-2147483648" + // Look up a klass by name from a particular class loader (the accessor's). // If require_local, result must be defined in that class loader, or NULL. // If !require_local, a result from remote class loader may be reported, @@ -114,37 +112,45 @@ bool require_local); // Constant pool access. - ciKlass* get_klass_by_index(ciInstanceKlass* loading_klass, + ciKlass* get_klass_by_index(constantPoolHandle cpool, int klass_index, - bool& is_accessible); - ciConstant get_constant_by_index(ciInstanceKlass* loading_klass, - int constant_index); + bool& is_accessible, + ciInstanceKlass* loading_klass); + ciConstant get_constant_by_index(constantPoolHandle cpool, + int constant_index, + ciInstanceKlass* accessor); bool is_unresolved_string(ciInstanceKlass* loading_klass, int constant_index) const; bool is_unresolved_klass(ciInstanceKlass* loading_klass, int constant_index) const; ciField* get_field_by_index(ciInstanceKlass* loading_klass, int field_index); - ciMethod* get_method_by_index(ciInstanceKlass* loading_klass, - int method_index, Bytecodes::Code bc); + ciMethod* get_method_by_index(constantPoolHandle cpool, + int method_index, Bytecodes::Code bc, + ciInstanceKlass* loading_klass); // Implementation methods for loading and constant pool access. ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass, ciSymbol* klass_name, bool require_local); - ciKlass* get_klass_by_index_impl(ciInstanceKlass* loading_klass, + ciKlass* get_klass_by_index_impl(constantPoolHandle cpool, int klass_index, - bool& is_accessible); - ciConstant get_constant_by_index_impl(ciInstanceKlass* loading_klass, - int constant_index); + bool& is_accessible, + ciInstanceKlass* loading_klass); + ciConstant get_constant_by_index_impl(constantPoolHandle cpool, + int constant_index, + ciInstanceKlass* loading_klass); bool is_unresolved_string_impl (instanceKlass* loading_klass, int constant_index) const; bool is_unresolved_klass_impl (instanceKlass* loading_klass, int constant_index) const; ciField* get_field_by_index_impl(ciInstanceKlass* loading_klass, int field_index); - ciMethod* get_method_by_index_impl(ciInstanceKlass* loading_klass, - int method_index, Bytecodes::Code bc); + ciMethod* get_method_by_index_impl(constantPoolHandle cpool, + int method_index, Bytecodes::Code bc, + ciInstanceKlass* loading_klass); + ciMethod* get_fake_invokedynamic_method_impl(constantPoolHandle cpool, + int index, Bytecodes::Code bc); // Helper methods bool check_klass_accessibility(ciKlass* accessing_klass, @@ -253,7 +259,7 @@ bool jvmti_can_hotswap_or_post_breakpoint() const { return _jvmti_can_hotswap_or_post_breakpoint; } bool jvmti_can_examine_or_deopt_anywhere() const { return _jvmti_can_examine_or_deopt_anywhere; } bool jvmti_can_access_local_variables() const { return _jvmti_can_access_local_variables; } - bool jvmti_can_post_exceptions() const { return _jvmti_can_post_exceptions; } + bool jvmti_can_post_on_exceptions() const { return _jvmti_can_post_on_exceptions; } // Cache DTrace flags void cache_dtrace_flags(); @@ -286,30 +292,13 @@ // Access to certain well known ciObjects. - ciInstanceKlass* ArrayStoreException_klass() { - return _ArrayStoreException; - } - ciInstanceKlass* Class_klass() { - return _Class; - } - ciInstanceKlass* ClassCastException_klass() { - return _ClassCastException; - } - ciInstanceKlass* Object_klass() { - return _Object; +#define WK_KLASS_FUNC(name, ignore_s, ignore_o) \ + ciInstanceKlass* name() { \ + return _##name;\ } - ciInstanceKlass* Throwable_klass() { - return _Throwable; - } - ciInstanceKlass* Thread_klass() { - return _Thread; - } - ciInstanceKlass* OutOfMemoryError_klass() { - return _OutOfMemoryError; - } - ciInstanceKlass* String_klass() { - return _String; - } + WK_KLASSES_DO(WK_KLASS_FUNC) +#undef WK_KLASS_FUNC + ciInstance* NullPointerException_instance() { assert(_NullPointerException_instance != NULL, "initialization problem"); return _NullPointerException_instance; @@ -324,6 +313,9 @@ ciInstance* ArrayStoreException_instance(); ciInstance* ClassCastException_instance(); + ciInstance* the_null_string(); + ciInstance* the_min_jint_string(); + static ciSymbol* unloaded_cisymbol() { return _unloaded_cisymbol; }