src/hotspot/share/ci/ciSymbol.hpp
changeset 51997 9ce37fa2e179
parent 47216 71c04702a3d5
child 53244 9807daeb47c4
equal deleted inserted replaced
51996:84743156e780 51997:9ce37fa2e179
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     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.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    59   const char* type_string() { return "ciSymbol"; }
    59   const char* type_string() { return "ciSymbol"; }
    60 
    60 
    61   void print_impl(outputStream* st);
    61   void print_impl(outputStream* st);
    62 
    62 
    63   // This is public in Symbol* but private here, because the base can move:
    63   // This is public in Symbol* but private here, because the base can move:
    64   const jbyte* base();
    64   const u1* base();
    65 
    65 
    66   // Make a ciSymbol from a C string (implementation).
    66   // Make a ciSymbol from a C string (implementation).
    67   static ciSymbol* make_impl(const char* s);
    67   static ciSymbol* make_impl(const char* s);
    68 
    68 
    69 public:
    69 public:
    75   int         utf8_length();
    75   int         utf8_length();
    76 
    76 
    77   // The text of the symbol as ascii with all non-printable characters quoted as \u####
    77   // The text of the symbol as ascii with all non-printable characters quoted as \u####
    78   const char* as_quoted_ascii();
    78   const char* as_quoted_ascii();
    79 
    79 
    80   // Return the i-th utf8 byte, where i < utf8_length
    80   // Return the i-th utf byte as a char, where i < utf8_length
    81   int         byte_at(int i);
    81   char        char_at(int i);
    82 
    82 
    83   // Tests if the symbol starts with the given prefix.
    83   // Tests if the symbol starts with the given prefix.
    84   bool starts_with(const char* prefix, int len) const;
    84   bool starts_with(const char* prefix, int len) const;
    85 
    85 
    86   // Determines where the symbol contains the given substring.
    86   // Determines where the symbol contains the given substring.