src/share/vm/adlc/forms.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2009, 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 // FORMS.HPP - ADL Parser Generic and Utility Forms Classes
  26 
  27 #define TRUE 1
  28 #define FALSE 0
  29 
  30 // DEFINITIONS OF LEGAL ATTRIBUTE TYPES
  31 #define INS_ATTR 0
  32 #define OP_ATTR  1
  33 
  34 // DEFINITIONS OF LEGAL CONSTRAINT TYPES
  35 
  36 // Class List
  37 class Form;
  38 class InstructForm;
  39 class MachNodeForm;
  40 class OperandForm;
  41 class OpClassForm;
  42 class AttributeForm;
  43 class RegisterForm;
  44 class PipelineForm;


 571 
 572   // Return # of key-value pairs in dict
 573   int Size(void) const;
 574 
 575   // define inserts the given key-value pair into the dictionary,
 576   // and records the name in order for later output, ...
 577   const Expr  *define(const char *name, Expr *expr);
 578 
 579   // Insert inserts the given key-value pair into the dictionary.  The prior
 580   // value of the key is returned; NULL if the key was not previously defined.
 581   const Expr  *Insert(const char *name, Expr *expr); // A new key-value
 582 
 583   // Find finds the value of a given key; or NULL if not found.
 584   // The dictionary is NOT changed.
 585   const Expr  *operator [](const char *name) const;  // Do a lookup
 586 
 587   void print_defines(FILE *fp);
 588   void print_asserts(FILE *fp);
 589   void dump();
 590 };


   1 /*
   2  * Copyright (c) 1997, 2010, 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 #ifndef SHARE_VM_ADLC_FORMS_HPP
  26 #define SHARE_VM_ADLC_FORMS_HPP
  27 
  28 // FORMS.HPP - ADL Parser Generic and Utility Forms Classes
  29 
  30 #define TRUE 1
  31 #define FALSE 0
  32 
  33 // DEFINITIONS OF LEGAL ATTRIBUTE TYPES
  34 #define INS_ATTR 0
  35 #define OP_ATTR  1
  36 
  37 // DEFINITIONS OF LEGAL CONSTRAINT TYPES
  38 
  39 // Class List
  40 class Form;
  41 class InstructForm;
  42 class MachNodeForm;
  43 class OperandForm;
  44 class OpClassForm;
  45 class AttributeForm;
  46 class RegisterForm;
  47 class PipelineForm;


 574 
 575   // Return # of key-value pairs in dict
 576   int Size(void) const;
 577 
 578   // define inserts the given key-value pair into the dictionary,
 579   // and records the name in order for later output, ...
 580   const Expr  *define(const char *name, Expr *expr);
 581 
 582   // Insert inserts the given key-value pair into the dictionary.  The prior
 583   // value of the key is returned; NULL if the key was not previously defined.
 584   const Expr  *Insert(const char *name, Expr *expr); // A new key-value
 585 
 586   // Find finds the value of a given key; or NULL if not found.
 587   // The dictionary is NOT changed.
 588   const Expr  *operator [](const char *name) const;  // Do a lookup
 589 
 590   void print_defines(FILE *fp);
 591   void print_asserts(FILE *fp);
 592   void dump();
 593 };
 594 
 595 #endif // SHARE_VM_ADLC_FORMS_HPP