src/share/vm/compiler/methodMatcher.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/compiler

src/share/vm/compiler/methodMatcher.cpp

Print this page


   1 /*
   2  * Copyright (c) 2015, 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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "compiler/methodMatcher.hpp"
  27 #include "memory/oopFactory.hpp"

  28 #include "oops/oop.inline.hpp"
  29 
  30 // The JVM specification defines the allowed characters.
  31 // Tokens that are disallowed by the JVM specification can have
  32 // a meaning to the parser so we need to include them here.
  33 // The parser does not enforce all rules of the JVMS - a successful parse
  34 // does not mean that it is an allowed name. Illegal names will
  35 // be ignored since they never can match a class or method.
  36 //
  37 // '\0' and 0xf0-0xff are disallowed in constant string values
  38 // 0x20 ' ', 0x09 '\t' and, 0x2c ',' are used in the matching
  39 // 0x5b '[' and 0x5d ']' can not be used because of the matcher
  40 // 0x28 '(' and 0x29 ')' are used for the signature
  41 // 0x2e '.' is always replaced before the matching
  42 // 0x2f '/' is only used in the class name as package separator
  43 
  44 #define RANGEBASE "\x1\x2\x3\x4\x5\x6\x7\x8\xa\xb\xc\xd\xe\xf" \
  45     "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" \
  46     "\x21\x22\x23\x24\x25\x26\x27\x2a\x2b\x2c\x2d" \
  47     "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" \


   1 /*
   2  * Copyright (c) 2016, 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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "compiler/methodMatcher.hpp"
  27 #include "memory/oopFactory.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "oops/oop.inline.hpp"
  30 
  31 // The JVM specification defines the allowed characters.
  32 // Tokens that are disallowed by the JVM specification can have
  33 // a meaning to the parser so we need to include them here.
  34 // The parser does not enforce all rules of the JVMS - a successful parse
  35 // does not mean that it is an allowed name. Illegal names will
  36 // be ignored since they never can match a class or method.
  37 //
  38 // '\0' and 0xf0-0xff are disallowed in constant string values
  39 // 0x20 ' ', 0x09 '\t' and, 0x2c ',' are used in the matching
  40 // 0x5b '[' and 0x5d ']' can not be used because of the matcher
  41 // 0x28 '(' and 0x29 ')' are used for the signature
  42 // 0x2e '.' is always replaced before the matching
  43 // 0x2f '/' is only used in the class name as package separator
  44 
  45 #define RANGEBASE "\x1\x2\x3\x4\x5\x6\x7\x8\xa\xb\xc\xd\xe\xf" \
  46     "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" \
  47     "\x21\x22\x23\x24\x25\x26\x27\x2a\x2b\x2c\x2d" \
  48     "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" \


src/share/vm/compiler/methodMatcher.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File