Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995304
codeinstructions.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
Tue, Jul 7, 2:24 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Thu, Jul 9, 2:24 AM (11 h, 9 m)
Engine
blob
Format
Raw Data
Handle
271541
Attached To
rXR Xreate
codeinstructions.h
View Options
#ifndef CODEINSTRUCTIONS_H
#define CODEINSTRUCTIONS_H
#include "llvmlayer.h"
#include "ast.h"
#include <llvm/IR/Value.h>
namespace xreate {
class InstructionMap
{
public:
InstructionMap(const Expression& e, LLVMLayer& l);
llvm::Value* compileDefault(const std::string * const hintRetVar);
private:
LLVMLayer& llvm;
const Expression& __data;
};
class InstructionList
{
public:
InstructionList(const Expression& e, LLVMLayer& l);
llvm::Value* compileDefault(const std::string * const hintRetVar);
private:
LLVMLayer& llvm;
int __size;
const Expression& __data;
};
template<Operator Instruction>
struct InstructionClasses {};
template<>
struct InstructionClasses<Operator::LIST> {
typedef InstructionList base;
};
template<>
struct InstructionClasses<Operator::LOOP> {
typedef InstructionMap base;
};
template<Operator Instruction>
class CodeInstruction: public InstructionClasses<Instruction>::base
{
typedef typename InstructionClasses<Instruction>::base InstructionImpl;
public:
CodeInstruction(const Expression& e, LLVMLayer& l)
: InstructionImpl(e, l)
{}
llvm::Value* compile(const std::string * const hintRetVar)
{
InstructionImpl::compileDefault(hintRetVar);
}
};
}
#endif //CODEINSTRUCTIONS_H
Event Timeline
Log In to Comment