Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995298
lambdas.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, 1:53 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Thu, Jul 9, 1:53 AM (7 h, 4 m)
Engine
blob
Format
Raw Data
Handle
271536
Attached To
rXR Xreate
lambdas.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/.
*
* File: lambdas.h
* Author: pgess <v.melnychenko@xreate.org>
*
* Created in April, 2020
*/
#ifndef XREATE_LAMBDAS_H
#define XREATE_LAMBDAS_H
#include "pass/compilepass.h"
namespace llvm {
class Function;
}
namespace xreate { namespace compilation {
class LambdaBruteFn: public IBruteFunction {
public:
LambdaBruteFn(CodeScope* entry, CompilePass* p, const std::string& hintAlias)
: IBruteFunction(entry, p), __hintAlias(hintAlias) {
IBruteFunction::isLambda = true;
}
virtual std::string prepareName() override;
protected:
virtual std::vector<llvm::Type*> prepareSignature() override;
virtual llvm::Function::arg_iterator prepareBindings() override;
virtual llvm::Type* prepareResult() override;
virtual void applyAttributes() override;
private:
std::string __hintAlias;
static unsigned __counter;
};
class LambdaIR{
public:
LambdaIR(CompilePass* p): __pass(p){}
llvm::Function* compile(CodeScope* body, const std::string& hintAlias);
private:
compilation::Context __context;
CompilePass* __pass;
};
}}
#endif //XREATE_LAMBDAS_H
Event Timeline
Log In to Comment