SSA.cxx File Reference

#include <stdint.h>
#include <stdlib.h>
#include <dirent.h>
#include <fstream>
#include <iostream>
#include <string>
#include "AST.hxx"
#include "Environment.hxx"
#include "Unify.hxx"
#include "inter-pass.hxx"
#include "Special.hxx"
#include "Instantiate.hxx"
#include "BUILD/TransitionParser.hxx"

Go to the source code of this file.

Defines

#define SETGL(exp, gl)
#define SSA(errStream, uoc, ast, grandLet, identList,parent, chno,flags)

Functions

static shared_ptr< ASTnewGrandLet (shared_ptr< AST > ref)
static shared_ptr< ASTgetLastLB (shared_ptr< AST > grandLet)
static void addIL (shared_ptr< AST > identList, shared_ptr< AST > id)
 Add identifier to per-proc identifier list.
static shared_ptr< ASTUseCase (shared_ptr< AST > ast)
static shared_ptr< ASTaddLB (shared_ptr< AST > grandLet, shared_ptr< AST > identList, shared_ptr< AST > ast, AstFlags lbFlags=NO_FLAGS, shared_ptr< AST > id=GC_NULL, bool addToIL=true)
bool isTrivialInit (shared_ptr< AST > ast)
bool ssa (std::ostream &errStream, shared_ptr< UocInfo > uoc, shared_ptr< AST > ast, shared_ptr< AST > grandLet, shared_ptr< AST > identList, shared_ptr< AST > parent, const size_t chno, unsigned long flags)


Define Documentation

#define SETGL ( exp,
gl   ) 

Value:

do {                                     \
    if ((gl)->child(0)->children.size())   \
      (exp) = (gl);                        \
    else                                   \
      (exp) = FEXPR(gl);                   \
  } while (0)

Definition at line 151 of file SSA.cxx.

Referenced by ssa().

#define SSA ( errStream,
uoc,
ast,
grandLet,
identList,
parent,
chno,
flags   ) 

Value:

do {                                                     \
    answer = ssa((errStream), (uoc), (ast), (grandLet),    \
                 (identList), (parent), (chno), (flags));  \
    if (answer == false)                                   \
      errorFree = false;                                   \
  } while (0)

Definition at line 161 of file SSA.cxx.

Referenced by ssa().


Function Documentation

static void addIL ( shared_ptr< AST identList,
shared_ptr< AST id 
) [static]

Add identifier to per-proc identifier list.

This is used so that we can later declare all local identifiers at top of procedure, C-style.

Definition at line 79 of file SSA.cxx.

Referenced by addLB(), and ssa().

static shared_ptr<AST> addLB ( shared_ptr< AST grandLet,
shared_ptr< AST identList,
shared_ptr< AST ast,
AstFlags  lbFlags = NO_FLAGS,
shared_ptr< AST id = GC_NULL,
bool  addToIL = true 
) [static]

Definition at line 101 of file SSA.cxx.

References addIL(), at_identPattern, at_letbinding, AST::genSym(), AST::make(), and UseCase().

Referenced by ssa().

static shared_ptr<AST> getLastLB ( shared_ptr< AST grandLet  )  [inline, static]

Definition at line 68 of file SSA.cxx.

References lbs.

bool isTrivialInit ( shared_ptr< AST ast  ) 

Definition at line 171 of file SSA.cxx.

References at_begin, at_boolLiteral, at_charLiteral, at_floatLiteral, at_ident, at_intLiteral, at_lambda, at_stringLiteral, at_typeAnnotation, and at_unit.

Referenced by FixDefs(), isTrivialInit(), and ssa().

static shared_ptr<AST> newGrandLet ( shared_ptr< AST ref  )  [inline, static]

Definition at line 57 of file SSA.cxx.

References at_ident, at_letbindings, at_letStar, lbs, and AST::make().

Referenced by ssa().

bool ssa ( std::ostream &  errStream,
shared_ptr< UocInfo uoc,
shared_ptr< AST ast,
shared_ptr< AST grandLet,
shared_ptr< AST identList,
shared_ptr< AST parent,
const size_t  chno,
unsigned long  flags 
)

Definition at line 211 of file SSA.cxx.

References addIL(), addLB(), agt_category, agt_CompilationUnit, agt_definition, agt_eform, agt_expr, agt_expr_or_define, agt_fielditem, agt_if_definition, agt_literal, agt_openclosed, agt_ow, agt_qtype, agt_tc_definition, agt_tvar, agt_type, agt_type_definition, agt_ucon, agt_uselhs, agt_value_definition, agt_var, assert(), at_allocREF, at_and, at_AnyGroup, at_apply, at_argVec, at_array, at_array_nth, at_array_ref_nth, at_arrayRefType, at_arrayType, at_begin, at_bitfieldType, at_bitsizeof, at_boolLiteral, at_boxedCat, at_boxedType, at_byRefType, at_charLiteral, at_cond, at_cond_leg, at_cond_legs, at_condelse, at_constraints, at_constructor, at_constructors, at_constType, at_container, at_copyREF, at_declare, at_declares, at_declrepr, at_declstruct, at_declunion, at_defexception, at_define, at_definstance, at_defrepr, at_defstruct, at_deftypeclass, at_defunion, at_deref, at_docString, at_dummyType, at_dup, at_exceptionType, at_field, at_fields, at_fieldType, at_fill, at_floatLiteral, at_fn, at_fnargVec, at_fqCtr, at_frameBindings, at_ident, at_identList, at_identPattern, at_if, at_ifident, at_ifsel, at_import, at_importAs, at_inner_ref, at_interface, at_intLiteral, at_labeledBlock, at_lambda, at_let, at_letbinding, at_letbindings, at_letGather, at_letrec, at_letStar, at_localFrame, at_loop, at_loopbinding, at_loopbindings, at_looptest, at_MakeVector, at_methdecl, at_method_decl, at_method_decls, at_methType, at_mkArrayRef, at_mkClosure, at_module, at_mutableType, at_nth, at_Null, at_object_apply, at_oc_closed, at_oc_open, at_opaqueCat, at_or, at_otherwise, at_primaryType, at_proclaim, at_provide, at_qualType, at_recdef, at_reprctr, at_reprctrs, at_reprrepr, at_return_from, at_sel_ctr, at_select, at_setbang, at_setClosure, at_sizeof, at_stringLiteral, at_struct_apply, at_suspend, at_tcapp, at_tcdecls, at_tcmethod_binding, at_tcmethods, at_throw, at_try, at_tvlist, at_tyfn, at_typeAnnotation, at_typeapp, at_ucon_apply, at_unboxedCat, at_unboxedType, at_unit, at_unless, at_usesel, at_usw_leg, at_usw_legs, at_uswitch, at_vector, at_vector_nth, at_vectorType, at_when, COMP_BYREF, DEF_IS_TRIVIAL_INIT, FEXPR, boost::GC_NULL, AST::genSym(), ID_IS_GENSYM, ID_IS_GLOBAL, id_value, idc_ctor, INNER_REF_NDX, InstMangle(), isTrivialInit(), LB_IS_DUMMY, LB_POSTPONED, lbs, Type::make(), AST::make(), newGrandLet(), NO_FLAGS, ow, SELF_TAIL, SETGL, SSA, and UseCase().

static shared_ptr<AST> UseCase ( shared_ptr< AST ast  )  [inline, static]

Definition at line 88 of file SSA.cxx.

References at_ident.

Referenced by addLB(), and ssa().


Generated on Thu May 17 23:59:16 2012 for BitC Compiler by  doxygen 1.4.7