comparison src/share/vm/oops/method.hpp @ 23648:cc78c97abff8 jdk8u75-b12

8146518: Zero interpreter broken with better byte behaviour Reviewed-by: coleenp
author kevinw
date Wed, 02 Mar 2016 19:16:30 +0000
parents bf41eee321e5
children b5f3a471e646 cb4af293fe70
comparison
equal deleted inserted replaced
23643:352f1b2573b0 23648:cc78c97abff8
1 /* 1 /*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
103 MethodData* _method_data; 103 MethodData* _method_data;
104 MethodCounters* _method_counters; 104 MethodCounters* _method_counters;
105 AccessFlags _access_flags; // Access flags 105 AccessFlags _access_flags; // Access flags
106 int _vtable_index; // vtable index of this method (see VtableIndexFlag) 106 int _vtable_index; // vtable index of this method (see VtableIndexFlag)
107 // note: can have vtables with >2**16 elements (because of inheritance) 107 // note: can have vtables with >2**16 elements (because of inheritance)
108 #ifdef CC_INTERP
109 int _result_index; // C++ interpreter needs for converting results to/from stack
110 #endif
111 u2 _method_size; // size of this object 108 u2 _method_size; // size of this object
112 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) 109 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
113 u1 _jfr_towrite : 1, // Flags 110 u1 _jfr_towrite : 1, // Flags
114 _caller_sensitive : 1, 111 _caller_sensitive : 1,
115 _force_inline : 1, 112 _force_inline : 1,
199 return constMethod()->default_annotations(); 196 return constMethod()->default_annotations();
200 } 197 }
201 AnnotationArray* type_annotations() const { 198 AnnotationArray* type_annotations() const {
202 return constMethod()->type_annotations(); 199 return constMethod()->type_annotations();
203 } 200 }
204
205 #ifdef CC_INTERP
206 void set_result_index(BasicType type);
207 int result_index() { return _result_index; }
208 #endif
209 201
210 // Helper routine: get klass name + "." + method name + signature as 202 // Helper routine: get klass name + "." + method name + signature as
211 // C string, for the purpose of providing more useful NoSuchMethodErrors 203 // C string, for the purpose of providing more useful NoSuchMethodErrors
212 // and fatal error handling. The string is allocated in resource 204 // and fatal error handling. The string is allocated in resource
213 // area if a buffer is not provided by the caller. 205 // area if a buffer is not provided by the caller.
557 InstanceKlass* method_holder() const { return constants()->pool_holder(); } 549 InstanceKlass* method_holder() const { return constants()->pool_holder(); }
558 550
559 void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments) 551 void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments)
560 Symbol* klass_name() const; // returns the name of the method holder 552 Symbol* klass_name() const; // returns the name of the method holder
561 BasicType result_type() const; // type of the method result 553 BasicType result_type() const; // type of the method result
562 int result_type_index() const; // type index of the method result
563 bool is_returning_oop() const { BasicType r = result_type(); return (r == T_OBJECT || r == T_ARRAY); } 554 bool is_returning_oop() const { BasicType r = result_type(); return (r == T_OBJECT || r == T_ARRAY); }
564 bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); } 555 bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); }
565 556
566 // Checked exceptions thrown by this method (resolved to mirrors) 557 // Checked exceptions thrown by this method (resolved to mirrors)
567 objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); } 558 objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
650 #endif 641 #endif
651 642
652 // interpreter support 643 // interpreter support
653 static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); } 644 static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); }
654 static ByteSize access_flags_offset() { return byte_offset_of(Method, _access_flags ); } 645 static ByteSize access_flags_offset() { return byte_offset_of(Method, _access_flags ); }
655 #ifdef CC_INTERP
656 static ByteSize result_index_offset() { return byte_offset_of(Method, _result_index ); }
657 #endif /* CC_INTERP */
658 static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); } 646 static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); }
659 static ByteSize code_offset() { return byte_offset_of(Method, _code); } 647 static ByteSize code_offset() { return byte_offset_of(Method, _code); }
660 static ByteSize method_data_offset() { 648 static ByteSize method_data_offset() {
661 return byte_offset_of(Method, _method_data); 649 return byte_offset_of(Method, _method_data);
662 } 650 }