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

Unbox() public method

Pops an object reference (representing a boxed value) from the stack, extracts the address, then pushes that address onto the stack.
public Unbox ( Type type ) : void
type System.Type The type of the boxed value. This should be a value type.
return void
        public override void Unbox(Type type)
        {
            if (type == null)
                throw new ArgumentNullException("type");
            if (type.IsValueType == false)
                throw new ArgumentException("The type of the boxed value must be a value type.", "type");

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