Example #1
0
        public TyonObject Dehydrate(object obj)
        {
            TyonObject tyon_object = new TyonObject(obj, this);

            Finish();
            return(tyon_object);
        }
Example #2
0
        public object Hydrate(TyonObject tyon_object)
        {
            object obj = tyon_object.InstanceSystemObject(this);

            Finish();
            return(obj);
        }
Example #3
0
        public ILLocal DefineLocal(TyonObject obj, ILValue value)
        {
            ILLocal local = block.CreateCementedLocal(value);

            object_to_local.Add(obj, local);

            if (obj.GetTyonAddress() != null)
            {
                internal_address_to_local.Add(obj.GetTyonAddress(), local);
            }

            return(local);
        }
Example #4
0
        public Operation <object, TyonContext> CompileInstanceSystemObject(TyonObject tyon_object)
        {
            return(this.GetType().CreateDynamicMethodDelegate <Operation <object, TyonContext> >(delegate(ILValue c) {
                block = new ILBlock();
                context = c;

                tyon_object.CompileInitialize(this);
                ILLocal local = tyon_object.CompileLocal(this);

                block.AddStatement(new ILReturn(local));
                return block;
            }));
        }
Example #5
0
        public Process <object, TyonContext> CompilePushToSystemObject(TyonObject tyon_object)
        {
            Type type = tyon_object.GetTyonType().GetSystemType(this);

            return(this.GetType().CreateDynamicMethodDelegate <Process <object, TyonContext> >(delegate(ILValue t, ILValue c) {
                block = new ILBlock();
                context = c;

                ILLocal local = DefineLocal(tyon_object, t.GetILExplicitCast(type));

                tyon_object.CompileInitialize(this);
                tyon_object.CompilePushToSystemObject(local, this);

                return block;
            }));
        }
Example #6
0
 public ILLocal ResolveObject(TyonObject obj)
 {
     return(object_to_local.GetValue(obj));
 }
Example #7
0
 public Process <object, TyonContext> CompilePushToSystemObject(string text)
 {
     return(CompilePushToSystemObject(TyonObject.DOMify(text)));
 }
Example #8
0
 public Operation <object, TyonContext> CompileInstanceSystemObject(string text)
 {
     return(CompileInstanceSystemObject(TyonObject.DOMify(text)));
 }
Example #9
0
 public void HydrateInto(object obj, string text)
 {
     HydrateInto(obj, TyonObject.DOMify(text));
 }
Example #10
0
 public void HydrateInto(object obj, TyonObject tyon_object)
 {
     tyon_object.PushToSystemObject(obj, this);
     Finish();
 }
Example #11
0
 public object Hydrate(string text)
 {
     return(Hydrate(TyonObject.DOMify(text)));
 }