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

Box() public method

Pops a value from the stack, converts it to an object reference, then pushes it back onto the stack.
public Box ( Type type ) : void
type System.Type
return void
        public override void Box(Type type)
        {
            if (type == null)
                throw new ArgumentNullException("type");
            if (type.IsValueType == false)
                throw new ArgumentException("The type to box must be a value type.", "type");

            // Get the token for the type.
            int token = this.GetToken(type);
            Emit1ByteOpCodeInt32(0x8C, 1, 1, token);
            PopStackOperands(VESType.Int32 | VESType.Int64 | VESType.Float | VESType.ManagedPointer | VESType.Object);
            PushStackOperand(VESType.Object);
        }
DynamicILGenerator