public bool Remove(InstructionWithId instruction) { if (instruction.IdResult == 0) { throw new ArgumentException("Instruction should have not zeo IdResult"); } return(_instructions.Remove(instruction.IdResult)); }
public void Add(InstructionWithId instruction) { if (instruction.IdResult == 0) { throw new ArgumentException("Instruction should have not zeo IdResult"); } _instructions.Add(instruction.IdResult, instruction); }
public static LiteralContextDependentNumber ParseOptional(WordReader reader, uint wordCount, InstructionWithId type) { if (wordCount == 0) { return(null); } return(Parse(reader, wordCount, type)); }
public IdRef(InstructionWithId instruction) { _id = instruction.IdResult; if (_id == 0) { throw new ArgumentException("Instruction IdResult should not be zeo."); } _instruction = instruction; _registry = null; }
public static IList <LiteralContextDependentNumber> ParseCollection(WordReader reader, uint wordCount, InstructionWithId type) { var end = reader.Position + wordCount; var res = new PrintableList <LiteralContextDependentNumber>(); while (reader.Position < end) { res.Add(Parse(reader, end - reader.Position, type)); } return(res); }
public static LiteralContextDependentNumber Parse(WordReader reader, uint wordCount, InstructionWithId type) { var typeInstruction = (TypeInstruction)type; var size = typeInstruction.SizeInWords; return(new LiteralContextDependentNumber(new Value(reader.ReadBytes(size), typeInstruction))); }
public IdRef(InstructionWithId instruction, InstructionRegistry registry) { _id = instruction.IdResult; _instruction = instruction; _registry = registry; }
public IdRef(uint id, InstructionRegistry registry) { _id = id; _registry = registry; _instruction = null; }
public void AddType(InstructionWithId instruction, SpirvTypeBase type) { _nodeMap.Add(instruction.IdResult, type); TypeInstructions.Add(type); }