Annotation of researchv10no/cmd/hdr/cnodes.h, revision 1.1

1.1     ! root        1: #define        csync(c)        (global_filename = (c)->c_value.no.no_name, global_lineno = (c)->c_value.no.no_offset)
        !             2: #define        cunpack(x)      ((cnodes)x)
        !             3: 
        !             4: typedef enum
        !             5: {
        !             6:        ct_args,
        !             7:        ct_binopfsfx,
        !             8:        ct_binopft,
        !             9:        ct_binopfv,
        !            10:        ct_block,
        !            11:        ct_booltest,
        !            12:        ct_boolval,
        !            13:        ct_call,
        !            14:        ct_callfv,
        !            15:        ct_dcast,
        !            16:        ct_clear,
        !            17:        ct_colon,
        !            18:        ct_discard,
        !            19:        ct_fake,
        !            20:        ct_ftnentry,
        !            21:        ct_ftnxit,
        !            22:        ct_hard,
        !            23:        ct_jmp,
        !            24:        ct_jmpf,
        !            25:        ct_jmpt,
        !            26:        ct_intrin,
        !            27:        ct_intrinfv,
        !            28:        ct_label,
        !            29:        ct_ldiff,
        !            30:        ct_nop,
        !            31:        ct_not,
        !            32:        ct_obj,
        !            33:        ct_objfv,
        !            34:        ct_objref,
        !            35:        ct_question,
        !            36:        ct_ret,
        !            37:        ct_switch,
        !            38:        ct_sync,
        !            39:        ct_ujmp,
        !            40:        ct_unopfsfx,
        !            41:        ct_unopfv,
        !            42:        ct_vret,
        !            43:        ct_xnd,
        !            44:        ct_xndtest,
        !            45: 
        !            46:        ct_char,
        !            47:        ct_double,
        !            48:        ct_extern,
        !            49:        ct_float,
        !            50:        ct_int,
        !            51:        ct_long,
        !            52:        ct_short,
        !            53:        ct_space,
        !            54:        ct_ptr,
        !            55:        ct_string,
        !            56: }
        !            57:        cnodes;
        !            58: 
        !            59: struct cnode
        !            60: {
        !            61:        /*
        !            62:         *      whenever in a list.
        !            63:         */
        !            64:        cnode   *c_next;
        !            65:        /*
        !            66:         *      last    - during optimisation
        !            67:         *      type    - codegen and beyond
        !            68:         *      symtab  - intrinsics (currently unused)
        !            69:         */
        !            70:        union
        !            71:        {
        !            72:                cnode   *cu_last;
        !            73:                xnode   *cu_type;
        !            74:                char    *cu_symtab;
        !            75:        }
        !            76:                cu1;
        !            77:        /*
        !            78:         *      value   - general use
        !            79:         *      labs    - label difference (switch table)
        !            80:         */
        !            81:        union
        !            82:        {
        !            83:                data    cu_value;
        !            84:                struct
        !            85:                {
        !            86:                        cnode   *cu_l1;
        !            87:                        cnode   *cu_l2;
        !            88:                }
        !            89:                        cu_labs;
        !            90:        }
        !            91:                cu2;
        !            92:        /*
        !            93:         *      what    - whenever in a list
        !            94:         *      label   - switch labels
        !            95:         */
        !            96:        union
        !            97:        {
        !            98:                cnodes  cu_what;
        !            99:                cnode   *cu_label;
        !           100:        }
        !           101:                cu3;
        !           102:        /*
        !           103:         *      choice  - switch tree
        !           104:         *      link    - labels
        !           105:         *      ids     - register allocation
        !           106:         *      xwhat   - codegen operator
        !           107:         */
        !           108:        union
        !           109:        {
        !           110:                choice  *cu_choice;
        !           111:                cnode   *cu_link;
        !           112:                xnodes  cu_xwhat;
        !           113:                xnode   *cu_ids;
        !           114:        }
        !           115:                cu4;
        !           116:        /*
        !           117:         *      flow_set - opt/flow
        !           118:         */
        !           119:        union
        !           120:        {
        !           121:                xnode   *cu_flow;
        !           122:                cnode   *cu_switch;
        !           123:        }
        !           124:                cu5;
        !           125:        /*
        !           126:         *      short1  - flags (almost everywhere)
        !           127:         *      short2  - optimisation
        !           128:         */
        !           129:        short   c_short1;
        !           130:        short   c_short2;
        !           131: };
        !           132: #define        c_code          c_next
        !           133: 
        !           134: #define        c_symtab        cu1.cu_symtab
        !           135: #define        c_last          cu1.cu_last
        !           136: #define        c_type          cu1.cu_type
        !           137: 
        !           138: #define        c_value         cu2.cu_value
        !           139: #define        c_l1            cu2.cu_labs.cu_l1
        !           140: #define        c_l2            cu2.cu_labs.cu_l2
        !           141: #define        c_uncomarg      cu2.cu_labs.cu_l1
        !           142: #define        c_uncomnext     cu2.cu_labs.cu_l2
        !           143: 
        !           144: #define        c_label         cu3.cu_label
        !           145: #define        c_what          cu3.cu_what
        !           146: 
        !           147: #define        c_link          cu4.cu_link
        !           148: #define        c_xwhat         cu4.cu_xwhat
        !           149: #define        c_choice        cu4.cu_choice
        !           150: #define        c_ids           cu4.cu_ids
        !           151: 
        !           152: #define        c_left          c_next
        !           153: #define        c_right         c_last
        !           154: #define        c_switch        cu5.cu_switch
        !           155: 
        !           156: #define        c_flow          cu5.cu_flow
        !           157: 
        !           158: #define        c_height        c_short1
        !           159: #define        c_flags         c_short1
        !           160: #define        c_known         c_short2
        !           161: #define        c_dist          c_short2
        !           162: #define        c_ord           c_short2
        !           163: 
        !           164: /*
        !           165:  *     Used in ct_clear nodes for memory layout definitions as passed
        !           166:  *     to memory().
        !           167:  */
        !           168: #define        C_READONLY              0x0001
        !           169: #define        C_EXECUTEONLY           0x0002
        !           170: #define        C_ALLZERO               0x0004
        !           171: 
        !           172: /*
        !           173:  *     cnode / xnode flow flags
        !           174:  *
        !           175:  *     The first five are the flow sets, the rest
        !           176:  *     are allocated identifier classes.
        !           177:  */
        !           178: #define        C_X_CUT                 0x0001
        !           179: #define        C_X_MOD                 0x0002
        !           180: #define        C_X_REF                 0x0004
        !           181: #define        C_X_HIDE                0x0008
        !           182: #define        C_X_CMOD                0x0010
        !           183: 
        !           184: #define        C_ID_BEGIN              0x0020
        !           185: #define        C_ID_END                0x0040
        !           186: #define        C_ID_BECOMES            0x0080
        !           187: 
        !           188: /*
        !           189:  *     A switch label ref cnode does not live in the list.
        !           190:  *     It is on the label ref list and has c_flags & C_SWITCH
        !           191:  *     Its c_label points to the abel itself and its c_switch
        !           192:  *     points to the switch.
        !           193:  */
        !           194: #define        C_SWITCH                0x0100
        !           195: 
        !           196: #define        LABIS_NORMAL            0x1000
        !           197: #define        LABIS_PRECIOUS          0x2000
        !           198: 
        !           199: struct cfrag
        !           200: {
        !           201:        union
        !           202:        {
        !           203:                cnode   *c_cn;
        !           204:                cfrag   *c_cf;
        !           205:        }
        !           206:                c_un;
        !           207:        cnode   *c_tail;
        !           208: };
        !           209: #define        c_head  c_un.c_cn
        !           210: #define        k_next  c_un.c_cf
        !           211: 
        !           212: typedef set cnodes     cnset;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.