C:/Users/Dennis/src/lang/russell.orig/src/pass5c/analyze.c File Reference

#include "parm.h"
#include <stdio.h>
#include "stree/ststructs.mh"
#include "codeutil.h"
#include "pass3/is_local.h"

Go to the source code of this file.

Data Structures

struct  cf
struct  fcs

Defines

#define DEBUG
#define VERBOSE
#define RELEVANT   (NO_SL | NO_PUT | NO_CALLCC | NO_CONSTR)
#define IFVERBOSE(x)
#define setup(p)   get_complexity(p, TRUE)
#define IS_PRIMITIVE   1
#define IS_PUT   2
#define IS_CALLCC   4
#define SIMPLE   (NO_SL | NO_PUT | NO_CALLCC | NO_CONSTR)

Functions

boolean is_selected_id (NODE *p)
void solve ()
void print_fcs ()
void free_fcs ()
 analyze (NODE *p)
boolean calls_put (NODE *p)
boolean calls_callcc (NODE *p)
struct fcsnew_fc (NODE *p)
void add_call (struct fcs *p, NODE *q)
boolean reeval (struct fcs *p)
boolean wl_has_comp (NODE *wl, NODE *id)
NODEget_type_def (NODE *t, NODE *id)
int is_primitive (NODE *p)
long get_complexity (NODE *p, boolean initial)

Variables

FILE * unparse_file
boolean Gflag
boolean Vflag
boolean Oflag
boolean hflag
boolean Fflag
boolean Nflag
boolean finished_accessible
struct fcsall_fcs
struct fcsall_fcs_tail
NODEwhole_program
NODEouter_fc = NIL
struct fcscurrent_fcs


Define Documentation

#define DEBUG

Definition at line 1 of file analyze.c.

#define IFVERBOSE (  ) 

Definition at line 35 of file analyze.c.

#define IS_CALLCC   4

Definition at line 396 of file analyze.c.

Referenced by get_complexity(), and is_primitive().

#define IS_PRIMITIVE   1

Definition at line 394 of file analyze.c.

Referenced by get_complexity(), and is_primitive().

#define IS_PUT   2

Definition at line 395 of file analyze.c.

Referenced by get_complexity(), and is_primitive().

#define RELEVANT   (NO_SL | NO_PUT | NO_CALLCC | NO_CONSTR)

Definition at line 30 of file analyze.c.

Referenced by reeval().

#define setup (  )     get_complexity(p, TRUE)

Definition at line 53 of file analyze.c.

Referenced by analyze().

#define SIMPLE   (NO_SL | NO_PUT | NO_CALLCC | NO_CONSTR)

Referenced by get_complexity().

#define VERBOSE

Definition at line 3 of file analyze.c.


Function Documentation

void add_call ( struct fcs p,
NODE q 
)

Definition at line 157 of file analyze.c.

References cf::cf_fc, cf::cf_next, and malloc.

Referenced by get_complexity().

analyze ( NODE p  ) 

Definition at line 93 of file analyze.c.

References all_fcs, all_fcs_tail, free_fcs(), NIL, print_fcs(), setup, solve(), Vflag, and whole_program.

Referenced by Ggeneratecode(), Ggeneratepcode(), GgenerateXcode(), Vgeneratecode(), and Vgeneratepcode().

boolean calls_callcc ( NODE p  ) 

Definition at line 126 of file analyze.c.

References FALSE, get_complexity(), and Nflag.

Referenced by bld_analyze().

boolean calls_put ( NODE p  ) 

Definition at line 119 of file analyze.c.

References FALSE, and get_complexity().

Referenced by accessible(), eval_decl(), Gappl(), Garg_expression(), Gexpression(), Gheap_expression(), Vappl(), and Vexpression().

void free_fcs (  ) 

Definition at line 245 of file analyze.c.

References all_fcs, cf::cf_next, fcs::fcs_called, free, and NIL.

Referenced by analyze().

long get_complexity ( NODE p,
boolean  initial 
)

Definition at line 522 of file analyze.c.

References add_call(), ASSERT, fcs::fcs_fc, Fflag, finished_accessible, getname(), Gflag, IS_CALLCC, is_descendant, is_id(), is_int_const(), is_local, IS_PRIMITIVE, is_primitive(), IS_PUT, is_selected_id(), NIL, Oflag, outer_fc, SIMPLE, TRUE, unparse(), unparse_file, and v.

Referenced by calls_callcc(), and calls_put().

NODE* get_type_def ( NODE t,
NODE id 
)

Definition at line 295 of file analyze.c.

References NIL, unparse(), unparse_file, and wl_has_comp().

Referenced by is_primitive().

int is_primitive ( NODE p  ) 

Definition at line 397 of file analyze.c.

References dbgmsg, get_type_def(), indx_put, IS_CALLCC, IS_PRIMITIVE, IS_PUT, NIL, and whole_program.

Referenced by get_complexity().

boolean is_selected_id ( NODE p  ) 

Definition at line 41 of file analyze.c.

References FALSE, NIL, and TRUE.

Referenced by get_complexity().

struct fcs* new_fc ( NODE p  )  [read]

Definition at line 138 of file analyze.c.

References all_fcs, all_fcs_tail, fcs::fcs_called, fcs::fcs_fc, fcs::fcs_next, malloc, and NIL.

void print_fcs (  ) 

Definition at line 209 of file analyze.c.

References all_fcs, cf::cf_fc, cf::cf_next, Gflag, and NIL.

Referenced by analyze().

boolean reeval ( struct fcs p  ) 

Definition at line 170 of file analyze.c.

References cf::cf_fc, cf::cf_next, finished_accessible, Gflag, NIL, and RELEVANT.

Referenced by solve().

void solve (  ) 

Definition at line 194 of file analyze.c.

References all_fcs, FALSE, fcs::fcs_next, NIL, reeval(), and TRUE.

Referenced by analyze().

boolean wl_has_comp ( NODE wl,
NODE id 
)

Definition at line 273 of file analyze.c.

References FALSE, IFVERBOSE, and TRUE.

Referenced by get_type_def().


Variable Documentation

struct fcs * all_fcs

Referenced by analyze(), free_fcs(), new_fc(), print_fcs(), and solve().

struct fcs * all_fcs_tail

Referenced by analyze(), and new_fc().

struct fcs* current_fcs

Definition at line 270 of file analyze.c.

boolean Fflag

Definition at line 133 of file main.c.

boolean finished_accessible

Definition at line 131 of file codegen.c.

Referenced by get_complexity(), Ggeneratecode(), Ggeneratepcode(), GgenerateXcode(), and reeval().

boolean Gflag

Definition at line 7 of file extract_sig.c.

boolean hflag

Definition at line 140 of file main.c.

boolean Nflag

Definition at line 131 of file main.c.

boolean Oflag

Definition at line 135 of file main.c.

NODE* outer_fc = NIL

Definition at line 84 of file analyze.c.

Referenced by get_complexity().

FILE* unparse_file

Definition at line 6 of file unparse.c.

boolean Vflag

Definition at line 6 of file extract_sig.c.

NODE* whole_program

Definition at line 82 of file analyze.c.

Referenced by analyze(), and is_primitive().


Generated on Fri Jan 25 10:39:50 2008 for russell by  doxygen 1.5.4