Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F2729478
dfapass.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
Fri, Mar 13, 2:21 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Sun, Mar 15, 2:21 AM (12 h, 20 m)
Engine
blob
Format
Raw Data
Handle
243027
Attached To
rXR Xreate
dfapass.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>
*
* dfapass.h
* Data Flow Graph building pass
*/
#ifndef DFGPASS_H
#define DFGPASS_H
#include "abstractpass.h"
#include "analysis/dfagraph.h"
namespace xreate {
class TranscendLayer;
}
namespace xreate { namespace dfa {
struct ProcessingCache {
std::vector<SymbolNode> operands;
std::vector<SymbolNode> blocks;
};
/** \brief Data Flow Analysis Pass(%DFA) */
class DFAPass: public AbstractPass<SymbolNode> {
public:
DFAPass(PassManager* manager);
protected:
virtual void processAnnotations(const Expression& expression, PassContext context, const SymbolNode& ident);
virtual SymbolNode process(const Expression& expression, PassContext context, const std::string& varDecl="") override;
virtual SymbolNode process(CodeScope* scope, PassContext context, const std::string& hintBlockDecl="") override;
virtual SymbolNode process(ManagedFnPtr function) override;
void init();
void finish() override;
DFAGraph* graph;
TranscendLayer* transcend;
private:
void processCallInstance(const Expression& expr, PassContext context, const SymbolNode& result);
void processDependencies(const SymbolNode& node, const Expression& expression, PassContext context, ProcessingCache& cache);
};
}} //end of xreate::dfa namespace
#endif
Event Timeline
Log In to Comment