00001 /* file "dismantle_if.h" */ 00002 00003 00004 /* 00005 Copyright (c) 1998 Stanford University 00006 00007 All rights reserved. 00008 00009 This software is provided under the terms described in 00010 the "suif_copyright.h" include file. 00011 */ 00012 00013 #include <suif_copyright.h> 00014 00015 00016 #ifndef PORKY_DISMANTLE_IF_H 00017 #define PORKY_DISMANTLE_IF_H 00018 00019 #ifndef SUPPRESS_PRAGMA_INTERFACE 00020 #pragma interface 00021 #endif 00022 00023 #include <suifpasses.h> 00024 #include <module_subsystem.h> 00025 #include <suif_env.h> 00026 00027 #include <suif.h> 00028 /* 00029 This is the interface to dismantling passes of the porky 00030 library. 00031 */ 00032 00033 /* 00034 * PREREQUISITES: "Statement List Form" 00035 * "Statements Only In Statement Lists" 00036 * "Statements Only In Procedure Definitions" 00037 * "All Szots Scoped" 00038 * "Standard If Statement Semantics" 00039 * "Standard Statement List Semantics" 00040 * "Standard Branch Statement Semantics" 00041 * "Standard Jump Statement Semantics" 00042 * "Standard Label Location Statement Semantics" 00043 * "Standard If Statement Completeness" 00044 * GENERATES: "No If Statements" 00045 */ 00046 00047 class dismantle_if_statements_pass : public PipelinablePass 00048 { 00049 public: 00050 dismantle_if_statements_pass(SuifEnv *env, const LString &name); 00051 virtual ~dismantle_if_statements_pass(void) { } 00052 00053 virtual void do_procedure_definition(ProcedureDefinition *proc_def); 00054 00055 // The dismantling "Action" 00056 // This will clone anything it needs. 00057 virtual StatementList *dismantle_if_statement(IfStatement *the_if); 00058 Module *clone() const { return(Module*)this;}; 00059 }; 00060 00061 #endif /* PORKY_DISMANTLE_IF_H */