-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
661 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,6 @@ | |
|
||
#include "AST/ASTIdentifier.h" | ||
|
||
#include <string> | ||
|
||
namespace fly { | ||
|
||
class ASTVar; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
//===--------------------------------------------------------------------------------------------------------------===// | ||
// include/CodeGen/CodeGenFail.h - Code Generator of Fail | ||
// | ||
// Part of the Fly Project https://flylang.org | ||
// Under the Apache License v2.0 see LICENSE for details. | ||
// Thank you to LLVM Project https://llvm.org/ | ||
// | ||
//===--------------------------------------------------------------------------------------------------------------===// | ||
|
||
#ifndef FLY_CODEGEN_ERROR_H | ||
#define FLY_CODEGEN_ERROR_H | ||
|
||
#include "CodeGenVarBase.h" | ||
#include "llvm/IR/DerivedTypes.h" | ||
|
||
namespace fly { | ||
|
||
class CodeGenModule; | ||
class CodeGenFunctionBase; | ||
class ASTExpr; | ||
class ASTVar; | ||
|
||
class CodeGenError : public CodeGenVarBase { | ||
|
||
CodeGenModule *CGM = nullptr; | ||
|
||
ASTVar *Error = nullptr; | ||
|
||
llvm::Type *T = nullptr; | ||
|
||
llvm::Value *Pointer = nullptr; | ||
|
||
public: | ||
|
||
CodeGenError(CodeGenModule *CGM, ASTVar *Error); | ||
|
||
static llvm::StructType *GenErrorType(CodeGenModule *CGM); | ||
|
||
void Init() override; | ||
|
||
llvm::Type *getType(); | ||
|
||
llvm::StoreInst *Store(llvm::Value *Val) override; | ||
|
||
llvm::LoadInst *Load() override; | ||
|
||
llvm::Value *getValue() override; | ||
|
||
llvm::Value *getPointer() override; | ||
|
||
ASTVar *getVar() override; | ||
|
||
void Store(ASTExpr *Expr); | ||
}; | ||
} | ||
|
||
#endif //FLY_CODEGEN_ERROR_H |
Oops, something went wrong.