BfCompiler.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. #pragma once
  2. #pragma warning(push)
  3. #pragma warning(disable:4141)
  4. #pragma warning(disable:4146)
  5. #pragma warning(disable:4291)
  6. #pragma warning(disable:4244)
  7. #pragma warning(disable:4267)
  8. #pragma warning(disable:4624)
  9. #pragma warning(disable:4800)
  10. #include "BeefySysLib/Common.h"
  11. #include "BeefySysLib/util/CritSect.h"
  12. #include "BeefySysLib/util/PerfTimer.h"
  13. #include "BeefySysLib/util/String.h"
  14. #include "BfAst.h"
  15. #include "BfSystem.h"
  16. #include "llvm/Support/Compiler.h"
  17. #include "llvm/IR/IRBuilder.h"
  18. #include "llvm/IR/Type.h"
  19. #include "llvm/IR/DIBuilder.h"
  20. #include "llvm/IR/DebugInfo.h"
  21. #include "llvm/IR/Argument.h"
  22. #include "llvm/IR/Constants.h"
  23. #include "BfResolvedTypeUtils.h"
  24. #include <unordered_set>
  25. #include "BfContext.h"
  26. #include "BfCodeGen.h"
  27. #include "BfMangler.h"
  28. #pragma warning(pop)
  29. NS_BF_BEGIN
  30. class BfType;
  31. class BfResolvedType;
  32. class BfTypeInstance;
  33. class BfModule;
  34. class BfFileInstance;
  35. class BfAutoComplete;
  36. class BfMethodInstance;
  37. class BfSourceClassifier;
  38. class BfResolvePassData;
  39. class CeMachine;
  40. enum BfCompileOnDemandKind
  41. {
  42. BfCompileOnDemandKind_AlwaysInclude,
  43. BfCompileOnDemandKind_ResolveUnused,
  44. BfCompileOnDemandKind_SkipUnused
  45. };
  46. class BfCompiler
  47. {
  48. public:
  49. enum CompileState
  50. {
  51. CompileState_None,
  52. CompileState_Normal,
  53. CompileState_Unreified,
  54. CompileState_VData,
  55. CompileState_Cleanup
  56. };
  57. struct Stats
  58. {
  59. int mTotalTypes;
  60. int mMethodDeclarations;
  61. int mTypesPopulated;
  62. int mMethodsProcessed;
  63. int mUnreifiedMethodsProcessed;
  64. int mQueuedTypesProcessed;
  65. int mTypesQueued;
  66. int mTypesDeleted;
  67. int mMethodsQueued;
  68. int mModulesStarted;
  69. int mModulesFinished;
  70. int mModulesReified;
  71. int mModulesUnreified;
  72. int mReifiedModuleCount;
  73. int mIRBytes;
  74. int mConstBytes;
  75. };
  76. Stats mStats;
  77. struct Options
  78. {
  79. BfProject* mHotProject;
  80. int mHotCompileIdx;
  81. int32 mForceRebuildIdx;
  82. BfCompileOnDemandKind mCompileOnDemandKind;
  83. String mTargetTriple;
  84. String mTargetCPU;
  85. BfPlatformType mPlatformType;
  86. BfMachineType mMachineType;
  87. int mCLongSize;
  88. BfToolsetType mToolsetType;
  89. BfSIMDSetting mSIMDSetting;
  90. String mMallocLinkName;
  91. String mFreeLinkName;
  92. bool mIncrementalBuild;
  93. bool mEmitDebugInfo;
  94. bool mEmitLineInfo;
  95. bool mNoFramePointerElim;
  96. bool mInitLocalVariables;
  97. bool mRuntimeChecks;
  98. bool mAllowStructByVal;
  99. bool mEmitDynamicCastCheck;
  100. bool mAllowHotSwapping;
  101. bool mObjectHasDebugFlags;
  102. bool mEnableRealtimeLeakCheck;
  103. bool mEmitObjectAccessCheck; // Only valid with mObjectHasDebugFlags
  104. bool mArithmeticChecks;
  105. bool mEnableCustodian;
  106. bool mEnableSideStack;
  107. bool mHasVDataExtender;
  108. bool mDebugAlloc;
  109. bool mOmitDebugHelpers;
  110. bool mUseDebugBackingParams;
  111. bool mWriteIR;
  112. bool mGenerateObj;
  113. bool mGenerateBitcode;
  114. int mAllocStackCount;
  115. bool mExtraResolveChecks;
  116. int mMaxSplatRegs;
  117. String mErrorString;
  118. Options()
  119. {
  120. mMallocLinkName = "malloc";
  121. mFreeLinkName = "free";
  122. mHotCompileIdx = 0;
  123. mForceRebuildIdx = 0;
  124. mCompileOnDemandKind = BfCompileOnDemandKind_AlwaysInclude;
  125. mPlatformType = BfPlatformType_Unknown;
  126. mMachineType = BfMachineType_x86;
  127. mCLongSize = 4;
  128. mToolsetType = BfToolsetType_Microsoft;
  129. mSIMDSetting = BfSIMDSetting_None;
  130. mHotProject = NULL;
  131. mDebugAlloc = false;
  132. mOmitDebugHelpers = false;
  133. mIncrementalBuild = true;
  134. mEmitDebugInfo = false;
  135. mEmitLineInfo = false;
  136. mNoFramePointerElim = true;
  137. mInitLocalVariables = false;
  138. mRuntimeChecks = true;
  139. mAllowStructByVal = false;
  140. mEmitDynamicCastCheck = true;
  141. mAllowHotSwapping = false;
  142. mEmitObjectAccessCheck = false;
  143. mArithmeticChecks = false;
  144. mObjectHasDebugFlags = false;
  145. mEnableRealtimeLeakCheck = false;
  146. mWriteIR = false;
  147. mGenerateObj = true;
  148. mGenerateBitcode = false;
  149. mEnableCustodian = false;
  150. mEnableSideStack = false;
  151. mHasVDataExtender = false;
  152. mUseDebugBackingParams = true;
  153. mAllocStackCount = 1;
  154. mExtraResolveChecks = false;
  155. #ifdef _DEBUG
  156. mExtraResolveChecks = false;
  157. #endif
  158. mMaxSplatRegs = 4;
  159. }
  160. bool IsCodeView()
  161. {
  162. #ifdef BF_PLATFORM_WINDOWS
  163. return mToolsetType != BfToolsetType_GNU;
  164. #else
  165. return false;
  166. #endif
  167. }
  168. };
  169. Options mOptions;
  170. enum HotTypeFlags
  171. {
  172. HotTypeFlag_None = 0,
  173. HotTypeFlag_UserNotUsed = 1,
  174. HotTypeFlag_UserUsed = 2,
  175. HotTypeFlag_Heap = 4,
  176. HotTypeFlag_ActiveFunction = 8, // Only set for a type version mismatch
  177. HotTypeFlag_Delegate = 0x10, // Only set for a type version mismatch
  178. HotTypeFlag_FuncPtr = 0x20, // Only set for a type version mismatch
  179. HotTypeFlag_CanAllocate = 0x40
  180. };
  181. enum HotResolveFlags
  182. {
  183. HotResolveFlag_None = 0,
  184. HotResolveFlag_HadDataChanges = 1
  185. };
  186. struct HotReachableData
  187. {
  188. HotTypeFlags mTypeFlags;
  189. bool mHadNonDevirtualizedCall;
  190. HotReachableData()
  191. {
  192. mTypeFlags = HotTypeFlag_None;
  193. mHadNonDevirtualizedCall = false;
  194. }
  195. };
  196. class HotResolveData
  197. {
  198. public:
  199. HotResolveFlags mFlags;
  200. Dictionary<BfHotMethod*, HotReachableData> mReachableMethods;
  201. HashSet<BfHotMethod*> mActiveMethods;
  202. Dictionary<BfHotTypeVersion*, HotTypeFlags> mHotTypeFlags;
  203. Array<HotTypeFlags> mHotTypeIdFlags;
  204. Array<BfHotDepData*> mReasons;
  205. HashSet<BfHotMethod*> mDeferredThisCheckMethods;
  206. ~HotResolveData();
  207. };
  208. class HotData
  209. {
  210. public:
  211. BfCompiler* mCompiler;
  212. Dictionary<String, BfHotMethod*> mMethodMap;
  213. Dictionary<BfHotMethod*, String*> mMethodNameMap;
  214. Dictionary<BfHotTypeVersion*, BfHotThisType*> mThisType;
  215. Dictionary<BfHotTypeVersion*, BfHotAllocation*> mAllocation;
  216. Dictionary<BfHotMethod*, BfHotDevirtualizedMethod*> mDevirtualizedMethods;
  217. Dictionary<BfHotMethod*, BfHotFunctionReference*> mFuncPtrs;
  218. Dictionary<BfHotMethod*, BfHotVirtualDeclaration*> mVirtualDecls;
  219. Dictionary<BfHotMethod*, BfHotInnerMethod*> mInnerMethods;
  220. public:
  221. ~HotData();
  222. void ClearUnused(bool isHotCompile);
  223. BfHotThisType* GetThisType(BfHotTypeVersion* hotVersion);
  224. BfHotAllocation* GetAllocation(BfHotTypeVersion* hotVersion);
  225. BfHotDevirtualizedMethod* GetDevirtualizedMethod(BfHotMethod* hotMethod);
  226. BfHotFunctionReference* GetFunctionReference(BfHotMethod* hotMethod);
  227. BfHotVirtualDeclaration* GetVirtualDeclaration(BfHotMethod* hotMethod);
  228. BfHotInnerMethod* GetInnerMethod(BfHotMethod* hotMethod);
  229. };
  230. class HotState
  231. {
  232. public:
  233. BfProject* mHotProject;
  234. int mLastStringId;
  235. int mCommittedHotCompileIdx;
  236. bool mHasNewTypes;
  237. bool mHasNewInterfaceTypes;
  238. Array<BfCodeGenFileEntry> mQueuedOutFiles; // Queues up when we have failed hot compiles
  239. HashSet<int> mSlotDefineTypeIds;
  240. HashSet<int> mNewlySlottedTypeIds;
  241. HashSet<int> mPendingDataChanges;
  242. HashSet<int> mPendingFailedSlottings;
  243. Dictionary<String, int> mDeletedTypeNameMap;
  244. Val128 mVDataHashEx;
  245. public:
  246. HotState()
  247. {
  248. mHotProject = NULL;
  249. mLastStringId = -1;
  250. mCommittedHotCompileIdx = 0;
  251. mHasNewTypes = false;
  252. mHasNewInterfaceTypes = false;
  253. }
  254. ~HotState();
  255. bool HasPendingChanges(BfTypeInstance* type);
  256. void RemovePendingChanges(BfTypeInstance* type);
  257. };
  258. HotData* mHotData;
  259. HotState* mHotState;
  260. HotResolveData* mHotResolveData;
  261. struct StringValueEntry
  262. {
  263. int mId;
  264. BfIRValue mStringVal;
  265. };
  266. struct TestMethod
  267. {
  268. String mName;
  269. BfMethodInstance* mMethodInstance;
  270. };
  271. public:
  272. BfPassInstance* mPassInstance;
  273. FILE* mCompileLogFP;
  274. CeMachine* mCeMachine;
  275. int mCurCEExecuteId;
  276. BfSystem* mSystem;
  277. bool mIsResolveOnly;
  278. BfResolvePassData* mResolvePassData;
  279. Dictionary<String, Array<int>> mAttributeTypeOptionMap;
  280. int mRevision;
  281. bool mLastRevisionAborted;
  282. BfContext* mContext;
  283. BfCodeGen mCodeGen;
  284. String mOutputDirectory;
  285. bool mCanceling;
  286. bool mHasRequiredTypes;
  287. bool mNeedsFullRefresh;
  288. bool mFastFinish;
  289. bool mHasQueuedTypeRebuilds; // Infers we had a fast finish that requires a type rebuild
  290. bool mHadCancel;
  291. bool mWantsDeferMethodDecls;
  292. bool mLastHadComptimeRebuilds;
  293. bool mHasComptimeRebuilds;
  294. bool mInInvalidState;
  295. float mCompletionPct;
  296. int mHSPreserveIdx;
  297. BfModule* mLastAutocompleteModule;
  298. CompileState mCompileState;
  299. HashSet<String> mRebuildFileSet;
  300. HashSet<String> mRebuildChangedFileSet; // Files we had actual changes from
  301. Array<BfVDataModule*> mVDataModules;
  302. BfTypeDef* mBfObjectTypeDef;
  303. BfTypeDef* mChar32TypeDef;
  304. BfTypeDef* mFloatTypeDef;
  305. BfTypeDef* mDoubleTypeDef;
  306. BfTypeDef* mMathTypeDef;
  307. BfTypeDef* mArray1TypeDef;
  308. BfTypeDef* mArray2TypeDef;
  309. BfTypeDef* mArray3TypeDef;
  310. BfTypeDef* mArray4TypeDef;
  311. BfTypeDef* mSpanTypeDef;
  312. BfTypeDef* mRangeTypeDef;
  313. BfTypeDef* mClosedRangeTypeDef;
  314. BfTypeDef* mIndexTypeDef;
  315. BfTypeDef* mIndexRangeTypeDef;
  316. BfTypeDef* mClassVDataTypeDef;
  317. BfTypeDef* mDbgRawAllocDataTypeDef;
  318. BfTypeDef* mDeferredCallTypeDef;
  319. BfTypeDef* mDelegateTypeDef;
  320. BfTypeDef* mFunctionTypeDef;
  321. BfTypeDef* mActionTypeDef;
  322. BfTypeDef* mEnumTypeDef;
  323. BfTypeDef* mStringTypeDef;
  324. BfTypeDef* mStringViewTypeDef;
  325. BfTypeDef* mTypeTypeDef;
  326. BfTypeDef* mValueTypeTypeDef;
  327. BfTypeDef* mResultTypeDef;
  328. BfTypeDef* mGCTypeDef;
  329. BfTypeDef* mGenericIEnumerableTypeDef;
  330. BfTypeDef* mGenericIEnumeratorTypeDef;
  331. BfTypeDef* mGenericIRefEnumeratorTypeDef;
  332. BfTypeDef* mThreadTypeDef;
  333. BfTypeDef* mInternalTypeDef;
  334. BfTypeDef* mPlatformTypeDef;
  335. BfTypeDef* mCompilerTypeDef;
  336. BfTypeDef* mCompilerGeneratorTypeDef;
  337. BfTypeDef* mDiagnosticsDebugTypeDef;
  338. BfTypeDef* mIDisposableTypeDef;
  339. BfTypeDef* mIIntegerTypeDef;
  340. BfTypeDef* mIPrintableTypeDef;
  341. BfTypeDef* mIHashableTypeDef;
  342. BfTypeDef* mIComptimeTypeApply;
  343. BfTypeDef* mIComptimeMethodApply;
  344. BfTypeDef* mIOnTypeInitTypeDef;
  345. BfTypeDef* mIOnTypeDoneTypeDef;
  346. BfTypeDef* mIOnFieldInitTypeDef;
  347. BfTypeDef* mIOnMethodInitTypeDef;
  348. BfTypeDef* mMethodRefTypeDef;
  349. BfTypeDef* mNullableTypeDef;
  350. BfTypeDef* mPointerTTypeDef;
  351. BfTypeDef* mPointerTypeDef;
  352. BfTypeDef* mReflectTypeIdTypeDef;
  353. BfTypeDef* mReflectArrayType;
  354. BfTypeDef* mReflectGenericParamType;
  355. BfTypeDef* mReflectFieldDataDef;
  356. BfTypeDef* mReflectFieldSplatDataDef;
  357. BfTypeDef* mReflectMethodDataDef;
  358. BfTypeDef* mReflectParamDataDef;
  359. BfTypeDef* mReflectInterfaceDataDef;
  360. BfTypeDef* mReflectPointerType;
  361. BfTypeDef* mReflectRefType;
  362. BfTypeDef* mReflectSizedArrayType;
  363. BfTypeDef* mReflectConstExprType;
  364. BfTypeDef* mReflectSpecializedGenericType;
  365. BfTypeDef* mReflectTypeInstanceTypeDef;
  366. BfTypeDef* mReflectUnspecializedGenericType;
  367. BfTypeDef* mReflectFieldInfoTypeDef;
  368. BfTypeDef* mReflectMethodInfoTypeDef;
  369. BfTypeDef* mSizedArrayTypeDef;
  370. BfTypeDef* mAttributeTypeDef;
  371. BfTypeDef* mAttributeUsageAttributeTypeDef;
  372. BfTypeDef* mLinkNameAttributeTypeDef;
  373. BfTypeDef* mCallingConventionAttributeTypeDef;
  374. BfTypeDef* mOrderedAttributeTypeDef;
  375. BfTypeDef* mInlineAttributeTypeDef;
  376. BfTypeDef* mCLinkAttributeTypeDef;
  377. BfTypeDef* mImportAttributeTypeDef;
  378. BfTypeDef* mExportAttributeTypeDef;
  379. BfTypeDef* mCReprAttributeTypeDef;
  380. BfTypeDef* mUnderlyingArrayAttributeTypeDef;
  381. BfTypeDef* mAlignAttributeTypeDef;
  382. BfTypeDef* mAllowDuplicatesAttributeTypeDef;
  383. BfTypeDef* mNoDiscardAttributeTypeDef;
  384. BfTypeDef* mDisableChecksAttributeTypeDef;
  385. BfTypeDef* mDisableObjectAccessChecksAttributeTypeDef;
  386. BfTypeDef* mFriendAttributeTypeDef;
  387. BfTypeDef* mComptimeAttributeTypeDef;
  388. BfTypeDef* mConstEvalAttributeTypeDef;
  389. BfTypeDef* mNoExtensionAttributeTypeDef;
  390. BfTypeDef* mCheckedAttributeTypeDef;
  391. BfTypeDef* mUncheckedAttributeTypeDef;
  392. BfTypeDef* mStaticInitAfterAttributeTypeDef;
  393. BfTypeDef* mStaticInitPriorityAttributeTypeDef;
  394. BfTypeDef* mTestAttributeTypeDef;
  395. BfTypeDef* mThreadStaticAttributeTypeDef;
  396. BfTypeDef* mUnboundAttributeTypeDef;
  397. BfTypeDef* mObsoleteAttributeTypeDef;
  398. BfTypeDef* mErrorAttributeTypeDef;
  399. BfTypeDef* mWarnAttributeTypeDef;
  400. BfTypeDef* mIgnoreErrorsAttributeTypeDef;
  401. BfTypeDef* mReflectAttributeTypeDef;
  402. BfTypeDef* mOnCompileAttributeTypeDef;
  403. int mCurTypeId;
  404. int mTypeInitCount;
  405. String mOutputPath;
  406. Array<BfType*> mGenericInstancePurgatory;
  407. Array<int> mTypeIdFreeList;
  408. int mMaxInterfaceSlots;
  409. bool mInterfaceSlotCountChanged;
  410. public:
  411. bool IsTypeAccessible(BfType* checkType, BfProject* curProject);
  412. bool IsTypeUsed(BfType* checkType, BfProject* curProject);
  413. bool IsModuleAccessible(BfModule* module, BfProject* curProject);
  414. void FixVDataHash(BfModule* bfModule);
  415. void CheckModuleStringRefs(BfModule* module, BfVDataModule* vdataModule, int lastModuleRevision, HashSet<int>& foundStringIds, HashSet<int>& dllNameSet, Array<BfMethodInstance*>& dllMethods, Array<BfCompiler::StringValueEntry>& stringValueEntries);
  416. void HashModuleVData(BfModule* module, HashContext& hash);
  417. BfIRFunction CreateLoadSharedLibraries(BfVDataModule* bfModule, Array<BfMethodInstance*>& dllMethods);
  418. void GetTestMethods(BfVDataModule* bfModule, Array<TestMethod>& testMethods, HashContext& vdataHashCtx);
  419. void EmitTestMethod(BfVDataModule* bfModule, Array<TestMethod>& testMethods, BfIRValue& retValue);
  420. void CreateVData(BfVDataModule* bfModule);
  421. void UpdateDependencyMap(bool deleteUnusued, bool& didWork);
  422. void ProcessPurgatory(bool reifiedOnly);
  423. bool VerifySlotNums();
  424. bool QuickGenerateSlotNums();
  425. bool SlowGenerateSlotNums();
  426. void GenerateSlotNums();
  427. void GenerateDynCastData();
  428. void UpdateRevisedTypes();
  429. void VisitAutocompleteExteriorIdentifiers();
  430. void VisitSourceExteriorNodes();
  431. void UpdateCompletion();
  432. bool DoWorkLoop(bool onlyReifiedTypes = false, bool onlyReifiedMethods = false);
  433. BfMangler::MangleKind GetMangleKind();
  434. BfTypeDef* GetArrayTypeDef(int dimensions);
  435. void GenerateAutocompleteInfo();
  436. void MarkStringPool(BfModule* module);
  437. void MarkStringPool(BfIRConstHolder* constHolder, BfIRValue irValue);
  438. void ClearUnusedStringPoolEntries();
  439. void ClearBuildCache();
  440. int GetDynCastVDataCount();
  441. bool IsAutocomplete();
  442. bool IsDataResolvePass();
  443. bool WantsClassifyNode(BfAstNode* node);
  444. BfAutoComplete* GetAutoComplete();
  445. bool IsHotCompile();
  446. bool IsSkippingExtraResolveChecks();
  447. int GetVTableMethodOffset();
  448. BfType* CheckSymbolReferenceTypeRef(BfModule* module, BfTypeReference* typeRef);
  449. void AddToRebuildTypeList(BfTypeInstance* typeInst, HashSet<BfTypeInstance*>& rebuildTypeInstList);
  450. void AddDepsToRebuildTypeList(BfTypeInstance* typeInst, HashSet<BfTypeInstance*>& rebuildTypeInstList);
  451. void CompileReified();
  452. void PopulateReified();
  453. bool IsCePaused();
  454. bool EnsureCeUnpaused(BfType* refType);
  455. void HotCommit();
  456. void HotResolve_Start(HotResolveFlags flags);
  457. void HotResolve_PopulateMethodNameMap();
  458. bool HotResolve_AddReachableMethod(BfHotMethod* hotMethod, HotTypeFlags flags, bool devirtualized, bool forceProcess = false);
  459. void HotResolve_AddReachableMethod(const StringImpl& methodName);
  460. void HotResolve_AddActiveMethod(BfHotMethod* hotMethod);
  461. void HotResolve_AddActiveMethod(const StringImpl& methodName);
  462. void HotResolve_AddDelegateMethod(const StringImpl& methodName);
  463. void HotResolve_ReportType(BfHotTypeVersion* hotTypeVersion, HotTypeFlags flags, BfHotDepData* reason);
  464. void HotResolve_ReportType(int typeId, HotTypeFlags flags);
  465. String HotResolve_Finish();
  466. void ClearOldHotData();
  467. public:
  468. BfCompiler(BfSystem* bfSystem, bool isResolveOnly);
  469. ~BfCompiler();
  470. bool Compile(const StringImpl& outputPath);
  471. bool DoCompile(const StringImpl& outputPath);
  472. void ClearResults();
  473. void ProcessAutocompleteTempType();
  474. void GetSymbolReferences();
  475. void Cancel();
  476. void RequestFastFinish();
  477. String GetTypeDefList();
  478. String GetGeneratorString(BfTypeDef* typeDef, BfTypeInstance* typeInst, const StringImpl& generatorMethodName, const StringImpl* args);
  479. void HandleGeneratorErrors(StringImpl& result);
  480. String GetGeneratorTypeDefList();
  481. String GetGeneratorInitData(const StringImpl& typeName, const StringImpl& args);
  482. String GetGeneratorGenData(const StringImpl& typeName, const StringImpl& args);
  483. String GetTypeDefMatches(const StringImpl& searchSrc);
  484. void GetTypeDefs(const StringImpl& typeName, Array<BfTypeDef*>& typeDefs);
  485. String GetTypeDefInfo(const StringImpl& typeName);
  486. int GetTypeId(const StringImpl& typeName);
  487. BfType* GetType(const StringImpl& typeName);
  488. int GetEmitSource(const StringImpl& fileName, StringImpl* outBuffer);
  489. String GetEmitLocation(const StringImpl& typeName, int line, int& outEmbedLine, int& outEmbedLineChar);
  490. bool WriteEmitData(const StringImpl& filePath, BfProject* project);
  491. void CompileLog(const char* fmt ...);
  492. void ReportMemory(MemReporter* memReporter);
  493. };
  494. NS_BF_END