public bool Evaluate(IReadOnlyMemory memory) { var leftValue = LeftOperand.Evaluate(memory).ToInt(); var rightValue = RightOperand.Evaluate(memory).ToInt(); var result = EvaluateExpression(leftValue, rightValue, Operation); return(result); }
public static int ByteLength(this IReadOnlyMemory memory) { if (memory == null) { throw new ArgumentNullException(nameof(memory)); } return(memory.Length * memory.ElementSize); }
public static bool IsEmpty(this IReadOnlyMemory memory) { if (memory == null) { return(true); } return(memory.ByteLength() == 0); }
private static void PrintMemory(IReadOnlyMemory memory) { var sb = new StringBuilder(); for (uint i = 0; i < 16; i++) { sb.AppendFormat("{0:x2}", memory.GetByte(i)); sb.Append(" "); } Console.WriteLine(sb.ToString()); }
public Cartridge(IReadOnlyMemory rom) { _rom = rom; }
public LuaTString(IReadOnlyMemory memory, IAbsoluteAddress address) { Address = address; _memory = memory; _luaTString = memory.Read<LuaTStringHeader>(address); }
public LuaTKey(IReadOnlyMemory memory, LuaTKeyStruct luaTKeyStruct) { _luaTKeyStruct = luaTKeyStruct; _memory = memory; }
internal LuaValue(IReadOnlyMemory memory, LuaValueStruct luaValue) { _luaValue = luaValue; _memory = memory; }
public LuaTValue(IReadOnlyMemory memory, LuaTValueStruct luaTValue) { _luaTValue = luaTValue; _memory = memory; }
public LuaNode(IReadOnlyMemory memory, IAbsoluteAddress address) { Address = address; _memory = memory; _luaNode = address.Deref<LuaNodeStruct>(); }
public LuaTable(IReadOnlyMemory memory, IAbsoluteAddress address) { Address = address; _memory = memory; _luaTable = _memory.Read<LuaTableStuct>(address); }
public Word Evaluate(IReadOnlyMemory _) => Value;
public Computer(IReadOnlyMemory rom) { _programEngine = new ProgramEngine(rom); }
public Word Evaluate(IReadOnlyMemory memory) => memory.ReadWord(Value);
public ProgramEngine(IReadOnlyMemory rom) { _rom = rom; }
public bool ShouldStop(IReadOnlyMemory memory) => true;
public new bool ShouldStop(IReadOnlyMemory memory) => Condition.Evaluate(memory);
public static bool IsEmpty(this IReadOnlyMemory memory) { return(memory.ByteLength() == 0); }