C# Class kOS.Safe.Compilation.OpcodeCall

Inheritance: Opcode
Afficher le fichier Open project: KSP-KOS/KOS

Private Properties

Свойство Type Description
OpcodeCall System

Méthodes publiques

Méthode Description
Execute ( ICpu cpu ) : void
OpcodeCall ( object destination ) : System
PopulateFromMLFields ( List fields ) : void
StaticExecute ( ICpu cpu, bool direct, object destination, bool calledFromKOSDelegateCall ) : int

Performs the actual execution of a subroutine call, either from this opcode or externally from elsewhere. All "call a routine" logic should shunt through this code here, which handles all the complex cases, or at least it should. Note that in the case of a user function, this does not *ACTUALLY* execute the function yet. It just arranges the stack correctly for the call and returns the new location that the IP should be jumped to on the next instruction to begin the subroutine. For all built-in cases, it actually executes the call right now and doesn't return until it's done. But for User functions it can't do that - it can only advise on where to jump on the next instruction to begin the function.

ToString ( ) : string

Private Methods

Méthode Description
OpcodeCall ( ) : System

Method Details

Execute() public méthode

public Execute ( ICpu cpu ) : void
cpu ICpu
Résultat void

OpcodeCall() public méthode

public OpcodeCall ( object destination ) : System
destination object
Résultat System

PopulateFromMLFields() public méthode

public PopulateFromMLFields ( List fields ) : void
fields List
Résultat void

StaticExecute() public static méthode

Performs the actual execution of a subroutine call, either from this opcode or externally from elsewhere. All "call a routine" logic should shunt through this code here, which handles all the complex cases, or at least it should. Note that in the case of a user function, this does not *ACTUALLY* execute the function yet. It just arranges the stack correctly for the call and returns the new location that the IP should be jumped to on the next instruction to begin the subroutine. For all built-in cases, it actually executes the call right now and doesn't return until it's done. But for User functions it can't do that - it can only advise on where to jump on the next instruction to begin the function.
public static StaticExecute ( ICpu cpu, bool direct, object destination, bool calledFromKOSDelegateCall ) : int
cpu ICpu the cpu its running on
direct bool same meaning as OpcodeCall.Direct
destination object if direct, then this is the function name
calledFromKOSDelegateCall bool true if KOSDelegate.Call() brought us here. If true that /// means any pre-bound args are already on the stack. If false it means they aren't and this will have to /// put them there.
Résultat int

ToString() public méthode

public ToString ( ) : string
Résultat string