view Jint.Runtime/VM/IntegerBinder.cs @ 2:4aed85a1f558

implemented simple vm2
author cin
date Fri, 25 Oct 2013 15:52:16 +0400
parents e113095f1de0
children
line wrap: on
line source

using System;

namespace Jint.Runtime.VM
{
	public class IntegerBinder: IBinder<int>
	{
		#region IBinder implementation



		#endregion

		#region IBinder implementation

		public bool Equals (int arg1, int arg2)
		{
			throw new NotImplementedException ();
		}

		public int Compare (int arg1, int arg2)
		{
			throw new NotImplementedException ();
		}

		public T2 Convert<T2> (int arg)
		{
			return (T2)Convert.ChangeType(arg,typeof(T2)) ;
		}
		public int OpAdd (int arg1, int arg2)
		{
			return arg1 + arg2;
		}

		public int OpSub (int arg1, int arg2)
		{
			return arg1 - arg2;
		}

		public int OpMul (int arg1, int arg2)
		{
			return arg1 * arg2;
		}

		#endregion
	}
}