LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
translate::Ix Class Reference

Specialization of Exp for branchings. More...

#include <exp.hh>

Inheritance diagram for translate::Ix:
Collaboration diagram for translate::Ix:

Public Member Functions

 Ix (rExp &cond, rExp &iftrue, rExp &iffalse)
virtual tree::rExp un_ex () override
 Pretend THIS was an Ex: return the expression part.
virtual tree::rStm un_nx () override
 Pretend THIS was an Nx: return the statement part.
virtual tree::rStm un_cx (const temp::Label &t_outer, const temp::Label &f_outer) override
 Pretend THIS was a Cx: return the branching such that the resulting code jump to t if the conditional is satisfied, f otherwise.
virtual std::ostream & dump (std::ostream &ostr) const override

Private Attributes

rExp cond_
rExp iftrue_
rExp iffalse_

Detailed Description

Specialization of Exp for branchings.

Constructor & Destructor Documentation

translate::Ix::Ix ( rExp cond,
rExp iftrue,
rExp iffalse 
)
inline

Member Function Documentation

std::ostream & translate::Ix::dump ( std::ostream &  ostr) const
overridevirtual

Implements translate::Exp.

References cond_, iffalse_, and iftrue_.

tree::rStm translate::Ix::un_cx ( const temp::Label t,
const temp::Label f 
)
overridevirtual

Pretend THIS was a Cx: return the branching such that the resulting code jump to t if the conditional is satisfied, f otherwise.

Implements translate::Exp.

tree::rExp translate::Ix::un_ex ( )
overridevirtual

Pretend THIS was an Ex: return the expression part.

Implements translate::Exp.

References cond_, iffalse_, and iftrue_.

tree::rStm translate::Ix::un_nx ( )
overridevirtual

Pretend THIS was an Nx: return the statement part.

Implements translate::Exp.

Member Data Documentation

rExp translate::Ix::cond_
private

Referenced by dump(), and un_ex().

rExp translate::Ix::iffalse_
private

Referenced by dump(), and un_ex().

rExp translate::Ix::iftrue_
private

Referenced by dump(), and un_ex().


The documentation for this class was generated from the following files: