Fabcoin Core  0.16.2
P2P Digital Currency
Type.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <llvm/IR/Type.h>
5 #include <llvm/IR/Constants.h>
6 #include <llvm/IR/Metadata.h>
8 
9 #include "JIT.h"
10 
11 namespace dev
12 {
13 namespace eth
14 {
15 namespace jit
16 {
17 using namespace evmjit;
18 
19 struct Type
20 {
21  static llvm::IntegerType* Word;
22  static llvm::PointerType* WordPtr;
23 
24  static llvm::IntegerType* Bool;
25  static llvm::IntegerType* Size;
26  static llvm::IntegerType* Gas;
27  static llvm::PointerType* GasPtr;
28 
29  static llvm::IntegerType* Byte;
30  static llvm::PointerType* BytePtr;
31 
32  static llvm::Type* Void;
33 
35  static llvm::IntegerType* MainReturn;
36 
37  static llvm::PointerType* EnvPtr;
38  static llvm::PointerType* RuntimeDataPtr;
39  static llvm::PointerType* RuntimePtr;
40 
41  // TODO: Redesign static LLVM objects
42  static llvm::MDNode* expectTrue;
43 
44  static void init(llvm::LLVMContext& _context);
45 };
46 
47 struct Constant
48 {
49  static llvm::ConstantInt* gasMax;
50 
52  static llvm::ConstantInt* get(int64_t _n);
53  static llvm::ConstantInt* get(llvm::APInt const& _n);
54 
55  static llvm::ConstantInt* get(ReturnCode _returnCode);
56 };
57 
58 }
59 }
60 }
61 
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
static llvm::Type * Void
Definition: Type.h:32
static llvm::PointerType * RuntimePtr
Definition: Type.h:39
static llvm::PointerType * WordPtr
Definition: Type.h:22
static llvm::PointerType * BytePtr
Definition: Type.h:30
static llvm::IntegerType * Word
Definition: Type.h:21
static llvm::ConstantInt * gasMax
Definition: Type.h:49
static llvm::IntegerType * MainReturn
Main function return type.
Definition: Type.h:35
static llvm::PointerType * RuntimeDataPtr
Definition: Type.h:38
static llvm::PointerType * GasPtr
Definition: Type.h:27
ReturnCode
Definition: JIT.h:86
static llvm::IntegerType * Bool
Definition: Type.h:24
static llvm::IntegerType * Size
Definition: Type.h:25
static llvm::MDNode * expectTrue
Definition: Type.h:42
static llvm::IntegerType * Gas
Definition: Type.h:26
static llvm::PointerType * EnvPtr
Definition: Type.h:37
static llvm::IntegerType * Byte
Definition: Type.h:29