Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/opto/library_call.cpp
          +++ new/src/share/vm/opto/library_call.cpp
   1    1  /*
   2      - * Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
        2 + * Copyright 1999-2010 Sun Microsystems, Inc.  All Rights Reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 3677 lines elided ↑ open up ↑
3690 3690      for (int i = _depth; i >= 1; i--) {
3691 3691        tty->print_cr("   %d) %s", i, jvms()->of_depth(i)->method()->name()->as_utf8());
3692 3692      }
3693 3693    }
3694 3694  #endif
3695 3695    return true;
3696 3696  }
3697 3697  
3698 3698  // Helper routine for above
3699 3699  bool LibraryCallKit::is_method_invoke_or_aux_frame(JVMState* jvms) {
     3700 +  ciMethod* method = jvms->method();
     3701 +
3700 3702    // Is this the Method.invoke method itself?
3701      -  if (jvms->method()->intrinsic_id() == vmIntrinsics::_invoke)
     3703 +  if (method->intrinsic_id() == vmIntrinsics::_invoke)
3702 3704      return true;
3703 3705  
3704 3706    // Is this a helper, defined somewhere underneath MethodAccessorImpl.
3705      -  ciKlass* k = jvms->method()->holder();
     3707 +  ciKlass* k = method->holder();
3706 3708    if (k->is_instance_klass()) {
3707 3709      ciInstanceKlass* ik = k->as_instance_klass();
3708 3710      for (; ik != NULL; ik = ik->super()) {
3709 3711        if (ik->name() == ciSymbol::sun_reflect_MethodAccessorImpl() &&
3710 3712            ik == env()->find_system_klass(ik->name())) {
3711 3713          return true;
3712 3714        }
3713 3715      }
3714 3716    }
     3717 +  else if (method->is_method_handle_adapter()) {
     3718 +    // This is an internal adapter frame from the MethodHandleCompiler -- skip it
     3719 +    return true;
     3720 +  }
3715 3721  
3716 3722    return false;
3717 3723  }
3718 3724  
3719 3725  static int value_field_offset = -1;  // offset of the "value" field of AtomicLongCSImpl.  This is needed by
3720 3726                                       // inline_native_AtomicLong_attemptUpdate() but it has no way of
3721 3727                                       // computing it since there is no lookup field by name function in the
3722 3728                                       // CI interface.  This is computed and set by inline_native_AtomicLong_get().
3723 3729                                       // Using a static variable here is safe even if we have multiple compilation
3724 3730                                       // threads because the offset is constant.  At worst the same offset will be
↓ open down ↓ 1532 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX