< prev index next >

src/hotspot/share/ci/ciSymbol.cpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  51 // ciSymbol
  52 //
  53 // This class represents a Symbol* in the HotSpot virtual
  54 // machine.
  55 
  56 // ------------------------------------------------------------------
  57 // ciSymbol::as_utf8
  58 //
  59 // The text of the symbol as a null-terminated C string.
  60 const char* ciSymbol::as_utf8() {
  61   GUARDED_VM_QUICK_ENTRY(return get_symbol()->as_utf8();)
  62 }
  63 
  64 // The text of the symbol as a null-terminated C string.
  65 const char* ciSymbol::as_quoted_ascii() {
  66   GUARDED_VM_QUICK_ENTRY(return get_symbol()->as_quoted_ascii();)
  67 }
  68 
  69 // ------------------------------------------------------------------
  70 // ciSymbol::base
  71 const jbyte* ciSymbol::base() {
  72   GUARDED_VM_ENTRY(return get_symbol()->base();)
  73 }
  74 
  75 // ------------------------------------------------------------------
  76 // ciSymbol::byte_at
  77 int ciSymbol::byte_at(int i) {
  78   GUARDED_VM_ENTRY(return get_symbol()->byte_at(i);)






  79 }
  80 
  81 // ------------------------------------------------------------------
  82 // ciSymbol::starts_with
  83 //
  84 // Tests if the symbol starts with the given prefix.
  85 bool ciSymbol::starts_with(const char* prefix, int len) const {
  86   GUARDED_VM_ENTRY(return get_symbol()->starts_with(prefix, len);)
  87 }
  88 
  89 bool ciSymbol::is_signature_polymorphic_name()  const {
  90   GUARDED_VM_ENTRY(return MethodHandles::is_signature_polymorphic_name(get_symbol());)
  91 }
  92 
  93 // ------------------------------------------------------------------
  94 // ciSymbol::index_of
  95 //
  96 // Determines where the symbol contains the given substring.
  97 int ciSymbol::index_of_at(int i, const char* str, int len) const {
  98   GUARDED_VM_ENTRY(return get_symbol()->index_of_at(i, str, len);)


   1 /*
   2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  51 // ciSymbol
  52 //
  53 // This class represents a Symbol* in the HotSpot virtual
  54 // machine.
  55 
  56 // ------------------------------------------------------------------
  57 // ciSymbol::as_utf8
  58 //
  59 // The text of the symbol as a null-terminated C string.
  60 const char* ciSymbol::as_utf8() {
  61   GUARDED_VM_QUICK_ENTRY(return get_symbol()->as_utf8();)
  62 }
  63 
  64 // The text of the symbol as a null-terminated C string.
  65 const char* ciSymbol::as_quoted_ascii() {
  66   GUARDED_VM_QUICK_ENTRY(return get_symbol()->as_quoted_ascii();)
  67 }
  68 
  69 // ------------------------------------------------------------------
  70 // ciSymbol::base
  71 const u1* ciSymbol::base() {
  72   GUARDED_VM_ENTRY(return get_symbol()->base();)
  73 }
  74 
  75 // ------------------------------------------------------------------
  76 // ciSymbol::byte_at
  77 u1 ciSymbol::byte_at(int i) {
  78   GUARDED_VM_ENTRY(return get_symbol()->byte_at(i);)
  79 }
  80 
  81 // ------------------------------------------------------------------
  82 // ciSymbol::char_at
  83 char ciSymbol::char_at(int i) {
  84   GUARDED_VM_ENTRY(return get_symbol()->char_at(i);)
  85 }
  86 
  87 // ------------------------------------------------------------------
  88 // ciSymbol::starts_with
  89 //
  90 // Tests if the symbol starts with the given prefix.
  91 bool ciSymbol::starts_with(const char* prefix, int len) const {
  92   GUARDED_VM_ENTRY(return get_symbol()->starts_with(prefix, len);)
  93 }
  94 
  95 bool ciSymbol::is_signature_polymorphic_name()  const {
  96   GUARDED_VM_ENTRY(return MethodHandles::is_signature_polymorphic_name(get_symbol());)
  97 }
  98 
  99 // ------------------------------------------------------------------
 100 // ciSymbol::index_of
 101 //
 102 // Determines where the symbol contains the given substring.
 103 int ciSymbol::index_of_at(int i, const char* str, int len) const {
 104   GUARDED_VM_ENTRY(return get_symbol()->index_of_at(i, str, len);)


< prev index next >