Uc_function Class Reference

#include <ucfun.h>

Collaboration diagram for Uc_function:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Intrinsic_type { bg, si }

Public Member Functions

 Uc_function (Uc_function_symbol *p)
 ~Uc_function ()
void set_statement (Uc_statement *s)
void adjust_reloffset (int diff)
int get_reloffset () const
void push_scope ()
void pop_scope ()
Uc_symbolsearch (char *nm)
Uc_symbolsearch_up (char *nm)
Uc_var_symboladd_symbol (char *nm)
void add_static (char *nm)
int add_function_symbol (Uc_function_symbol *fun)
Uc_symboladd_string_symbol (char *nm, char *text)
Uc_symboladd_int_const_symbol (char *nm, int value)
int add_string (char *text)
int find_string_prefix (Uc_location &loc, const char *text)
void add_label (Uc_label *l)
Uc_labelsearch_label (char *nm)
void start_breakable (Uc_statement *s)
void end_breakable (Uc_statement *s, vector< char > &stmt_code)
void add_break (int op_offset)
int link (Uc_function_symbol *fun)
void link_labels (std::vector< char > &code)
void gen (std::ostream &out)

Static Public Member Functions

static void set_intrinsics (Intrinsic_type ty)
static Uc_intrinsic_symbolget_intrinsic (int i)
static Uc_intrinsic_symbolget_add_answer ()
static Uc_intrinsic_symbolget_remove_answer ()
static Uc_intrinsic_symbolget_push_answers ()
static Uc_intrinsic_symbolget_pop_answers ()
static Uc_intrinsic_symbolget_show_face ()
static Uc_intrinsic_symbolget_remove_face ()
static bool is_dup (Uc_scope *scope, char *nm)
static int add_global_function_symbol (Uc_function_symbol *fun)
static Uc_symboladd_global_int_const_symbol (char *nm, int val)
static void add_global_static (char *nm)

Private Attributes

Uc_scope top
Uc_function_symbolproto
Uc_scopecur_scope
int num_parms
int num_locals
int num_statics
vector< Uc_statement * > breakables
vector< int > breaks
std::vector< Uc_function_symbol * > links
std::map< std::string, Uc_label * > labels
char * text_data
int text_data_size
std::map< std::string, int > text_map
Uc_statementstatement
int reloffset

Static Private Attributes

static Uc_scope globals
static vector< Uc_intrinsic_symbol * > intrinsics
static int add_answer
static int remove_answer
static int push_answers
static int pop_answers
static int show_face
static int remove_face
static int num_global_statics

Detailed Description

Definition at line 40 of file ucfun.h.


Member Enumeration Documentation

enum Uc_function::Intrinsic_type

Enumerator:
bg 
si 

Definition at line 74 of file ucfun.h.


Constructor & Destructor Documentation

Uc_function::Uc_function ( Uc_function_symbol p  ) 

Definition at line 52 of file ucfun.cc.

References Uc_location::yyerror().

Here is the call graph for this function:

Uc_function::~Uc_function (  ) 

Definition at line 83 of file ucfun.cc.

References labels.


Member Function Documentation

void Uc_function::set_intrinsics ( Intrinsic_type  ty  )  [static]

Definition at line 1089 of file ucfun.cc.

Referenced by main().

void Uc_function::set_statement ( Uc_statement s  )  [inline]

Definition at line 80 of file ucfun.h.

References s, and statement.

Referenced by yyparse().

void Uc_function::adjust_reloffset ( int  diff  )  [inline]

Definition at line 82 of file ucfun.h.

References reloffset.

int Uc_function::get_reloffset (  )  const [inline]

Definition at line 83 of file ucfun.h.

References reloffset.

void Uc_function::push_scope (  )  [inline]

Definition at line 84 of file ucfun.h.

References Uc_scope::add_scope(), and cur_scope.

Referenced by yyparse().

Here is the call graph for this function:

void Uc_function::pop_scope (  )  [inline]

Definition at line 86 of file ucfun.h.

References cur_scope, and Uc_scope::get_parent().

Referenced by yyparse().

Here is the call graph for this function:

Uc_symbol* Uc_function::search ( char *  nm  )  [inline]

Definition at line 90 of file ucfun.h.

