Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F4000205
cfapass.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, 3:43 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Jul 11, 3:43 AM (1 d, 5 h)
Engine
blob
Format
Raw Data
Handle
272366
Attached To
rXR Xreate
cfapass.h
View Options
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Author: pgess <v.melnychenko@xreate.org>
*
* cfapass.cpp
* Control Flow Graph building pass
*/
#ifndef CFGPASS_H
#define CFGPASS_H
#include "xreatemanager.h"
#include "transcendlayer.h"
#include "abstractpass.h"
#include "analysis/cfagraph.h"
namespace xreate{namespace cfa {
class CFAGraph;
/** \brief %CFA(Control Flow Analysis) implementation */
class CFAPass : public AbstractPass<void>{
public:
void process(ManagedFnPtr function) override;
void processFnCall(ManagedFnPtr function, PassContext context) override;
void processFnCallUncertain(const std::string& calleeName, const std::list<ManagedFnPtr>& candidates, PassContext context) override;
void process(CodeScope* scope, PassContext context, const std::string& hintBlockDecl="") override;
void process(const Expression& expression, PassContext context, const std::string& varDecl="") override;
CFAPass(PassManager* manager);
void finish() override;
void run() override;
const CFAGraph* getReport() const {return __context.graph; }
protected:
struct {
CFAGraph* graph;
} __context;
std::multimap<Operator, Expression> __signatures; //CFA data for particular operators
void initSignatures();
};
}} //end of namespace xreate::cfa
#endif // CFGPASS_H
Event Timeline
Log In to Comment