Jurassic.Compiler.DynamicILGenerator.Emit1ByteOpCodeInt64 C# (CSharp) Method

Emit1ByteOpCodeInt64() private method

Emits a one byte opcode plus a 8-byte operand.
private Emit1ByteOpCodeInt64 ( byte opCode, int popCount, int pushCount, long emitInt64 ) : 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.
emitInt64 long A 64-bit integer to emit.
return void
        private void Emit1ByteOpCodeInt64(byte opCode, int popCount, int pushCount, long emitInt64)
        {
            // Enlarge the array if necessary.
            const int instructionSize = 9;
            if (this.offset + instructionSize >= this.bytes.Length)
                EnlargeArray(instructionSize);

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

            // 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