C# Class Shovel.Api

Afficher le fichier Open project: mbrezu/Shovel

Méthodes publiques

Méthode Description
CheckStackTop ( Vm vm ) : Shovel.Value
DeserializeBytecode ( MemoryStream ms ) : Shovel.Instruction[]
DeserializeBytecode ( byte bytes ) : Shovel.Instruction[]
GetBytecode ( List sources ) : Shovel.Instruction[]
GetStructInstanceValue ( StructInstance str, string key, Shovel.Value defaultValue ) : Shovel.Value
ListStructInstanceKeys ( StructInstance str ) : string[]
MakeSources ( ) : List
MakeSourcesFromIEnumerable ( IEnumerable namesAndContents ) : List
MakeSourcesWithStdlib ( ) : List
PrintAssembledBytecode ( Instruction bytecode ) : string
PrintAssembledBytecode ( List sources ) : string
PrintRawBytecode ( List sources, bool optimize = false ) : string
RunVm ( Shovel bytecode, List sources, IEnumerable userPrimitives = null, byte state = null, int totalTicksQuota = null, int ticksUntilNextNapQuota = null, int usedCellsQuota = null ) : Vm
RunVm ( Vm vm, List sources, IEnumerable userPrimitives = null, int totalTicksQuota = null, int ticksUntilNextNapQuota = null, int usedCellsQuota = null ) : Vm
SerializeBytecode ( Instruction bytecode ) : byte[]
SerializeBytecodeToStream ( Instruction bytecode ) : MemoryStream
SerializeVmState ( Vm vm ) : byte[]
SerializeVmStateToStream ( Vm vm ) : Stream
SetStructInstanceValue ( StructInstance str, string key, Shovel.Value newValue ) : bool
SideBySide ( string str1, string str2, int halfSize = 38 ) : string
TestRunVm ( List sources ) : Shovel.Value
TestRunVm ( Shovel bytecode, List sources ) : Shovel.Value
VmExecutedTicks ( Vm vm ) : long
VmExecutedTicksSinceLastNap ( Vm vm ) : long
VmExecutionComplete ( Vm vm ) : bool
VmIsLive ( Vm vm ) : bool
VmProgrammingError ( Shovel vm ) : ShovelException
VmUsedCells ( Vm vm ) : int
VmUserDefinedPrimitiveError ( Shovel vm ) : Exception
WakeUpVm ( Vm vm ) : void

Method Details

CheckStackTop() public static méthode

public static CheckStackTop ( Vm vm ) : Shovel.Value
vm Vm
Résultat Shovel.Value

DeserializeBytecode() public static méthode

public static DeserializeBytecode ( MemoryStream ms ) : Shovel.Instruction[]
ms System.IO.MemoryStream
Résultat Shovel.Instruction[]

DeserializeBytecode() public static méthode

public static DeserializeBytecode ( byte bytes ) : Shovel.Instruction[]
bytes byte
Résultat Shovel.Instruction[]

GetBytecode() public static méthode

public static GetBytecode ( List sources ) : Shovel.Instruction[]
sources List
Résultat Shovel.Instruction[]

GetStructInstanceValue() public static méthode

public static GetStructInstanceValue ( StructInstance str, string key, Shovel.Value defaultValue ) : Shovel.Value
str StructInstance
key string
defaultValue Shovel.Value
Résultat Shovel.Value

ListStructInstanceKeys() public static méthode

public static ListStructInstanceKeys ( StructInstance str ) : string[]
str StructInstance
Résultat string[]

MakeSources() public static méthode

public static MakeSources ( ) : List
Résultat List

MakeSourcesFromIEnumerable() public static méthode

public static MakeSourcesFromIEnumerable ( IEnumerable namesAndContents ) : List
namesAndContents IEnumerable
Résultat List

MakeSourcesWithStdlib() public static méthode

public static MakeSourcesWithStdlib ( ) : List
Résultat List

PrintAssembledBytecode() public static méthode

public static PrintAssembledBytecode ( Instruction bytecode ) : string
bytecode Instruction
Résultat string

PrintAssembledBytecode() public static méthode

public static PrintAssembledBytecode ( List sources ) : string
sources List
Résultat string

PrintRawBytecode() public static méthode

public static PrintRawBytecode ( List sources, bool optimize = false ) : string
sources List
optimize bool
Résultat string

RunVm() public static méthode

public static RunVm ( Shovel bytecode, List sources, IEnumerable userPrimitives = null, byte state = null, int totalTicksQuota = null, int ticksUntilNextNapQuota = null, int usedCellsQuota = null ) : Vm
bytecode Shovel
sources List
userPrimitives IEnumerable
state byte
totalTicksQuota int
ticksUntilNextNapQuota int
usedCellsQuota int
Résultat Shovel.Vm.Vm

RunVm() public static méthode

public static RunVm ( Vm vm, List sources, IEnumerable userPrimitives = null, int totalTicksQuota = null, int ticksUntilNextNapQuota = null, int usedCellsQuota = null ) : Vm
vm Vm
sources List
userPrimitives IEnumerable
totalTicksQuota int
ticksUntilNextNapQuota int
usedCellsQuota int
Résultat Shovel.Vm.Vm

SerializeBytecode() public static méthode

public static SerializeBytecode ( Instruction bytecode ) : byte[]
bytecode Instruction
Résultat byte[]

SerializeBytecodeToStream() public static méthode

public static SerializeBytecodeToStream ( Instruction bytecode ) : MemoryStream
bytecode Instruction
Résultat System.IO.MemoryStream

SerializeVmState() public static méthode

public static SerializeVmState ( Vm vm ) : byte[]
vm Vm
Résultat byte[]

SerializeVmStateToStream() public static méthode

public static SerializeVmStateToStream ( Vm vm ) : Stream
vm Vm
Résultat Stream

SetStructInstanceValue() public static méthode

public static SetStructInstanceValue ( StructInstance str, string key, Shovel.Value newValue ) : bool
str StructInstance
key string
newValue Shovel.Value
Résultat bool

SideBySide() public static méthode

public static SideBySide ( string str1, string str2, int halfSize = 38 ) : string
str1 string
str2 string
halfSize int
Résultat string

TestRunVm() public static méthode

public static TestRunVm ( List sources ) : Shovel.Value
sources List
Résultat Shovel.Value

TestRunVm() public static méthode

public static TestRunVm ( Shovel bytecode, List sources ) : Shovel.Value
bytecode Shovel
sources List
Résultat Shovel.Value

VmExecutedTicks() public static méthode

public static VmExecutedTicks ( Vm vm ) : long
vm Vm
Résultat long

VmExecutedTicksSinceLastNap() public static méthode

public static VmExecutedTicksSinceLastNap ( Vm vm ) : long
vm Vm
Résultat long

VmExecutionComplete() public static méthode

public static VmExecutionComplete ( Vm vm ) : bool
vm Vm
Résultat bool

VmIsLive() public static méthode

public static VmIsLive ( Vm vm ) : bool
vm Vm
Résultat bool

VmProgrammingError() public static méthode

public static VmProgrammingError ( Shovel vm ) : ShovelException
vm Shovel
Résultat Shovel.Exceptions.ShovelException

VmUsedCells() public static méthode

public static VmUsedCells ( Vm vm ) : int
vm Vm
Résultat int

VmUserDefinedPrimitiveError() public static méthode

public static VmUserDefinedPrimitiveError ( Shovel vm ) : Exception
vm Shovel
Résultat System.Exception

WakeUpVm() public static méthode

public static WakeUpVm ( Vm vm ) : void
vm Vm
Résultat void