References cur_scope, and Uc_scope::search().

Here is the call graph for this function:

Uc_symbol* Uc_function::search_up ( char *  nm  )  [inline]

Definition at line 92 of file ucfun.h.

References cur_scope, globals, Uc_scope::search(), and Uc_scope::search_up().

Referenced by yyparse().

Here is the call graph for this function:

static Uc_intrinsic_symbol* Uc_function::get_intrinsic ( int  i  )  [inline, static]

Definition at line 97 of file ucfun.h.

References intrinsics.

Referenced by get_add_answer(), get_pop_answers(), get_push_answers(), get_remove_answer(), get_remove_face(), get_show_face(), and yyparse().

static Uc_intrinsic_symbol* Uc_function::get_add_answer (  )  [inline, static]

Definition at line 99 of file ucfun.h.

References add_answer, and get_intrinsic().

Referenced by yyparse().

Here is the call graph for this function:

static Uc_intrinsic_symbol* Uc_function::get_remove_answer (  )  [inline, static]

Definition at line 101 of file ucfun.h.

References get_intrinsic(), and remove_answer.

Referenced by yyparse().

Here is the call graph for this function:

static Uc_intrinsic_symbol* Uc_function::get_push_answers (  )  [inline, static]

Definition at line 103 of file ucfun.h.

References get_intrinsic(), and push_answers.

Here is the call graph for this function:

static Uc_intrinsic_symbol* Uc_function::get_pop_answers (  )  [inline, static]

Definition at line 105 of file ucfun.h.

References get_intrinsic(), and pop_answers.

Here is the call graph for this function:

static Uc_intrinsic_symbol* Uc_function::get_show_face (  )  [inline, static]

Definition at line 107 of file ucfun.h.

References get_intrinsic(), and show_face.

Referenced by yyparse().

Here is the call graph for this function:

static Uc_intrinsic_symbol* Uc_function::get_remove_face (  )  [inline, static]

Definition at line 109 of file ucfun.h.

References get_intrinsic(), and remove_face.

Referenced by yyparse().

Here is the call graph for this function:

bool Uc_function::is_dup ( Uc_scope scope,
char *  nm 
) [static]

Definition at line 101 of file ucfun.cc.

References Uc_scope::search(), and Uc_location::yyerror().

Here is the call graph for this function:

Uc_var_symbol * Uc_function::add_symbol ( char *  nm  ) 

Definition at line 139 of file ucfun.cc.

Referenced by Uc_arrayloop_statement::finish(), Uc_expression::need_var(), and yyparse().

void Uc_function::add_static ( char *  nm  ) 

Definition at line 156 of file ucfun.cc.

Referenced by yyparse().

int Uc_function::add_function_symbol ( Uc_function_symbol fun  )  [inline]

Definition at line 115 of file ucfun.h.

References Uc_scope::add_function_symbol(), and cur_scope.

Referenced by yyparse().

Here is the call graph for this function:

static int Uc_function::add_global_function_symbol ( Uc_function_symbol fun  )  [inline, static]

Definition at line 117 of file ucfun.h.

References Uc_scope::add_function_symbol(), and globals.

Referenced by yyparse().

Here is the call graph for this function:

Uc_symbol * Uc_function::add_string_symbol ( char *  nm,
char *  text 
)

Definition at line 172 of file ucfun.cc.

Referenced by yyparse().

Uc_symbol * Uc_function::add_int_const_symbol ( char *  nm,
int  value 
)

Definition at line 192 of file ucfun.cc.

Referenced by yyparse().

Uc_symbol * Uc_function::add_global_int_const_symbol ( char *  nm,
int  val 
) [static]

Definition at line 212 of file ucfun.cc.

Referenced by yyparse().

void Uc_function::add_global_static ( char *  nm  )  [static]

Definition at line 230 of file ucfun.cc.

Referenced by yyparse().

int Uc_function::add_string ( char *  text  ) 

Definition at line 250 of file ucfun.cc.

References offset.

Referenced by yyparse().

int Uc_function::find_string_prefix ( Uc_location loc,
const char *  text 
)

Definition at line 280 of file ucfun.cc.

References Uc_location::error(), and len.

Referenced by Uc_string_prefix_expression::get_string_offset().

