Example #1
0
        public ILLocal CompileLocal(TyonCompiler compiler)
        {
            ILLocal local = compiler.ResolveObject(this);

            if (local == null)
            {
                local = compiler.DefineLocal(
                    this,
                    GetTyonType().CompileInstanceSystemObject(compiler, GetTyonValueList().CompileValues(compiler))
                    );
            }

            CompilePushToSystemObject(local, compiler);
            return(local);
        }
Example #2
0
        public void CompileInitialize(TyonCompiler compiler)
        {
            ILLocal local = compiler.ResolveObject(this);

            if (local == null && GetTyonValueList() == null)
            {
                local = compiler.DefineLocal(
                    this,
                    GetTyonType().CompileInstanceSystemObject(compiler)
                    );
            }

            GetTyonValueList().IfNotNull(l => l.CompileInitialization(compiler));
            GetTyonVariables().Process(v => v.CompileInitialize(compiler));
        }