C# Class 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.
ファイルを表示 Open project: jnthn/6model

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

FindBestCandidate() public static method

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
return Rakudo.Metamodel.RakudoObject

IsNarrowerType() public static method

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
return bool