⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dag.h

📁 浙江大学编译原理课程设计源代码,高等院校计算机专业
💻 H
字号:
#ifndef _DAG_H_283609239664239235_#define _DAG_H_283609239664239235_/* This file is included in common.h *//* node is defined in tree.h. */#if 0typedef struct _node *Node;/* node for dag. */struct _node{    short op;    short count;    Symbol syms[3];    Node kids[2];    Node link;    Xnode x;};#endifenum { CODE=1, BSS, DATA, LIT };typedef struct table *Table;struct table{    int level;    Table previous;    struct entry    {        symbol sym;        struct entry *link;    }    *buckets[256];    Symbol all;};typedef struct code *Code;struct code{    enum { Blockbeg, Blockend, Local, Address, Defpoint,           Label,    Start,    Gen,   Jump,    Switch         } kind;    Code prev, next;    union {        struct        {            int level;            Symbol *locals;            Table identifiers, types;            /* Env x; */        }        block;        Code begin;        Symbol var;        struct        {            Symbol sym;            Symbol base;            long offset;        }        addr;        struct        {            Coordinate src;            int point;        }        point;        Node forest;        struct        {            Symbol sym;            Symbol table;            Symbol deflab;            int size;            long *values;            Symbol *labels;        }        swtch;    } u;};void print_dags(List dags);int gen_dag(List ast_forest, List dag_forest);int emit_code(List dags);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -