Example #1
0
        public static void invoke(ref foo x, foo copy, fyield yield = null)
        {
            x.i = 5;

            yield(ref x, ref copy);

            var z = new foo {
                i = 7
            };

            x = z;

            //            // TestByRefLdarg0.foo.invoke
            //this.BAAABtvDSTeJ_aFd4zNwqpA = function (ref$b, c, d)
            //{
            //  var e = new zwksn9vDSTeJ_aFd4zNwqpA(), f = new zwksn9vDSTeJ_aFd4zNwqpA();

            //  ref$b[0].i = 5;
            //  d.BwAABgIE_bjmWsjXYOfeq4g(ref$b, c);
            //  f = new zwksn9vDSTeJ_aFd4zNwqpA();
            //  f.i = 7;
            //  e = f;
            //  ref$b[0]=e;
            //};
        }
Example #2
0
        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
//            { Location =
// assembly: V:\ByRefLdarg0Experiment.Application.exe
// type: ByRefLdarg0Experiment.foo, ByRefLdarg0Experiment.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// offset: 0x000c
//  method:Void invoke(ByRefLdarg0Experiment.foo ByRef, ByRefLdarg0Experiment.foo, fyield) }
//script: error JSC1000: Method: invoke, Type: ByRefLdarg0Experiment.foo; emmiting failed : System.NotImplementedException: { ParameterType = ByRefLdarg0Experiment.foo&, p = [0x000c] callvirt   +0 -3{[0x0008] ldarg.2    +1 -0} {[0x0009] ldarg.0    +1 -0} {[0x000a] ldarga.s   +1 -0} , m = Void Invoke(ByRefLdarg0Experiment.foo ByRef, ByRefLdarg0Experiment.foo ByRef) }
//   at jsc.IdentWriter.JavaScript_WriteParameters(Prestatement p, ILInstruction i, ILFlowStackItem[] s, Int32 offset, MethodBase m)
//   at jsc.IL2ScriptGenerator.OpCode_call_override(IdentWriter w, Prestatement p, ILInstruction i, ILFlowStackItem[] s, MethodBase m)



            //            { i = 3 }
            //{ i = 5 }
            //{ i = 7 }

//            { i = 3 } view-source:27522

// view-source:27522
//{ i = 5, copy = 5 } view-source:27522

// view-source:27522
//{ i = 7 }

            var z = new foo {
                i = 3
            };

            z.invoke();
        }
        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {




//            { Location =
// assembly: V:\ByRefLdarg0Experiment.Application.exe
// type: ByRefLdarg0Experiment.foo, ByRefLdarg0Experiment.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// offset: 0x000c
//  method:Void invoke(ByRefLdarg0Experiment.foo ByRef, ByRefLdarg0Experiment.foo, fyield) }
//script: error JSC1000: Method: invoke, Type: ByRefLdarg0Experiment.foo; emmiting failed : System.NotImplementedException: { ParameterType = ByRefLdarg0Experiment.foo&, p = [0x000c] callvirt   +0 -3{[0x0008] ldarg.2    +1 -0} {[0x0009] ldarg.0    +1 -0} {[0x000a] ldarga.s   +1 -0} , m = Void Invoke(ByRefLdarg0Experiment.foo ByRef, ByRefLdarg0Experiment.foo ByRef) }
//   at jsc.IdentWriter.JavaScript_WriteParameters(Prestatement p, ILInstruction i, ILFlowStackItem[] s, Int32 offset, MethodBase m)
//   at jsc.IL2ScriptGenerator.OpCode_call_override(IdentWriter w, Prestatement p, ILInstruction i, ILFlowStackItem[] s, MethodBase m)



            //            { i = 3 }
            //{ i = 5 }
            //{ i = 7 }

//            { i = 3 } view-source:27522

// view-source:27522
//{ i = 5, copy = 5 } view-source:27522

// view-source:27522
//{ i = 7 } 

            var z = new foo { i = 3 };

            z.invoke();
        }
Example #4
0
        public static void Main(string[] args)
        {
            var z = new foo { i = 3 };

            z.invoke();

            RewriteToUltraApplication.AsProgram.Launch(typeof(Application));
        }
Example #5
0
        public static void Main(string[] args)
        {
            var z = new foo {
                i = 3
            };

            z.invoke();

            RewriteToUltraApplication.AsProgram.Launch(typeof(Application));
        }
        public static void invoke(ref foo x, foo copy, fyield yield = null)
        {
            x.i = 5;

            yield(ref x, ref copy);

            var z = new foo { i = 7 };

            x = z;

            //            // TestByRefLdarg0.foo.invoke
            //this.BAAABtvDSTeJ_aFd4zNwqpA = function (ref$b, c, d)
            //{
            //  var e = new zwksn9vDSTeJ_aFd4zNwqpA(), f = new zwksn9vDSTeJ_aFd4zNwqpA();

            //  ref$b[0].i = 5;
            //  d.BwAABgIE_bjmWsjXYOfeq4g(ref$b, c);
            //  f = new zwksn9vDSTeJ_aFd4zNwqpA();
            //  f.i = 7;
            //  e = f;
            //  ref$b[0]=e;
            //};

        }