Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F4000335
passmanager.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 9, 4:03 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Jul 11, 4:03 AM (1 d, 5 h)
Engine
blob
Format
Raw Data
Handle
272703
Attached To
rXR Xreate
passmanager.h
View Options
#ifndef PASSMANAGER_H
#define PASSMANAGER_H
#include <string>
#include <map>
//stdio external
struct _IO_FILE;
typedef struct _IO_FILE FILE;
class Scanner;
namespace xreate {
class AbstractPassBase;
class ClaspLayer;
class LLVMLayer;
class AST;
enum class PassId {
CFGPass,
CompilePass,
DFGPass,
EnvironmentTestsPass,
LoggerPass,
AdhocPass,
RulesPass,
InterpretationPass
};
class PassManager
{
public:
~PassManager();
void*run();
void runWithoutCompilation();
void executePasses();
void registerPass(AbstractPassBase* pass, const PassId& id, AbstractPassBase* prerequisite=nullptr);
AbstractPassBase* getPassById(const PassId& id);
bool isPassRegistered(const PassId& id);
static PassManager* prepareForCode(std::string&& code);
static PassManager* prepareForCode(FILE* code);
ClaspLayer* clasp;
LLVMLayer* llvm;
AST* root;
private:
//typedef std::multimap<PassFilter, ASTPass*> FILTERS_STORAGE;
//FILTERS_STORAGE __filters;
std::map<PassId, AbstractPassBase*> __passes;
std::multimap<AbstractPassBase*, AbstractPassBase*> __passDependencies;
bool flagIsProcessed = false;
static PassManager* prepareForCode(Scanner* code);
}; }
#endif
Event Timeline
Log In to Comment