C# Класс Rakudo.Runtime.MultiDispatch.MultiDispatcher

Very first cut implementation of a multi-dispatcher. Doesn't yet know about subtyping beyond no type being the top type. Yes, this will likely get replaced (or extensively re-done) at some point.
Показать файл Открыть проект

Открытые методы

Метод Описание
FindBestCandidate ( ThreadContext TC, RakudoCodeRef DispatchRoutine, RakudoObject Capture ) : RakudoObject

Finds the best candidate, if one exists, and returns it.

IsNarrowerType ( ThreadContext TC, RakudoObject A, RakudoObject B ) : bool

Compares two types to see if the first is narrower than the second.

Приватные методы

Метод Описание
IsNarrower ( ThreadContext TC, RakudoCodeRef a, RakudoCodeRef b ) : int

Checks if one signature is narrower than another.

Sort ( ThreadContext TC, RakudoObject Unsorted ) : Rakudo.Metamodel.Representations.RakudoCodeRef.Instance[]

Sorts the candidates.

Описание методов

FindBestCandidate() публичный статический Метод

Finds the best candidate, if one exists, and returns it.
public static FindBestCandidate ( ThreadContext TC, RakudoCodeRef DispatchRoutine, RakudoObject Capture ) : RakudoObject
TC ThreadContext
DispatchRoutine Rakudo.Metamodel.Representations.RakudoCodeRef
Capture Rakudo.Metamodel.RakudoObject
Результат Rakudo.Metamodel.RakudoObject

IsNarrowerType() публичный статический Метод

Compares two types to see if the first is narrower than the second.
public static IsNarrowerType ( ThreadContext TC, RakudoObject A, RakudoObject B ) : bool
TC ThreadContext
A Rakudo.Metamodel.RakudoObject
B Rakudo.Metamodel.RakudoObject
Результат bool