170 return (ref_kind <= JVM_REF_getStatic);
171 }
172 static bool ref_kind_is_setter(int ref_kind) {
173 return ref_kind_is_field(ref_kind) && !ref_kind_is_getter(ref_kind);
174 }
175 static bool ref_kind_is_method(int ref_kind) {
176 return !ref_kind_is_field(ref_kind) && (ref_kind != JVM_REF_newInvokeSpecial);
177 }
178 static bool ref_kind_has_receiver(int ref_kind) {
179 assert(ref_kind_is_valid(ref_kind), "");
180 return (ref_kind & 1) != 0;
181 }
182
183 static int ref_kind_to_flags(int ref_kind);
184
185 #include CPU_HEADER(methodHandles)
186
187 // Tracing
188 static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN;
189 static void trace_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid);
190 };
191
192 //------------------------------------------------------------------------------
193 // MethodHandlesAdapterGenerator
194 //
195 class MethodHandlesAdapterGenerator : public StubCodeGenerator {
196 public:
197 MethodHandlesAdapterGenerator(CodeBuffer* code) : StubCodeGenerator(code, PrintMethodHandleStubs) {}
198
199 void generate();
200 };
201
202 #endif // SHARE_PRIMS_METHODHANDLES_HPP
|
170 return (ref_kind <= JVM_REF_getStatic);
171 }
172 static bool ref_kind_is_setter(int ref_kind) {
173 return ref_kind_is_field(ref_kind) && !ref_kind_is_getter(ref_kind);
174 }
175 static bool ref_kind_is_method(int ref_kind) {
176 return !ref_kind_is_field(ref_kind) && (ref_kind != JVM_REF_newInvokeSpecial);
177 }
178 static bool ref_kind_has_receiver(int ref_kind) {
179 assert(ref_kind_is_valid(ref_kind), "");
180 return (ref_kind & 1) != 0;
181 }
182
183 static int ref_kind_to_flags(int ref_kind);
184
185 #include CPU_HEADER(methodHandles)
186
187 // Tracing
188 static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN;
189 static void trace_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid);
190
191 public:
192 static void init_counters();
193 static void print_counters_on(outputStream* st);
194 };
195
196 //------------------------------------------------------------------------------
197 // MethodHandlesAdapterGenerator
198 //
199 class MethodHandlesAdapterGenerator : public StubCodeGenerator {
200 public:
201 MethodHandlesAdapterGenerator(CodeBuffer* code) : StubCodeGenerator(code, PrintMethodHandleStubs) {}
202
203 void generate();
204 };
205
206 #endif // SHARE_PRIMS_METHODHANDLES_HPP
|