Ignore:
Timestamp:
Feb 18, 2020, 8:48:49 PM (22 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
6988dc6
Parents:
5ccee64
Message:

rewrite most of OperatorTable? and change caller modules to use new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/OperatorTable.h

    r5ccee64 r60a8062  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 21 22:17:11 2017
    13 // Update Count     : 6
     12// Last Modified On : Sun Feb 16 08:13:34 2020
     13// Update Count     : 26
    1414//
    1515
     
    1717
    1818#include <string>
     19#include <map>
    1920
    2021namespace CodeGen {
    2122        enum OperatorType {
    22                 OT_INDEX,
    2323                OT_CTOR,
    2424                OT_DTOR,
    25                 OT_CALL,
    26                 OT_PREFIX,
    27                 OT_POSTFIX,
    28                 OT_INFIX,
     25                OT_CONSTRUCTOR = OT_DTOR,
    2926                OT_PREFIXASSIGN,
    3027                OT_POSTFIXASSIGN,
    3128                OT_INFIXASSIGN,
     29                OT_ASSIGNMENT = OT_INFIXASSIGN,
     30                OT_CALL,
     31                OT_PREFIX,
     32                OT_INFIX,
     33                OT_POSTFIX,
     34                OT_INDEX,
    3235                OT_LABELADDRESS,
    3336                OT_CONSTANT
     
    4245        };
    4346
     47        class CodeGen {
     48                friend const OperatorInfo * operatorLookup( const std::string & funcName );
     49
     50                static const OperatorInfo tableValues[];
     51                static std::map< std::string, OperatorInfo > table;
     52          public:
     53                CodeGen();
     54        }; // CodeGen
     55
    4456        bool isOperator( const std::string & funcName );
    45         bool operatorLookup( const std::string & funcName, OperatorInfo & info );
     57        const OperatorInfo * operatorLookup( const std::string & funcName );
    4658        std::string operatorFriendlyName( const std::string & funcName );
    4759
Note: See TracChangeset for help on using the changeset viewer.