Skip to content

Commit

Permalink
[dotnet] Tiny refactor to enable a start to be made integrating the m…
Browse files Browse the repository at this point in the history
…ulti-dispatch cache.
  • Loading branch information
jnthn committed Oct 30, 2010
1 parent aa4bd85 commit b3e555f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dotnet/runtime/Runtime/MultiDispatch/MultiDispatcher.cs
Expand Up @@ -20,11 +20,11 @@ public static class MultiDispatcher
/// <param name="Candidates"></param>
/// <param name="Capture"></param>
/// <returns></returns>
public static RakudoCodeRef.Instance FindBestCandidate(RakudoObject[] Candidates, RakudoObject Capture)
public static RakudoCodeRef.Instance FindBestCandidate(RakudoCodeRef.Instance DispatchRoutine, RakudoObject Capture)
{
// Sort the candidates.
// XXX Cache this in the future.
var SortedCandidates = Sort(Candidates);
var SortedCandidates = Sort(DispatchRoutine.Dispatchees);

// Extract the native capture.
// XXX Handle non-native captures too.
Expand Down
6 changes: 3 additions & 3 deletions dotnet/runtime/Runtime/Ops.cs
Expand Up @@ -545,11 +545,11 @@ public static RakudoObject multi_dispatch_over_lexical_candidates(ThreadContext
var CurOuter = TC.CurrentContext;
while (CurOuter != null)
{
var Dispatchees = CurOuter.StaticCodeObject.Dispatchees;
if (Dispatchees != null)
var CodeObj = CurOuter.StaticCodeObject;
if (CodeObj.Dispatchees != null)
{
var Candidate = MultiDispatch.MultiDispatcher.FindBestCandidate(
Dispatchees, TC.CurrentContext.Capture);
CodeObj, TC.CurrentContext.Capture);
return Candidate.STable.Invoke(TC, Candidate, TC.CurrentContext.Capture);
}
CurOuter = CurOuter.Outer;
Expand Down

0 comments on commit b3e555f

Please sign in to comment.