Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/kOS.Safe/Encapsulation/KOSDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public List<Structure> GetMergedArgs(List<Structure> args)
return merged;
}

public Structure CallPassingArgs(params Structure[] args)
public virtual Structure CallPassingArgs(params Structure[] args)
{
if (Cpu == null)
throw new KOSCannotCallException();
Expand Down
21 changes: 5 additions & 16 deletions src/kOS.Safe/Encapsulation/NoDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using System;
using System.Collections.Generic;
using kOS.Safe.Execution;
using kOS.Safe.Exceptions;
using kOS.Safe.Compilation;

namespace kOS.Safe.Encapsulation
{
/// <summary>
/// A UserDelegate that cannot actually ever executesany user code.
/// Instead, when OpcodeCall() is executed for it, it will merely
/// crash with an exception. The idea is to give scripts something
/// they can use to "unset" a callback hook.
/// A UserDelegate that cannot actually ever execute any user code.
/// The idea is to give scripts something they can use to "unset" a callback hook.
/// </summary>
[kOS.Safe.Utilities.KOSNomenclature("NoDelegate")]
public class NoDelegate : UserDelegate
Expand All @@ -32,15 +26,10 @@ public override KOSDelegate Clone()
{
return new NoDelegate(Cpu);
}

public override void PushUnderArgs()
{
// force it to do nothing.
}

public override Structure CallWithArgsPushedAlready()

public override Structure CallPassingArgs(params Structure[] args)
{
throw new KOSCannotCallException();
return new KOSPassThruReturn();
}

public override string ToString()
Expand Down
Loading