src/share/vm/compiler/directivesParser.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8138651 Sdiff src/share/vm/compiler

src/share/vm/compiler/directivesParser.hpp

Print this page




  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 #ifndef SHARE_VM_COMPILER_DIRECTIVESPARSER_HPP
  26 #define SHARE_VM_COMPILER_DIRECTIVESPARSER_HPP
  27 
  28 #include "utilities/json.hpp"
  29 #include "compiler/compilerDirectives.hpp"
  30 
  31 enum FlagType {
  32   boolFlag,
  33   intxFlag,
  34   doubleFlag,
  35   ccstrFlag,

  36   UnknownFlagType
  37 };
  38 
  39 static const char* flag_type_names[] = {
  40     "bool",
  41     "int",
  42     "double",
  43     "string",

  44     "unknown"
  45 };
  46 
  47 class DirectivesParser : public JSON {
  48 public:
  49   static bool has_file();
  50   static bool parse_from_flag();
  51   static bool parse_from_file(const char* filename, outputStream* st);
  52   static bool parse_string(const char* string, outputStream* st);
  53   bool install_directives();
  54 
  55 private:
  56   DirectivesParser(const char* text, outputStream* st);
  57   ~DirectivesParser();
  58 
  59   bool callback(JSON_TYPE t, JSON_VAL* v, uint level);
  60   static bool parse_from_file_inner(const char* filename, outputStream* st);
  61 
  62   // types of "keys". i.e recognized <key>:<value> pairs in our JSON syntax
  63   typedef enum {




  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 #ifndef SHARE_VM_COMPILER_DIRECTIVESPARSER_HPP
  26 #define SHARE_VM_COMPILER_DIRECTIVESPARSER_HPP
  27 
  28 #include "utilities/json.hpp"
  29 #include "compiler/compilerDirectives.hpp"
  30 
  31 enum FlagType {
  32   boolFlag,
  33   intxFlag,
  34   doubleFlag,
  35   ccstrFlag,
  36   ccstrlistFlag,
  37   UnknownFlagType
  38 };
  39 
  40 static const char* flag_type_names[] = {
  41     "bool",
  42     "int",
  43     "double",
  44     "string",
  45     "string list",
  46     "unknown"
  47 };
  48 
  49 class DirectivesParser : public JSON {
  50 public:
  51   static bool has_file();
  52   static bool parse_from_flag();
  53   static bool parse_from_file(const char* filename, outputStream* st);
  54   static bool parse_string(const char* string, outputStream* st);
  55   bool install_directives();
  56 
  57 private:
  58   DirectivesParser(const char* text, outputStream* st);
  59   ~DirectivesParser();
  60 
  61   bool callback(JSON_TYPE t, JSON_VAL* v, uint level);
  62   static bool parse_from_file_inner(const char* filename, outputStream* st);
  63 
  64   // types of "keys". i.e recognized <key>:<value> pairs in our JSON syntax
  65   typedef enum {


src/share/vm/compiler/directivesParser.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File