1
2
3
4
5
6 #ifndef CMAJOR_CMSXBE_EMITTER_INCLUDED
7 #define CMAJOR_CMSXBE_EMITTER_INCLUDED
8 #include <cmajor/cmsxbe/EmittingContext.hpp>
9 #include <cmajor/cmsxbe/ValueStack.hpp>
10 #include <cmajor/cmsxi/CompileUnit.hpp>
11 #include <cmajor/ir/Emitter.hpp>
12 #include <boost/uuid/uuid.hpp>
13 #include <boost/uuid/nil_generator.hpp>
14 #include <boost/functional/hash.hpp>
15
16 namespace cmsxbe {
17
18 using soulng::lexer::Span;
19
20 class Emitter : public cmajor::ir::Emitter
21 {
22 public:
23 Emitter(EmittingContext* emittingContext_);
24 EmittingContext* GetEmittingContext() const { return emittingContext; }
25 void SetEmittingDelegate(cmajor::ir::EmittingDelegate* emittingDelegate_) override;
26 void* GetIrTypeForBool() override;
27 void* GetIrTypeForSByte() override;
28 void* GetIrTypeForByte() override;
29 void* GetIrTypeForShort() override;
30 void* GetIrTypeForUShort() override;
31 void* GetIrTypeForInt() override;
32 void* GetIrTypeForUInt() override;
33 void* GetIrTypeForLong() override;
34 void* GetIrTypeForULong() override;
35 void* GetIrTypeForFloat() override;
36 void* GetIrTypeForDouble() override;
37 void* GetIrTypeForChar() override;
38 void* GetIrTypeForWChar() override;
39 void* GetIrTypeForUChar() override;
40 void* GetIrTypeForVoid() override;
41 void* GetIrTypeForFunction(void* retType, const std::std::vector<void*>¶mTypes) override;
42 void* GetIrTypeForVariableParamFunction(void* retType) override;
43 void* GetIrTypeByTypeId(const boost::uuids::uuid& typeId) override;
44 void SetIrTypeByTypeId(const boost::uuids::uuid& typeId, void* irType) override;
45 void* GetIrTypeForArrayType(void* elementType, int64_t size) override;
46 void* GetIrTypeForClassType(const std::std::vector<void*>&elementTypes) override;
47 void* CreateFwdIrTypeForClassType() override;
48 void SetFwdIrTypeBody(void* forwardDeclaredType, const std::std::vector<void*>&elementTypes) override;
49 void* GetIrTypeForDelegateType(void* retType, const std::std::vector<void*>¶mTypes) override;
50 void* GetIrTypeForVoidPtrType() override;
51 void* GetIrTypeForStructType(const std::std::vector<void*>&elementTypes) override;
52 void* GetIrTypeForPtrType(void* baseIrType) override;
53 std::string GetIrTypeName(void* irType) override;
54 std::string MakeVmtVariableName(const std::string& vmtObjectName) override;
55 void* CreateDefaultIrValueForArrayType(void* arrayIrType, const std::std::vector<void*>&arrayOfDefaults) override;
56 void* CreateDefaultIrValueForBool() override;
57 void* CreateDefaultIrValueForSByte() override;
58 void* CreateDefaultIrValueForByte() override;
59 void* CreateDefaultIrValueForShort() override;
60 void* CreateDefaultIrValueForUShort() override;
61 void* CreateDefaultIrValueForInt() override;
62 void* CreateDefaultIrValueForUInt() override;
63 void* CreateDefaultIrValueForLong() override;
64 void* CreateDefaultIrValueForULong() override;
65 void* CreateDefaultIrValueForFloat() override;
66 void* CreateDefaultIrValueForDouble() override;
67 void* CreateDefaultIrValueForChar() override;
68 void* CreateDefaultIrValueForWChar() override;
69 void* CreateDefaultIrValueForUChar() override;
70 void* CreateDefaultIrValueForStruct(void* irType, const std::std::vector<void*>&defaultMembers) override;
71 void* CreateDefaultIrValueForDelegateType(void* irType) override;
72 void* CreateDefaultIrValueForVoidPtrType() override;
73 void* CreateDefaultIrValueForDerivedType(void* irType) override;
74 void* CreateDefaultIrValueForPtrType(void* irType) override;
75 void* CreateIrValueForBool(bool value) override;
76 void* CreateIrValueForSByte(int8_t value) override;
77 void* CreateIrValueForByte(uint8_t value) override;
78 void* CreateIrValueForShort(int16_t value) override;
79 void* CreateIrValueForUShort(uint16_t value) override;
80 void* CreateIrValueForInt(int32_t value) override;
81 void* CreateIrValueForUInt(uint32_t value) override;
82 void* CreateIrValueForLong(int64_t value) override;
83 void* CreateIrValueForULong(uint64_t value) override;
84 void* CreateIrValueForFloat(float value) override;
85 void* CreateIrValueForDouble(double value) override;
86 void* CreateIrValueForChar(uint8_t value) override;
87 void* CreateIrValueForWChar(uint16_t value) override;
88 void* CreateIrValueForUChar(uint32_t value) override;
89 void* CreateIrValueForWString(void* wstringConstant) override;
90 void* CreateIrValueForUString(void* ustringConstant) override;
91 void* CreateIrValueForConstantArray(void* arrayIrType, const std::std::vector<void*>&elementConstants, conststd::string&prefix) override;
92 void* CreateIrValueForConstantStruct(void* structIrType, const std::std::vector<void*>&elementConstants) override;
93 void* CreateIrValueForUuid(void* uuidConstant) override;
94 void* GetConversionValue(void* type, void* from) override;
95 void* CreateGlobalStringPtr(const std::string& name) override;
96 void* CreateGlobalWStringPtr(const std::u16string& name) override;
97 void* CreateGlobalUStringPtr(const std::u32string& name) override;
98 void* GetGlobalStringPtr(int stringId) override;
99 void* GetGlobalWStringConstant(int stringId) override;
100 void* GetGlobalUStringConstant(int stringId) override;
101 void* GetGlobalUuidConstant(int uuidId) override;
102 void* CreateDITypeForBool() override;
103 void* CreateDITypeForSByte() override;
104 void* CreateDITypeForByte() override;
105 void* CreateDITypeForShort() override;
106 void* CreateDITypeForUShort() override;
107 void* CreateDITypeForInt() override;
108 void* CreateDITypeForUInt() override;
109 void* CreateDITypeForLong() override;
110 void* CreateDITypeForULong() override;
111 void* CreateDITypeForFloat() override;
112 void* CreateDITypeForDouble() override;
113 void* CreateDITypeForChar() override;
114 void* CreateDITypeForWChar() override;
115 void* CreateDITypeForUChar() override;
116 void* CreateDITypeForVoid() override;
117 void* CreateDITypeForArray(void* elementDIType, const std::std::vector<void*>&elements) override;
118 void* CreateDITypeForEnumConstant(const std::string& name, int64_t value) override;
119 void* CreateDITypeForEnumType(const std::string& name, const std::string& mangledName, const Span& span, const boost::uuids::uuid& moduleId, const std::std::vector<void*>&enumConstantElements,
120 uint64_t sizeInBits, uint32_t alignInBits, void* underlyingDIType) override;
121 void* CreateIrDIForwardDeclaration(void* irType, const std::string& name, const std::string& mangledName, const Span& span, const boost::uuids::uuid& moduleId) override;
122 uint64_t GetOffsetInBits(void* classIrType, int layoutIndex) override;
123 void* CreateDITypeForClassType(void* irType, const std::std::vector<void*>&memberVariableElements, constSpan&classSpan, constboost::uuids::uuid&moduleId, const std::string& name, void* vtableHolderClass,
124 const std::string& mangledName, void* baseClassDIType) override;
125 void MapFwdDeclaration(void* fwdDeclaration, const boost::uuids::uuid& typeId) override;
126 void* GetDITypeByTypeId(const boost::uuids::uuid& typeId) const override;
127 void SetDITypeByTypeId(const boost::uuids::uuid& typeId, void* diType, const std::string& typeName) override;
128 void* GetDIMemberType(const std::std::pair<boost::uuids::uuid, int32_t>&memberVariableId) override;
129 void SetDIMemberType(const std::std::pair<boost::uuids::uuid, int32_t>&memberVariableId, void*diType) override;
130 void* CreateDIMemberType(void* scope, const std::string& name, const Span& span, const boost::uuids::uuid& moduleId, uint64_t sizeInBits, uint64_t alignInBits, uint64_t offsetInBits, void* diType) override;
131 void* CreateConstDIType(void* diType) override;
132 void* CreateLValueRefDIType(void* diType) override;
133 void* CreateRValueRefDIType(void* diType) override;
134 void* CreatePointerDIType(void* diType) override;
135 void* CreateUnspecifiedDIType(const std::string& name) override;
136 void MapClassPtr(const boost::uuids::uuid& typeId, void* classPtr, const std::string& className) override;
137 uint64_t GetSizeInBits(void* irType) override;
138 uint64_t GetAlignmentInBits(void* irType) override;
139 void SetCurrentDebugLocation(const Span& span) override;
140 void* GetArrayBeginAddress(void* arrayPtr) override;
141 void* GetArrayEndAddress(void* arrayPtr, uint64_t size) override;
142 void* CreateBasicBlock(const std::string& name) override;
143 void* CreateIncludeBasicBlockInstruction(void* basicBlock) override;
144 void PushParentBlock() override;
145 void PopParentBlock() override;
146 void SetHandlerBlock(void* tryBlock, void* catchBlock) override;
147 void SetCleanupBlock(void* cleanupBlock) override;
148 int GetBasicBlockId(void* basicBlock) override;
149 void CreateBr(void* targetBasicBlock) override;
150 void* CurrentBasicBlock() const override;
151 void SetCurrentBasicBlock(void* basicBlock) override;
152 void CreateCondBr(void* cond, void* trueBasicBlock, void* falseBasicBlock) override;
153 void* CreateArrayIndexAddress(void* arrayPtr, void* index) override;
154 void CreateStore(void* value, void* ptr) override;
155 void* CreateLoad(void* ptr) override;
156 void* CreateAdd(void* left, void* right) override;
157 void* CreateFAdd(void* left, void* right) override;
158 void* CreateSub(void* left, void* right) override;
159 void* CreateFSub(void* left, void* right) override;
160 void* CreateMul(void* left, void* right) override;
161 void* CreateFMul(void* left, void* right) override;
162 void* CreateUDiv(void* left, void* right) override;
163 void* CreateSDiv(void* left, void* right) override;
164 void* CreateFDiv(void* left, void* right) override;
165 void* CreateURem(void* left, void* right) override;
166 void* CreateSRem(void* left, void* right) override;
167 void* CreateAnd(void* left, void* right) override;
168 void* CreateOr(void* left, void* right) override;
169 void* CreateXor(void* left, void* right) override;
170 void* CreateShl(void* left, void* right) override;
171 void* CreateAShr(void* left, void* right) override;
172 void* CreateLShr(void* left, void* right) override;
173 void* CreateICmpEQ(void* left, void* right) override;
174 void* CreateFCmpOEQ(void* left, void* right) override;
175 void* CreateICmpULT(void* leftValue, void* rightValue) override;
176 void* CreateICmpSLT(void* leftValue, void* rightValue) override;
177 void* CreateFCmpOLT(void* leftValue, void* rightValue) override;
178 void* CreateSExt(void* operand, void* destinationType) override;
179 void* CreateZExt(void* operand, void* destinationType) override;
180 void* CreateFPExt(void* operand, void* destinationType) override;
181 void* CreateTrunc(void* operand, void* destinationType) override;
182 void* CreateFPTrunc(void* operand, void* destinationType) override;
183 void* CreateBitCast(void* operand, void* destinationType) override;
184 void* CreateUIToFP(void* operand, void* destinationType) override;
185 void* CreateSIToFP(void* operand, void* destinationType) override;
186 void* CreateFPToUI(void* operand, void* destinationType) override;
187 void* CreateFPToSI(void* operand, void* destinationType) override;
188 void* CreateIntToPtr(void* intValue, void* destinationType) override;
189 void* CreatePtrToInt(void* ptrValue, void* destinationType) override;
190 void* CreateNot(void* value) override;
191 void* CreateNeg(void* value) override;
192 void* CreateFNeg(void* value) override;
193 void* CreateNop() override;
194 void* CreateSave() override;
195 void* CreateBeginTry() override;
196 void* CreateEndTry(void* nextDest) override;
197 void* CreateBeginCatch() override;
198 void* CreateEndCatch(void* nextDest) override;
199 std::string GetVmtObjectName(void* symbol) const override;
200 void SetVmtObjectName(void* symbol, const std::string& vmtObjectName) override;
201 std::string GetImtArrayObjectName(void* symbol) const override;
202 void SetImtArrayObjectName(void* symbol, const std::string& imtArrayObjectName) override;
203 void* GetVmtObjectType(void* symbol) const override;
204 void SetVmtObjectType(void* symbol, void* vmtObjectType) override;
205 void* GetStaticObjectType(void* symbol) const override;
206 void SetStaticObjectType(void* symbol, void* type) override;
207 std::string GetStaticObjectName(void* symbol) const override;
208 void SetStaticObjectName(void* symbol, const std::string& staticObjectName) override;
209 void* GetOrInsertGlobal(const std::string& name, void* type) override;
210 void* GetOrInsertAnyComdat(const std::string& name, void* global) override;
211 void* GetOrInsertAnyFunctionComdat(const std::string& name, void* function) override;
212 void* GetOrInsertFunction(const std::string& name, void* type, bool nothrow) override;
213 void SetInitializer(void* global, void* initializer) override;
214 void SetPrivateLinkage(void* global) override;
215 bool IsVmtObjectCreated(void* symbol) const override;
216 void SetVmtObjectCreated(void* symbol) override;
217 bool IsStaticObjectCreated(void* symbol) const override;
218 void SetStaticObjectCreated(void* symbol) override;
219 void* HandlerBlock() override;
220 void* CleanupBlock() override;
221 bool NewCleanupNeeded() override;
222 void CreateCleanup() override;
223 cmajor::ir::Pad* CurrentPad() override;
224 void* CreateCleanupPadWithParent(void* parentPad, const std::std::vector<void*>&args) override;
225 void* CreateCleanupPad(const std::std::vector<void*>&args) override;
226 void* CreateCleanupRet(void* cleanupPad, void* unwindTarget) override;
227 void* CreateCatchRet(void* catchPad, void* returnTarget) override;
228 void* CreateCatchSwitch(void* unwindBlock) override;
229 void* CreateCatchSwitchWithParent(void* parentPad, void* unwindBlock) override;
230 void AddHandlerToCatchSwitch(void* catchSwitch, void* target) override;
231 void* CreateCatchPad(void* parentPad, const std::std::vector<void*>&args) override;
232 void* CreateClassDIType(void* classPtr) override;
233 void* CreateCall(void* callee, const std::std::vector<void*>&args) override;
234 void* CreateCallInst(void* callee, const std::std::vector<void*>&args, conststd::std::vector<void*>&bundles, constSpan&span) override;
235 void* CreateCallInstToBasicBlock(void* callee, const std::std::vector<void*>&args, conststd::std::vector<void*>&bundles, void*basicBlock, constSpan&span) override;
236 void* CreateInvoke(void* callee, void* normalBlock, void* unwindBlock, const std::std::vector<void*>&args) override;
237 void* CreateInvokeInst(void* callee, void* normalBlock, void* unwindBlock, const std::std::vector<void*>&args, conststd::std::vector<void*>&bundles, constSpan&span) override;
238 void* DIBuilder() override;
239 void SetCurrentDIBuilder(void* diBuilder_) override;
240 void* GetObjectFromClassDelegate(void* classDelegatePtr) override;
241 void* GetDelegateFromClassDelegate(void* classDelegatePtr) override;
242 void* GetObjectFromInterface(void* interfaceTypePtr) override;
243 void* GetObjectPtrFromInterface(void* interfaceTypePtr) override;
244 void* GetImtPtrFromInterface(void* interfaceTypePtr) override;
245 void* GetInterfaceMethod(void* imtPtr, int32_t methodIndex, void* interfaceMethodType) override;
246 void* GetFunctionIrType(void* functionSymbol) const override;
247 void SetFunctionIrType(void* symbol, void* irType) override;
248 void* GetVmtPtr(void* thisPtr, int32_t vmtPtrIndex, void* vmtPtrType) override;
249 void* GetMethodPtr(void* vmtPtr, int32_t vmtIndex) override;
250 void* GetImtArray(void* vmtObjectPtr, int32_t imtsVmtIndexOffset) override;
251 void* GetImt(void* imtArray, int32_t interfaceIndex) override;
252 void* GetIrObject(void* symbol) const override;
253 void SetIrObject(void* symbol, void* irObject) override;
254 void* GetMemberVariablePtr(void* classPtr, int32_t memberVariableLayoutIndex) override;
255 void* SizeOf(void* ptrType) override;
256 void SetLineNumber(int32_t lineNumber) override;
257 void SaveObjectPointer(void* objectPointer_) override;
258 void SetObjectPointer(void* objectPointer_) override;
259 void* GetObjectPointer() override;
260 void* GetClassIdPtr(void* vmtPtr, int32_t classIdVmtIndexOffset) override;
261 void* GetClassName(void* vmtPtr, int32_t classNameVmtIndexOffset) override;
262 void* ComputeAddress(void* ptr, void* index) override;
263 void* CreatePtrDiff(void* left, void* right) override;
264 uint32_t GetPrivateFlag() override;
265 uint32_t GetProtectedFlag() override;
266 uint32_t GetPublicFlag() override;
267 uint32_t GetNoFlags() override;
268 void* CreateModule(const std::string& moduleName) override;
269 void DestroyModule(void* module) override;
270 void SetModule(void* module_) override;
271 void SetTargetTriple(const std::string& targetTriple) override;
272 void SetDataLayout(void* dataLayout_) override;
273 void SetSourceFileName(const std::string& sourceFileName) override;
274 void SetDICompileUnit(void* diCompileUnit_) override;
275 void SetDIFile(void* diFile_) override;
276 void SetColumnSpanProvider(cmajor::common::ColumnSpanProvider* columnSpanProvider_) override;
277 void ResetCurrentDebugLocation() override;
278 void StartDebugInfo(const std::string& sourceFilePath, const std::string& compilerVersion, bool optimized, cmajor::common::ColumnSpanProvider* columnSpanProvider_) override;
279 void FinalizeDebugInfo() override;
280 void EndDebugInfo() override;
281 void EmitIrText(const std::string& filePath) override;
282 void EmitIrFile(const std::string& filePath) override;
283 void Optimize(const std::string& bcFilePath, const std::string& optBCFilePath, const std::string& optimizationFlags) override;
284 void Disassemble(const std::string& bcFilePath, const std::string& filePath) override;
285 void Compile(const std::string& bcFilePath, const std::string& objectFilePath, int optimizationLevel) override;
286 void VerifyModule() override;
287 void EmitObjectCodeFile(const std::string& objectFilePath) override;
288 void* CreateDebugInfoForNamespace(void* scope, const std::string& name) override;
289 void* GetDebugInfoForFile(const Span& span, const boost::uuids::uuid& moduleId) override;
290 void PushScope(void* scope) override;
291 void PopScope() override;
292 void* CurrentScope() override;
293 uint64_t GetClassTypeSizeInBits(void* classIrType) override;
294 uint64_t GetClassTypeAlignmentInBits(void* classIrType) override;
295 void AddInlineFunctionAttribute(void* function) override;
296 void SetFunctionLinkage(void* function, bool setInline) override;
297 void SetFunctionLinkageToLinkOnceODRLinkage(void* function) override;
298 void SetFunctionCallConventionToStdCall(void* function) override;
299 void SetFunction(void* function_, int32_t fileIndex, const boost::uuids::uuid& sourceModuleId, const boost::uuids::uuid& functionId) override;
300 void SetFunctionName(const std::string& functionName) override;
301 void BeginScope() override;
302 void EndScope() override;
303 int16_t GetCurrentScopeId() const override;
304 void SetCurrentScopeId(int16_t scopeId) override;
305 int32_t AddControlFlowGraphNode() override;
306 void SetCurrentControlFlowGraphNodeId(int32_t controlFlowGraphNodeId) override;
307 void AddControlFlowGraphEdge(int32_t startNodeId, int32_t endNodeId) override;
308 void AddLocalVariable(const std::string& localVariableName, const boost::uuids::uuid& typeId, void* irObject) override;
309 void BeginInstructionFlag(int16_t flag) override;
310 void EndInstructionFlag(int16_t flag) override;
311 void SetInPrologue(bool inPrologue_) override;
312 void* CreateSubroutineType(const std::std::vector<void*>&elementTypes) override;
313 unsigned GetPureVirtualVirtuality() override;
314 unsigned GetVirtualVirtuality() override;
315 unsigned GetFunctionFlags(bool isStatic, unsigned accessFlags, bool isExplicit) override;
316 void* CreateDIMethod(const std::string& name, const std::string& mangledName, const Span& span, const boost::uuids::uuid& moduleId, void* subroutineType, unsigned virtuality, unsigned vtableIndex, void* vtableHolder,
317 unsigned flags) override;
318 void* CreateDIFunction(const std::string& name, const std::string& mangledName, const Span& span, const boost::uuids::uuid& moduleId, void* subroutineType, unsigned flags) override;
319 void SetDISubprogram(void* function, void* subprogram) override;
320 void* CreateAlloca(void* irType) override;
321 void* CreateDIParameterVariable(const std::string& name, int index, const Span& span, const boost::uuids::uuid& moduleId, void* irType, void* allocaInst) override;
322 void* CreateDIAutoVariable(const std::string& name, const Span& span, const boost::uuids::uuid& moduleId, void* irType, void* allocaInst) override;
323 void* GetFunctionArgument(void* function, int argumentIndex) override;
324 void SetDebugLoc(void* callInst) override;
325 void* CreateRet(void* value) override;
326 void* CreateRetVoid() override;
327 void SetPersonalityFunction(void* function, void* personalityFunction) override;
328 void AddNoUnwindAttribute(void* function) override;
329 void AddUWTableAttribute(void* function) override;
330 void* CreateLexicalBlock(const Span& span, const boost::uuids::uuid& moduleId) override;
331 void* CreateSwitch(void* condition, void* defaultDest, unsigned numCases) override;
332 void AddCase(void* switchInst, void* caseValue, void* caseDest) override;
333 void* GenerateTrap(const std::std::vector<void*>&args) override;
334 void SetCompileUnitId(const std::string& compileUnitId) override;
335 void* GetClsIdValue(const std::string& typeId) override;
336 void* CreateMDBool(bool value) override;
337 void* CreateMDLong(int64_t value) override;
338 void* CreateMDString(const std::string& value) override;
339 void* CreateMDStructRef(int id) override;
340 int GetMDStructId(void* mdStruct) override;
341 void* CreateMDStruct() override;
342 void* CreateMDBasicBlockRef(void* bb) override;
343 void AddMDItem(void* mdStruct, const std::string& fieldName, void* mdItem) override;
344 void SetFunctionMdId(void* function, int mdId) override;
345 void SetCurrentSourceSpan(int32_t line, int16_t scol, int16_t ecol) override;
346 void* GetMDStructRefForSourceFile(const std::string& sourceFileName) override;
347 void SetMetadataRef(void* inst, void* mdStructRef) override;
348 void FinalizeFunction(void* function, bool hasCleanup) override;
349 int Install(const std::string& str) override;
350 int Install(const std::u16string& str) override;
351 int Install(const std::u32string& str) override;
352 void* CreateLandingPad(void* lpType) override;
353 void SetLandindPadAsCleanup(void* landingPad) override;
354 void MoveAllocaIntoBasicBlock(void* allocaInst, void* lastAlloca, void* basicBlock) override;
355 void AddClauseToLangdingPad(void* landingPad, void* exceptionTypeId) override;
356 void* CreateExtractValue(void* aggregate, const std::std::vector<unsigned int>&indeces) override;
357 void* CreateInsertValue(void* aggregate, void* value, const std::std::vector<unsigned int>&indeces) override;
358 void* CreateUndefValue(void* type) override;
359 void CreateResume(void* exception) override;
360 void DebugPrintDebugInfo(const std::string& filePath) override;
361 void BeginSubstituteLineNumber(int32_t lineNumber) override;
362 void EndSubstituteLineNumber() override;
363 void SetBoundCompileUnit(void* boundCompileUnit_) override { }
364 void* GetBoundCompileUnit() const override { return nullptr; }
365 private:
366 cmsxbe::EmittingContext* emittingContext;
367 cmajor::ir::EmittingDelegate* emittingDelegate;
368 ValueStack stack;
369 cmsxi::CompileUnit* compileUnit;
370 cmsxi::Context* context;
371 std::unordered_map<void*, cmsxi::FunctionType*> functionIrTypeMap;
372 std::unordered_map<boost::uuids::uuid, cmsxi::Type*, boost::boost::hash<boost::uuids::uuid>>irTypeTypeIdMap;
373 cmsxi::Function* currentFunction;
374 std::unordered_map<void*, cmsxi::Value*> irObjectMap;
375 std::unordered_set<void*> vmtObjectCreatedSet;
376 std::unordered_set<void*> staticObjectCreatedSet;
377 std::unordered_map<void*, cmsxi::StructureType*> staticTypeMap;
378 std::unordered_map<void*, std::string> staticObjectNameMap;
379 cmsxi::Value* objectPointer;
380 };
381
382 }
383
384 #endif // CMAJOR_CMSXBE_EMITTER_INCLUDED