GCC Middle and Back End API Reference
tree-browser.c File Reference

Data Structures

struct  tb_command
struct  tb_tree_code
struct  tree_upper_hasher

Typedefs

typedef enum TB_Comm_code TB_CODE

Enumerations

enum  TB_Comm_code { TB_UNUSED_COMMAND }

Functions

static long TB_getline (char **, long *, FILE *)
static TB_CODE TB_get_command (char *)
static enum tree_code TB_get_tree_code (char *)
static tree find_node_with_code (tree *, int *, void *)
static tree store_child_info (tree *, int *, void *)
static void TB_update_up (tree)
static tree TB_current_chain_node (tree)
static tree TB_prev_expr (tree)
static tree TB_next_expr (tree)
static tree TB_up_expr (tree)
static tree TB_first_in_bind (tree)
static tree TB_last_in_bind (tree)
static tree TB_history_prev (void)
void browse_tree (tree)
void browse_tree ()
static tree TB_first_in_bind ()
static tree TB_last_in_bind ()
static tree TB_up_expr ()
static tree TB_prev_expr ()
static tree TB_next_expr ()
static tree TB_current_chain_node ()
static void TB_update_up ()
static TB_CODE TB_get_command ()
static enum tree_code TB_get_tree_code ()
static long TB_getline ()

Variables

static struct tb_command tb_commands []
static struct tb_tree_code tb_tree_codes []
static hash_table
< tree_upper_hasher
TB_up_ht
static vec< tree, va_gc > * TB_history_stack
static int TB_verbose = 1

Typedef Documentation

typedef enum TB_Comm_code TB_CODE

Enumeration Type Documentation

Enumerator:
TB_UNUSED_COMMAND 

Function Documentation

void browse_tree ( tree  )
FIXME: To be declared in a .h file.   
static tree find_node_with_code ( tree tp,
int *  walk_subtrees,
void *  data 
)
static
Find a node with a given code.  This function is used as an argument to
   walk_tree.   

Referenced by browse_tree().

static tree store_child_info ( tree tp,
int *  walk_subtrees,
void *  data 
)
static
For each node store in its children nodes that the current node is their
   parent.  This function is used by walk_tree.   

References hash_table< Descriptor, Allocator >::find_slot().

Referenced by TB_update_up().

static tree TB_current_chain_node ( tree  )
static

Referenced by TB_next_expr(), and TB_prev_expr().

static tree TB_current_chain_node ( )
static

References TB_up_expr().

static tree TB_first_in_bind ( tree  )
static

Referenced by browse_tree().

static tree TB_first_in_bind ( )
static
Search the first node in this BIND_EXPR.   

References TB_prev_expr().

static TB_CODE TB_get_command ( char *  )
static

Referenced by browse_tree().

static TB_CODE TB_get_command ( )
static
Parse the input string for determining the command the user asked for.   

References comp, strlen(), and TB_UNUSED_COMMAND.

static enum tree_code TB_get_tree_code ( char *  )
static

Referenced by browse_tree().

static enum tree_code TB_get_tree_code ( )
static
Parse the input string for determining the tree code.   

References comp, and strlen().

static long TB_getline ( char **  ,
long *  ,
FILE *   
)
static
Function declarations.   

Referenced by browse_tree().

static long TB_getline ( )
static
Read up to (and including) a '\n' from STREAM into *LINEPTR
   (and null-terminate it). *LINEPTR is a pointer returned from malloc
   (or NULL), pointing to *N characters of space.  It is realloc'd as
   necessary.  Returns the number of characters read (not including the
   null terminator), or -1 on error or EOF.
   This function comes from sed (and is supposed to be a portable version
   of getline).   

References copy(), errno, and len.

static tree TB_history_prev ( )
static
Returns a pointer to the last visited node.   

References last, and vec_safe_is_empty().

Referenced by browse_tree().

static tree TB_last_in_bind ( tree  )
static

Referenced by browse_tree().

static tree TB_last_in_bind ( )
static
Search the last node in this BIND_EXPR.   

References TB_next_expr().

static tree TB_next_expr ( tree  )
static

Referenced by browse_tree(), and TB_last_in_bind().

static tree TB_next_expr ( )
static
Search the next expression in this BIND_EXPR.   

References TB_current_chain_node().

static tree TB_prev_expr ( tree  )
static

Referenced by browse_tree(), and TB_first_in_bind().

static tree TB_prev_expr ( )
static
Search the previous expression in this BIND_EXPR.   

References TB_current_chain_node(), and TB_up_expr().

static tree TB_up_expr ( tree  )
static
static tree TB_up_expr ( )
static
Search the parent expression for this node.   

References hash_table< Descriptor, Allocator >::find().

static void TB_update_up ( tree  )
static

Referenced by browse_tree().

static void TB_update_up ( )
static
Update information about upper expressions in the hash table.   

References store_child_info().


Variable Documentation

struct tb_command tb_commands[]
static
Initial value:
{
#include "tree-browser.def"
}
vec<tree, va_gc>* TB_history_stack
static
struct tb_tree_code tb_tree_codes[]
static
Initial value:
{
#include "all-tree.def"
}
hash_table<tree_upper_hasher> TB_up_ht
static
Static variables.   
int TB_verbose = 1
static

Referenced by browse_tree().