260 u_char* ciMethod::compressed_linenumber_table() const {
261 check_is_loaded();
262 VM_ENTRY_MARK;
263 return get_Method()->compressed_linenumber_table();
264 }
265
266
267 // ------------------------------------------------------------------
268 // ciMethod::line_number_from_bci
269 int ciMethod::line_number_from_bci(int bci) const {
270 check_is_loaded();
271 VM_ENTRY_MARK;
272 return get_Method()->line_number_from_bci(bci);
273 }
274
275
276 // ------------------------------------------------------------------
277 // ciMethod::vtable_index
278 //
279 // Get the position of this method's entry in the vtable, if any.
280 int ciMethod::vtable_index() {
281 check_is_loaded();
282 assert(holder()->is_linked(), "must be linked");
283 VM_ENTRY_MARK;
284 return get_Method()->vtable_index();
285 }
286
287
288 // ------------------------------------------------------------------
289 // ciMethod::native_entry
290 //
291 // Get the address of this method's native code, if any.
292 address ciMethod::native_entry() {
293 check_is_loaded();
294 assert(flags().is_native(), "must be native method");
295 VM_ENTRY_MARK;
296 Method* method = get_Method();
297 address entry = method->native_function();
298 assert(entry != NULL, "must be valid entry point");
299 return entry;
300 }
926 return (MethodHandles::is_signature_polymorphic(iid) &&
927 MethodHandles::is_signature_polymorphic_intrinsic(iid));
928 }
929
930 // ------------------------------------------------------------------
931 // ciMethod::is_compiled_lambda_form
932 //
933 // Return true if the method is a generated MethodHandle adapter.
934 // These are built by Java code.
935 bool ciMethod::is_compiled_lambda_form() const {
936 vmIntrinsics::ID iid = _intrinsic_id; // do not check if loaded
937 return iid == vmIntrinsics::_compiledLambdaForm;
938 }
939
940 // ------------------------------------------------------------------
941 // ciMethod::is_object_initializer
942 //
943 bool ciMethod::is_object_initializer() const {
944 return name() == ciSymbol::object_initializer_name();
945 }
946
947 // ------------------------------------------------------------------
948 // ciMethod::has_member_arg
949 //
950 // Return true if the method is a linker intrinsic like _linkToVirtual.
951 // These are built by the JVM.
952 bool ciMethod::has_member_arg() const {
953 vmIntrinsics::ID iid = _intrinsic_id; // do not check if loaded
954 return (MethodHandles::is_signature_polymorphic(iid) &&
955 MethodHandles::has_member_arg(iid));
956 }
957
958 // ------------------------------------------------------------------
959 // ciMethod::ensure_method_data
960 //
961 // Generate new MethodData* objects at compile time.
962 // Return true if allocation was successful or no MDO is required.
963 bool ciMethod::ensure_method_data(const methodHandle& h_m) {
964 EXCEPTION_CONTEXT;
965 if (is_native() || is_abstract() || h_m()->is_accessor()) {
|
260 u_char* ciMethod::compressed_linenumber_table() const {
261 check_is_loaded();
262 VM_ENTRY_MARK;
263 return get_Method()->compressed_linenumber_table();
264 }
265
266
267 // ------------------------------------------------------------------
268 // ciMethod::line_number_from_bci
269 int ciMethod::line_number_from_bci(int bci) const {
270 check_is_loaded();
271 VM_ENTRY_MARK;
272 return get_Method()->line_number_from_bci(bci);
273 }
274
275
276 // ------------------------------------------------------------------
277 // ciMethod::vtable_index
278 //
279 // Get the position of this method's entry in the vtable, if any.
280 int ciMethod::vtable_index() const {
281 check_is_loaded();
282 assert(holder()->is_linked(), "must be linked");
283 VM_ENTRY_MARK;
284 return get_Method()->vtable_index();
285 }
286
287
288 // ------------------------------------------------------------------
289 // ciMethod::native_entry
290 //
291 // Get the address of this method's native code, if any.
292 address ciMethod::native_entry() {
293 check_is_loaded();
294 assert(flags().is_native(), "must be native method");
295 VM_ENTRY_MARK;
296 Method* method = get_Method();
297 address entry = method->native_function();
298 assert(entry != NULL, "must be valid entry point");
299 return entry;
300 }
926 return (MethodHandles::is_signature_polymorphic(iid) &&
927 MethodHandles::is_signature_polymorphic_intrinsic(iid));
928 }
929
930 // ------------------------------------------------------------------
931 // ciMethod::is_compiled_lambda_form
932 //
933 // Return true if the method is a generated MethodHandle adapter.
934 // These are built by Java code.
935 bool ciMethod::is_compiled_lambda_form() const {
936 vmIntrinsics::ID iid = _intrinsic_id; // do not check if loaded
937 return iid == vmIntrinsics::_compiledLambdaForm;
938 }
939
940 // ------------------------------------------------------------------
941 // ciMethod::is_object_initializer
942 //
943 bool ciMethod::is_object_initializer() const {
944 return name() == ciSymbol::object_initializer_name();
945 }
946
947 bool ciMethod::is_object_equals() const {
948 bool res = name() == ciSymbol::equals_name() && signature()->as_symbol() == ciSymbol::object_boolean_signature();
949 #ifdef ASSERT
950 ciMethod* m = ciEnv::current()->Object_klass()->find_method(ciSymbol::equals_name(), ciSymbol::object_boolean_signature());
951 assert(!holder()->is_linked() || res == (m->vtable_index() == vtable_index()), "Object.equals() or not?");
952 #endif
953 return res;
954 }
955
956
957 // ------------------------------------------------------------------
958 // ciMethod::has_member_arg
959 //
960 // Return true if the method is a linker intrinsic like _linkToVirtual.
961 // These are built by the JVM.
962 bool ciMethod::has_member_arg() const {
963 vmIntrinsics::ID iid = _intrinsic_id; // do not check if loaded
964 return (MethodHandles::is_signature_polymorphic(iid) &&
965 MethodHandles::has_member_arg(iid));
966 }
967
968 // ------------------------------------------------------------------
969 // ciMethod::ensure_method_data
970 //
971 // Generate new MethodData* objects at compile time.
972 // Return true if allocation was successful or no MDO is required.
973 bool ciMethod::ensure_method_data(const methodHandle& h_m) {
974 EXCEPTION_CONTEXT;
975 if (is_native() || is_abstract() || h_m()->is_accessor()) {
|