comparison src/share/vm/oops/method.hpp @ 7184:5505fbbae3d3

Merge
author cjplummer
date Thu, 29 Nov 2012 13:55:49 -0800
parents 59c790074993 b2dbd323c668
children 291ffc492eb6 fd74228fd5ca 35431a769282
comparison
equal deleted inserted replaced
7182:c24f778e9401 7184:5505fbbae3d3
71 // | access_flags | 71 // | access_flags |
72 // | vtable_index | 72 // | vtable_index |
73 // |------------------------------------------------------| 73 // |------------------------------------------------------|
74 // | result_index (C++ interpreter only) | 74 // | result_index (C++ interpreter only) |
75 // |------------------------------------------------------| 75 // |------------------------------------------------------|
76 // | method_size | max_stack | 76 // | method_size | max_locals |
77 // | max_locals | size_of_parameters | 77 // | size_of_parameters | intrinsic_id| flags |
78 // |------------------------------------------------------| 78 // |------------------------------------------------------|
79 // |intrinsic_id| flags | throwout_count | 79 // | throwout_count | num_breakpoints |
80 // |------------------------------------------------------|
81 // | num_breakpoints | (unused) |
82 // |------------------------------------------------------| 80 // |------------------------------------------------------|
83 // | invocation_counter | 81 // | invocation_counter |
84 // | backedge_counter | 82 // | backedge_counter |
85 // |------------------------------------------------------| 83 // |------------------------------------------------------|
86 // | prev_time (tiered only, 64 bit wide) | 84 // | prev_time (tiered only, 64 bit wide) |
116 // note: can have vtables with >2**16 elements (because of inheritance) 114 // note: can have vtables with >2**16 elements (because of inheritance)
117 #ifdef CC_INTERP 115 #ifdef CC_INTERP
118 int _result_index; // C++ interpreter needs for converting results to/from stack 116 int _result_index; // C++ interpreter needs for converting results to/from stack
119 #endif 117 #endif
120 u2 _method_size; // size of this object 118 u2 _method_size; // size of this object
121 u2 _max_stack; // Maximum number of entries on the expression stack
122 u2 _max_locals; // Number of local variables used by this method 119 u2 _max_locals; // Number of local variables used by this method
123 u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words 120 u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words
124 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) 121 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
125 u1 _jfr_towrite : 1, // Flags 122 u1 _jfr_towrite : 1, // Flags
126 _force_inline : 1, 123 _force_inline : 1,
164 AccessFlags access_flags, 161 AccessFlags access_flags,
165 int compressed_line_number_size, 162 int compressed_line_number_size,
166 int localvariable_table_length, 163 int localvariable_table_length,
167 int exception_table_length, 164 int exception_table_length,
168 int checked_exceptions_length, 165 int checked_exceptions_length,
166 u2 generic_signature_index,
169 ConstMethod::MethodType method_type, 167 ConstMethod::MethodType method_type,
170 TRAPS); 168 TRAPS);
171 169
172 // CDS and vtbl checking can create an empty Method to get vtbl pointer. 170 // CDS and vtbl checking can create an empty Method to get vtbl pointer.
173 Method(){} 171 Method(){}
287 ConstantPool* constants() const { return constMethod()->constants(); } 285 ConstantPool* constants() const { return constMethod()->constants(); }
288 void set_constants(ConstantPool* c) { constMethod()->set_constants(c); } 286 void set_constants(ConstantPool* c) { constMethod()->set_constants(c); }
289 287
290 // max stack 288 // max stack
291 // return original max stack size for method verification 289 // return original max stack size for method verification
292 int verifier_max_stack() const { return _max_stack; } 290 int verifier_max_stack() const { return constMethod()->max_stack(); }
293 int max_stack() const { return _max_stack + extra_stack_entries(); } 291 int max_stack() const { return constMethod()->max_stack() + extra_stack_entries(); }
294 void set_max_stack(int size) { _max_stack = size; } 292 void set_max_stack(int size) { constMethod()->set_max_stack(size); }
295 293
296 // max locals 294 // max locals
297 int max_locals() const { return _max_locals; } 295 int max_locals() const { return _max_locals; }
298 void set_max_locals(int size) { _max_locals = size; } 296 void set_max_locals(int size) { _max_locals = size; }
299 297
605 #endif // not PRODUCT 603 #endif // not PRODUCT
606 static ByteSize native_function_offset() { return in_ByteSize(sizeof(Method)); } 604 static ByteSize native_function_offset() { return in_ByteSize(sizeof(Method)); }
607 static ByteSize from_interpreted_offset() { return byte_offset_of(Method, _from_interpreted_entry ); } 605 static ByteSize from_interpreted_offset() { return byte_offset_of(Method, _from_interpreted_entry ); }
608 static ByteSize interpreter_entry_offset() { return byte_offset_of(Method, _i2i_entry ); } 606 static ByteSize interpreter_entry_offset() { return byte_offset_of(Method, _i2i_entry ); }
609 static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); } 607 static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); }
610 static ByteSize max_stack_offset() { return byte_offset_of(Method, _max_stack ); }
611 608
612 // for code generation 609 // for code generation
613 static int method_data_offset_in_bytes() { return offset_of(Method, _method_data); } 610 static int method_data_offset_in_bytes() { return offset_of(Method, _method_data); }
614 static int interpreter_invocation_counter_offset_in_bytes() 611 static int interpreter_invocation_counter_offset_in_bytes()
615 { return offset_of(Method, _interpreter_invocation_count); } 612 { return offset_of(Method, _interpreter_invocation_count); }