Beispiel #1
0
 /// <summary>
 /// Write instruction operands into bytecode stream.
 /// </summary>
 /// <param name="writer">Bytecode writer.</param>
 public override void WriteOperands(WordWriter writer)
 {
     SampledType.Write(writer);
     Dim.Write(writer);
     Depth.Write(writer);
     Arrayed.Write(writer);
     MS.Write(writer);
     Sampled.Write(writer);
     ImageFormat.Write(writer);
     if (AccessQualifier != null)
     {
         AccessQualifier.Write(writer);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Calculate number of words to fit complete instruction bytecode.
        /// </summary>
        /// <returns>Number of words in instruction bytecode.</returns>
        public override uint GetWordCount()
        {
            uint wordCount = 0;

            wordCount += IdResult.GetWordCount();
            wordCount += SampledType.GetWordCount();
            wordCount += Dim.GetWordCount();
            wordCount += Depth.GetWordCount();
            wordCount += Arrayed.GetWordCount();
            wordCount += MS.GetWordCount();
            wordCount += Sampled.GetWordCount();
            wordCount += ImageFormat.GetWordCount();
            wordCount += AccessQualifier?.GetWordCount() ?? 0u;
            return(wordCount);
        }