Here is the call graph for this function:

void Uc_function::add_label ( Uc_label l  )  [inline]

Definition at line 128 of file ucfun.h.

References Uc_label::get_name(), and labels.

Referenced by yyparse().

Here is the call graph for this function:

Uc_label * Uc_function::search_label ( char *  nm  ) 

Definition at line 123 of file ucfun.cc.

References labels.

Referenced by yyparse().

void Uc_function::start_breakable ( Uc_statement s  ) 

Definition at line 317 of file ucfun.cc.

References s.

void Uc_function::end_breakable ( Uc_statement s,
vector< char > &  stmt_code 
)

Definition at line 330 of file ucfun.cc.

References s, and Write2().

Here is the call graph for this function:

void Uc_function::add_break ( int  op_offset  ) 

Definition at line 360 of file ucfun.cc.

References Uc_location::yyerror().

Here is the call graph for this function:

int Uc_function::link ( Uc_function_symbol fun  ) 

Definition at line 378 of file ucfun.cc.

References offset.

Referenced by Uc_function_symbol::gen_call().

void Uc_function::link_labels ( std::vector< char > &  code  ) 

void Uc_function::gen ( std::ostream &  out  ) 

Definition at line 414 of file ucfun.cc.

References UC_RET, and Write2().

Here is the call graph for this function:


Member Data Documentation

Uc_scope Uc_function::globals [static, private]

Definition at line 42 of file ucfun.h.

Referenced by add_global_function_symbol(), and search_up().

vector< Uc_intrinsic_symbol * > Uc_function::intrinsics [static, private]

Definition at line 44 of file ucfun.h.

Referenced by get_intrinsic().

int Uc_function::add_answer [static, private]

Definition at line 46 of file ucfun.h.

Referenced by get_add_answer().

int Uc_function::remove_answer [static, private]

Definition at line 46 of file ucfun.h.

Referenced by get_remove_answer().

int Uc_function::push_answers [static, private]

Definition at line 46 of file ucfun.h.

Referenced by get_push_answers().

int Uc_function::pop_answers [static, private]

Definition at line 46 of file ucfun.h.

Referenced by get_pop_answers().

int Uc_function::show_face [static, private]

Definition at line 46 of file ucfun.h.

Referenced by get_show_face().

int Uc_function::remove_face [static, private]

Definition at line 46 of file ucfun.h.

Referenced by get_remove_face().

int Uc_function::num_global_statics [static, private]

Definition at line 48 of file ucfun.h.

Uc_scope Uc_function::top [private]

Definition at line 49 of file ucfun.h.

Uc_function_symbol* Uc_function::proto [private]

Definition at line 50 of file ucfun.h.

Uc_scope* Uc_function::cur_scope [private]

Definition at line 51 of file ucfun.h.

Referenced by add_function_symbol(), pop_scope(), push_scope(), search(), and search_up().

int Uc_function::num_parms [private]

Definition at line 52 of file ucfun.h.

int Uc_function::num_locals [private]

Definition at line 53 of file ucfun.h.

int Uc_function::num_statics [private]

Definition at line 54 of file ucfun.h.

vector<Uc_statement *> Uc_function::breakables [private]

Definition at line 57 of file ucfun.h.

vector<int> Uc_function::breaks [private]

Definition at line 58 of file ucfun.h.

std::vector<Uc_function_symbol *> Uc_function::links [private]

Definition at line 62 of file ucfun.h.

std::map<std::string, Uc_label *> Uc_function::labels [private]

Definition at line 63 of file ucfun.h.

Referenced by add_label(), and search_label().

char* Uc_function::text_data [private]

Definition at line 64 of file ucfun.h.

int Uc_function::text_data_size [private]

Definition at line 65 of file ucfun.h.

std::map<std::string, int> Uc_function::text_map [private]

Definition at line 67 of file ucfun.h.

Uc_statement* Uc_function::statement [private]

Definition at line 68 of file ucfun.h.

Referenced by set_statement().

int Uc_function::reloffset [private]

Definition at line 70 of file ucfun.h.

Referenced by adjust_reloffset(), and get_reloffset().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 15:04:41 2007 for ExultEngine by  doxygen 1.5.1