Mercurial > pub > Jint1
view Jint.Runtime/VM/RuntimeContext.cs @ 2:4aed85a1f558
implemented simple vm2
author | cin |
---|---|
date | Fri, 25 Oct 2013 15:52:16 +0400 |
parents | e113095f1de0 |
children | aced2ae9957f |
line wrap: on
line source
using System; using System.Collections.Generic; namespace Jint.Runtime.VM { public class RuntimeContext { Dictionary<Type,object> m_binders; public RuntimeContext () { m_binders = new Dictionary<Type,object> (); m_binders.Add (typeof(int), new IntegerBinder ()); } public Box<T> BoxValue<T>(T value) { return new Box<T> (value, GetBinder<T> ()); } public IBinder<T> GetBinder<T>() { return (IBinder<T>) m_binders [typeof(T)]; } } }