Print this page
rev 1026 : imported patch indy.compiler.inline.patch

Split Close
Expand all
Collapse all
          --- old/src/share/vm/ci/ciKlass.cpp
          +++ new/src/share/vm/ci/ciKlass.cpp
   1    1  /*
   2      - * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
        2 + * Copyright 1999-2009 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 ↓ 41 lines elided ↑ open up ↑
  54   54  // ------------------------------------------------------------------
  55   55  // ciKlass::ciKlass
  56   56  //
  57   57  // Unloaded klass variant.
  58   58  ciKlass::ciKlass(ciSymbol* name, ciKlass* klass) : ciType(klass) {
  59   59    _name = name;
  60   60    _layout_helper = Klass::_lh_neutral_value;
  61   61  }
  62   62  
  63   63  // ------------------------------------------------------------------
       64 +// ciKlass::is_in_package
       65 +//
       66 +// Is this klass in the given package?
       67 +bool ciKlass::is_in_package(const char* packagename) const {
       68 +  ResourceMark rm;
       69 +  Klass* klass = get_klassOop()->klass_part();
       70 +  const char* external_name = klass->external_name();
       71 +  size_t packagename_len = strlen(packagename);
       72 +  return (strncmp(packagename, external_name, packagename_len) == 0);
       73 +}
       74 +
       75 +// ------------------------------------------------------------------
  64   76  // ciKlass::is_subtype_of
  65   77  bool ciKlass::is_subtype_of(ciKlass* that) {
  66   78    assert(is_loaded() && that->is_loaded(), "must be loaded");
  67   79    assert(is_java_klass() && that->is_java_klass(), "must be java klasses");
  68   80    // Check to see if the klasses are identical.
  69   81    if (this == that) {
  70   82      return true;
  71   83    }
  72   84  
  73   85    VM_ENTRY_MARK;
↓ open down ↓ 162 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX