Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

sym_int Class Reference

#include <symmath.h>

Inheritance diagram for sym_int:

sym_int_token Object List of all members.

Public Member Functions

 sym_int ()
 ~sym_int ()
virtual bool compare_eq (sym_int_token *t)
virtual Objectduplicate ()
virtual bool evaluate (UINT *i)
virtual int nstrfy (char *buf, int n)
virtual OBJECT_ID object_id () const
virtual void simplify ()
void b_operate (b_op bop, sym_int_token *t)
bool comp_eq (sym_int_token *a, sym_int_token *b)
void set (sym_int_token *t)
void u_operate (u_op uop)
void replace (sym_int_token *token, sym_int_token *by)

Public Attributes

ht_listtokens

Protected Member Functions

void clear ()
bool simplify_reduce_const (b_op oa, sym_int_token *a, b_op ob, sym_int_token *b, b_op *res_op, sym_int_token **res_token)
sym_int_tokensimplify_reduce_destructive (b_op o, sym_int_token *x)
bool simplify_reduce_inverse (b_op oa, sym_int_token *a, b_op ob, sym_int_token *b, sym_int_token **repl)
bool simplify_reduce_neutral (b_op o, sym_int_token *x)

Constructor & Destructor Documentation

sym_int::sym_int  ) 
 

Definition at line 276 of file symmath.cc.

References tokens.

Referenced by duplicate().

sym_int::~sym_int  ) 
 

Definition at line 282 of file symmath.cc.

References ht_list::destroy(), and tokens.


Member Function Documentation

void sym_int::b_operate b_op  bop,
sym_int_token t
 

Definition at line 288 of file symmath.cc.

References ATOM_SYM_INT, ht_list::count(), ht_list::get(), ht_list::insert(), Object::object_id(), sym_int_token_rec::token, tokens, and u_null.

Referenced by srt_x86_add(), srt_x86_and(), srt_x86_cmp(), srt_x86_dec(), srt_x86_div(), srt_x86_flags_carry(), srt_x86_flags_std(), srt_x86_inc(), srt_x86_mkaddr(), srt_x86_mul(), srt_x86_or(), srt_x86_pop(), srt_x86_push(), srt_x86_shl(), srt_x86_shr(), srt_x86_sub(), srt_x86_test(), and srt_x86_xor().

void sym_int::clear  )  [protected]
 

Definition at line 301 of file symmath.cc.

References ht_list::destroy(), and tokens.

Referenced by set().

bool sym_int::comp_eq sym_int_token a,
sym_int_token b
 

Definition at line 316 of file symmath.cc.

References sym_int_token::compare_eq(), and Object::object_id().

Referenced by replace().

bool sym_int::compare_eq sym_int_token t  )  [virtual]
 

Implements sym_int_token.

Definition at line 310 of file symmath.cc.

Object * sym_int::duplicate  )  [virtual]
 

Standard Object duplicator.

Returns:
copy of object

Reimplemented from Object.

Definition at line 324 of file symmath.cc.

References Object::duplicate(), sym_int(), and tokens.

Referenced by srt_x86_add(), srt_x86_flags_carry(), srt_x86_flags_std(), srt_x86_mkreg(), and srt_x86_push().

bool sym_int::evaluate UINT i  )  [virtual]
 

Reimplemented from sym_int_token.

Definition at line 331 of file symmath.cc.

References b_add, b_and, b_div, b_invalid, b_mod, b_mul, b_or, b_sub, b_xor, sym_int_token_rec::bop, ht_list::count(), sym_int_token::evaluate(), ht_list::get(), sym_int_token_rec::token, tokens, u_minus, u_not, u_null, UINT, and sym_int_token_rec::uop.

Referenced by srt_x86_shl(), and srt_x86_shr().

int sym_int::nstrfy char *  buf,
int  n
[virtual]
 

Implements sym_int_token.

Definition at line 361 of file symmath.cc.

References b_add, b_and, b_div, b_invalid, b_mod, b_mul, b_op, b_or, b_sub, b_xor, sym_int_token_rec::bop, buf, ht_list::count(), ht_list::get(), get_op_prec(), sym_int_token::nstrfy(), sym_int_token_rec::token, tokens, u_minus, u_not, u_null, UINT, and sym_int_token_rec::uop.

OBJECT_ID sym_int::object_id  )  const [virtual]
 

Returns:
unique object id.

Reimplemented from Object.

Definition at line 413 of file symmath.cc.

References ATOM_SYM_INT.

Referenced by replace().

void sym_int::replace sym_int_token token,
sym_int_token by
 

Definition at line 418 of file symmath.cc.

References comp_eq(), ht_list::count(), Object::done(), Object::duplicate(), ht_list::get(), object_id(), Object::object_id(), sym_int_token_rec::token, and tokens.

void sym_int::set sym_int_token t  ) 
 

Definition at line 433 of file symmath.cc.

References ht_list::append(), ATOM_SYM_INT, b_invalid, sym_int_token_rec::bop, clear(), ht_list::count(), Object::done(), Object::duplicate(), ht_list::get(), ht_list::insert(), Object::object_id(), sym_int_token_rec::token, tokens, u_null, and sym_int_token_rec::uop.

Referenced by create_cpu(), and srt_x86_mkvalue().

void sym_int::simplify  )  [virtual]
 

Reimplemented from sym_int_token.

Definition at line 450 of file symmath.cc.

References b_invalid, b_op, sym_int_token_rec::bop, ht_list::count(), ht_list::del(), ht_list::del_multiple(), ht_list::get(), ht_list::insert_before(), op_commutative, ht_list::prepend(), ht_list::remove(), simplify_reduce_const(), simplify_reduce_destructive(), simplify_reduce_inverse(), simplify_reduce_neutral(), sym_int_token_rec::token, tokens, u_null, UINT, and sym_int_token_rec::uop.

bool sym_int::simplify_reduce_const b_op  oa,
sym_int_token a,
b_op  ob,
sym_int_token b,
b_op res_op,
sym_int_token **  res_token
[protected]
 

Referenced by simplify().

sym_int_token * sym_int::simplify_reduce_destructive b_op  o,
sym_int_token x
[protected]
 

Definition at line 600 of file symmath.cc.

References sym_int_token::evaluate(), op_int_int_prop::has_prop, NULL, op_destructive, UINT, op_int_int_prop::value1, op_int_int_prop::value2, and X.

Referenced by simplify().

bool sym_int::simplify_reduce_inverse b_op  oa,
sym_int_token a,
b_op  ob,
sym_int_token b,
sym_int_token **  repl
[protected]
 

Definition at line 574 of file symmath.cc.

References b_add, b_and, b_invalid, b_or, b_sub, b_xor, sym_int_token::compare_eq(), Object::duplicate(), NULL, and Object::object_id().

Referenced by simplify().

bool sym_int::simplify_reduce_neutral b_op  o,
sym_int_token x
[protected]
 

Definition at line 613 of file symmath.cc.

References sym_int_token::evaluate(), op_int_prop::has_prop, op_neutrals, UINT, and op_int_prop::value.

Referenced by simplify().

void sym_int::u_operate u_op  uop  ) 
 

Definition at line 675 of file symmath.cc.


Member Data Documentation

ht_list* sym_int::tokens
 

Definition at line 104 of file symmath.h.

Referenced by b_operate(), clear(), duplicate(), evaluate(), nstrfy(), replace(), set(), simplify(), sym_int(), and ~sym_int().


The documentation for this class was generated from the following files:
Generated on Fri May 7 21:16:10 2004 by doxygen 1.3.5