1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Added ability to dynamically cast delegates with compatible signatures

This commit is contained in:
Brian Fiete 2025-03-22 15:34:59 -04:00
parent f10365c1ad
commit 37f72cd3b6
8 changed files with 217 additions and 76 deletions

View file

@ -1552,6 +1552,7 @@ public:
Dictionary<int, BfIRValue> mStringCharPtrPool;
Array<int> mStringPoolRefs;
HashSet<int> mUnreifiedStringPoolRefs;
HashSet<int> mSignatureIdRefs;
Array<BfIRBuilder*> mPrevIRBuilders; // Before extensions
BfIRBuilder* mBfIRBuilder;
@ -2019,6 +2020,9 @@ public:
void CreateDelegateInvokeMethod();
BfType* GetDelegateReturnType(BfType* delegateType);
BfMethodInstance* GetDelegateInvokeMethod(BfTypeInstance* typeInstance);
String GetDelegateSignatureString(BfTypeInstance* typeInstance);
int GetSignatureId(const StringImpl& str);
int GetDelegateSignatureId(BfTypeInstance* typeInstance);
String GetLocalMethodName(const StringImpl& baseName, BfAstNode* anchorNode, BfMethodState* declMethodState, BfMixinState* declMixinState);
BfMethodDef* GetLocalMethodDef(BfLocalMethod* localMethod);
BfModuleMethodInstance GetLocalMethodInstance(BfLocalMethod* localMethod, const BfTypeVector& methodGenericArguments, BfMethodInstance* methodInstance = NULL, bool force = false);