375 MutexLocker ml(MethodData_lock, THREAD);
376 if (method->method_data() == NULL) {
377 ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
378 MethodData* method_data = MethodData::allocate(loader_data, method, CHECK);
379 method->set_method_data(method_data);
380 if (PrintMethodData && (Verbose || WizardMode)) {
381 ResourceMark rm(THREAD);
382 tty->print("build_interpreter_method_data for ");
383 method->print_name(tty);
384 tty->cr();
385 // At the end of the run, the MDO, full of data, will be dumped.
386 }
387 }
388 }
389
390 void Method::cleanup_inline_caches() {
391 // The current system doesn't use inline caches in the interpreter
392 // => nothing to do (keep this method around for future use)
393 }
394
395
396 int Method::extra_stack_words() {
397 // not an inline function, to avoid a header dependency on Interpreter
398 return extra_stack_entries() * Interpreter::stackElementSize;
399 }
400
401
402 void Method::compute_size_of_parameters(Thread *thread) {
403 ArgumentSizeComputer asc(signature());
404 set_size_of_parameters(asc.size() + (is_static() ? 0 : 1));
405 }
406
407 #ifdef CC_INTERP
408 void Method::set_result_index(BasicType type) {
409 _result_index = Interpreter::BasicType_as_index(type);
410 }
411 #endif
412
413 BasicType Method::result_type() const {
414 ResultTypeFinder rtf(signature());
415 return rtf.type();
416 }
417
418
419 bool Method::is_empty_method() const {
420 return code_size() == 1
421 && *code_base() == Bytecodes::_return;
|
375 MutexLocker ml(MethodData_lock, THREAD);
376 if (method->method_data() == NULL) {
377 ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
378 MethodData* method_data = MethodData::allocate(loader_data, method, CHECK);
379 method->set_method_data(method_data);
380 if (PrintMethodData && (Verbose || WizardMode)) {
381 ResourceMark rm(THREAD);
382 tty->print("build_interpreter_method_data for ");
383 method->print_name(tty);
384 tty->cr();
385 // At the end of the run, the MDO, full of data, will be dumped.
386 }
387 }
388 }
389
390 void Method::cleanup_inline_caches() {
391 // The current system doesn't use inline caches in the interpreter
392 // => nothing to do (keep this method around for future use)
393 }
394
395 void Method::compute_size_of_parameters(Thread *thread) {
396 ArgumentSizeComputer asc(signature());
397 set_size_of_parameters(asc.size() + (is_static() ? 0 : 1));
398 }
399
400 #ifdef CC_INTERP
401 void Method::set_result_index(BasicType type) {
402 _result_index = Interpreter::BasicType_as_index(type);
403 }
404 #endif
405
406 BasicType Method::result_type() const {
407 ResultTypeFinder rtf(signature());
408 return rtf.type();
409 }
410
411
412 bool Method::is_empty_method() const {
413 return code_size() == 1
414 && *code_base() == Bytecodes::_return;
|