Annotation of researchv10no/cmd/cfront/optcfront/tree_dump.h, revision 1.1

1.1     ! root        1: /* ident "@(#)ctrans:src/tree_dump.h   1.2" */
        !             2: /* -*- Mode: C -*- Begin tree_dump.h */
        !             3: 
        !             4: #ifndef _DUMP_TREE
        !             5: #define _DUMP_TREE
        !             6: 
        !             7: #include "tree_walk.h"
        !             8: #include <iostream.h>
        !             9: #include "hash.h"
        !            10: 
        !            11: enum dump_tree_verbosity {
        !            12:     dt_brief = 1,              /* minimal identification */
        !            13:     dt_normal = 2,             /* all data, outpointers Brief (one level) */
        !            14:     dt_recursive_0 = 3,                /* minimal, but recurse down.
        !            15:                                   (outpointers Recursive_0) */
        !            16:     dt_recursive_1 = 4,                /* all data, outpointers Recursive_2. */
        !            17: };
        !            18: 
        !            19: class dcn_arg {
        !            20:   public:
        !            21:     int version;
        !            22:     dump_tree_verbosity verbose;
        !            23:     tree_fetch_proc fetcher;
        !            24:     void * fetcher_info;
        !            25:     ostream* output_stream;
        !            26:     ostream* error_stream;
        !            27:     int max_depth;
        !            28:     Hash * nodes_seen_hash;
        !            29:     /* end of version 1 */
        !            30:     int walk_tables;
        !            31:     /* end of version 2 */
        !            32:     int stop_at_top;
        !            33:     dcn_arg () { version = 2; 
        !            34:                 nodes_seen_hash = 0;
        !            35:                 fetcher = null_tfp; 
        !            36:                 output_stream = &cout;
        !            37:                 error_stream = &cerr; 
        !            38:                 max_depth = -1;
        !            39:                 walk_tables = 1;
        !            40:                 stop_at_top = 0;
        !            41:             };
        !            42: };
        !            43: 
        !            44: 
        !            45: extern "C" {
        !            46:     void display_cfront_node (dcn_arg&, Pnode);
        !            47: }
        !            48: #else
        !            49: 
        !            50: typedef enum dump_tree_verbosity {
        !            51:     dt_brief = 1,              /* minimal identification */
        !            52:     dt_normal = 2,             /* all data, outpointers Brief (one level) */
        !            53:     dt_recursive_0 = 3,                /* minimal, but recurse down.
        !            54:                                   (outpointers Recursive_0) */
        !            55:     dt_recursive_1 = 4,                /* all data, outpointers Recursive_2. */
        !            56: } dump_tree_verbosity;
        !            57: 
        !            58: struct dcn_arg {
        !            59:     int version;               /* must be 1 for now. */
        !            60:     dump_tree_verbosity verbose;
        !            61:     int (*fetcher) ();
        !            62:     void * fetcher_info;
        !            63:     void * output_stream;      /* these are c++ streams */
        !            64:     void * error_stream;
        !            65:     int max_depth;
        !            66:     void * nodes_seen_hash;
        !            67:     int walk_tables;
        !            68:     int stop_at_top;
        !            69: };
        !            70: 
        !            71: void display_cfront_node ();
        !            72: #endif
        !            73: 
        !            74: /* End tree_dump.h */

unix.superglobalmegacorp.com

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