Jurassic.Compiler.DynamicILGenerator.Emit1ByteOpCodeInt32 C# (CSharp) 메소드

Emit1ByteOpCodeInt32() 개인적인 메소드

Emits a one byte opcode plus a 4-byte operand.
private Emit1ByteOpCodeInt32 ( byte opCode, int popCount, int pushCount, int emitInt32 ) : void
opCode byte The opcode to emit.
popCount int The number of items to pop from the stack.
pushCount int The number of items to push onto the stack.
emitInt32 int A 32-bit integer to emit.
리턴 void
        private void Emit1ByteOpCodeInt32(byte opCode, int popCount, int pushCount, int emitInt32)
        {
            // Enlarge the array if necessary.
            const int instructionSize = 5;
            if (this.offset + instructionSize >= this.bytes.Length)
                EnlargeArray(instructionSize);

            // Emit the instruction bytes.
            this.bytes[this.offset++] = opCode;
            EmitInt32(emitInt32);

            // The instruction pops two values and pushes a value to the stack.
            if (this.stackSize < popCount)
                throw new InvalidOperationException("Stack underflow");
            this.stackSize += pushCount - popCount;
            this.maxStackSize = Math.Max(this.stackSize, this.maxStackSize);
        }
DynamicILGenerator